geofencingClient.h
Go to the documentation of this file.
1 
4 #pragma once
5 #include "../../../../LIBRARIES/MIDDLEWARE/src/com/dpyMwClient.h"
6 #include "geofencingApi.h"
7 
14 {
15 private:
16  void RegisterCallbacks();
17 public:
18  GeofencingClient(std::string& ip, int dport, int sport);
20 
21  void addGeofence(dpyGeofencing::result_handler_function handler, std::string sogid, int id, std::string name, bool enabled, std::vector<std::pair<double, double>> positionList, int radius);
22  void deleteGeofence(dpyGeofencing::result_handler_function handler, std::string sogid, int id);
23  void enableGeofence(dpyGeofencing::result_handler_function handler, std::string sogid, int id);
24  void disableGeofence(dpyGeofencing::result_handler_function handler, std::string sogid, int id);
25 
26  void enableSog(dpyGeofencing::result_handler_function handler, std::string sogid);
27  void disableSog(dpyGeofencing::result_handler_function handler, std::string sogid);
28  void deleteSog(dpyGeofencing::result_handler_function handler, std::string sogid);
29 
30  void feedPosition(dpyGeofencing::result_handler_function handler,dpyGeofencing::FeedStatus feedStatus, std::pair<double, double> position = {0,0});
31 
32  void setGnssSourceIp(dpyGeofencing::result_handler_function handler, std::string ip);
33  void getGnssSourceIp(dpyGeofencing::gnss_source_ip_handler_function handler);
34 
35  void getSOGs(dpyGeofencing::sogs_list_handler_function handler);
36  void getGeofences(dpyGeofencing::geofences_list_handler_function handler, std::string sogid);
37 
38  void sogListEvents_S(dpyGeofencing::soglist_event_handler_function handler);
39  void sogListEvents_U();
40  void sogEvents_S(dpyGeofencing::sog_event_handler_function handler);
41  void sogEvents_U();
42  void geofenceEvents_S(dpyGeofencing::geofence_event_handler_function handler);
43  void geofenceEvents_U();
44 };
boost::function< void(boost::system::error_code error_code, SogListEvent event, std::string sogid)> soglist_event_handler_function
Handler for command function callback.
Definition: geofencingApi.h:153
boost::function< void(boost::system::error_code error_code, std::map< int, Geofence > &geofencesMap)> geofences_list_handler_function
Handler for get geofences requests.
Definition: geofencingApi.h:106
Interacts with geofencing server.
Definition: geofencingClient.h:13
boost::function< void(boost::system::error_code error_code, SogEvent event, std::string sogid, int id, Geofence geofence)> sog_event_handler_function
Handler for command function callback.
Definition: geofencingApi.h:142
boost::function< void(boost::system::error_code error_code, const std::string &ip)> gnss_source_ip_handler_function
Handler for get GNSS source IP requests.
Definition: geofencingApi.h:97
Manages dealer and susbriber.
Definition: dpyMwClient.h:59
boost::function< void(boost::system::error_code error_code, std::list< std::string > &sogsList)> sogs_list_handler_function
Handler for get "sets of geofences" request.
Definition: geofencingApi.h:115
FeedStatus
Definition: geofencingApi.h:70
boost::function< void(boost::system::error_code error_code)> result_handler_function
Handler for command function callback.
Definition: geofencingApi.h:88
boost::function< void(boost::system::error_code error_code, GeofenceEvent event, std::string sogid, int id, Geofence geofence, double angle)> geofence_event_handler_function
Handler for command function callback.
Definition: geofencingApi.h:129