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 feedPosition(dpyGeofencing::result_handler_function handler,dpyGeofencing::FeedStatus feedStatus, std::pair<double, double> position = {0,0});
27 
28  void getSOGs(dpyGeofencing::sogs_list_handler_function handler);
29  void getGeofences(dpyGeofencing::geofences_list_handler_function handler, std::string sogid);
30 
31  void sogListEvents_S(dpyGeofencing::soglist_event_handler_function handler);
32  void sogListEvents_U();
33  void sogEvents_S(dpyGeofencing::sog_event_handler_function handler);
34  void sogEvents_U();
35  void geofenceEvents_S(dpyGeofencing::geofence_event_handler_function handler);
36  void geofenceEvents_U();
37 };
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:143
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:132
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:105
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:119
boost::function< void(boost::system::error_code error_code)> result_handler_function
Handler for command function callback.
Definition: geofencingApi.h:87
FeedStatus
Definition: geofencingApi.h:69
Interacts with geofencing server.
Definition: geofencingClient.h:13
Manages dealer and susbriber.
Definition: dpyMwClient.h:59
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:96