gnssClient.h
Go to the documentation of this file.
1 
5 #pragma once
6 
7 #include "../../../../LIBRARIES/MIDDLEWARE/src/com/dpyMwClient.h"
8 #include "gnssProto.pb.h"
9 #include "gnssApi.h"
10 
14 class GnssClient: public DpyMwClient
15 {
16 
17 private:
18  void RegisterCallbacks();
19  std::map<dpyGnss::GnssPowerStatus, gnssProto::PowerStatus> mPowerEnumtoProto;
20  std::map<dpyGnss::AntenaStatus, gnssProto::AntennaStatus> mAntennaEnumtoProto;
21 
22 public:
23  GnssClient(std::string ip, int dport, int sport);
24  ~GnssClient();
25 
26  //From Deepsy 18.03
27  void asyncSetPowerStatus(dpyGnss::GnssPowerStatus power_stat, dpyGnss::result_handler_function handler);
28  void asyncGetPowerStatus(dpyGnss::power_status_handler_function handler);
29 
30  void getPeriodicPosition_S(dpyGnss::get_periodic_position_handler_function handler);
31  void getPeriodicPosition_U();
32  void asyncGetLastPosition(dpyGnss::get_position_handler_function handler);
33  void asyncGetStoredTimeDate(dpyGnss::get_time_date_handler_function handler);
34 
35  void asyncGetModuleInfo(dpyGnss::GnssInfo info, dpyGnss::get_info_handler_function handler);
36  void asyncPerformSoftwareReset(dpyGnss::SwResetType reset_type, dpyGnss::result_handler_function handler);
37  void asyncPerformHardwareReset(dpyGnss::result_handler_function handler);
38  //From Deepsy 18.10
39  void asyncGetStatus(dpyGnss::get_gnss_status_handler_function handler);
40  void getPeriodicStatus_S(dpyGnss::get_gnss_status_handler_function handler);
41  void getPeriodicStatus_U();
42 
43  //From Deepsy 19.04
44  void asyncStartSimulationMode(dpyGnss::SimulationMode simulation_type, std::string file_path,dpyGnss::result_handler_function handler);
45  void asyncStopSimulationMode(dpyGnss::result_handler_function handler);
46 
47 };
boost::function< void(boost::system::error_code error_code, GnssStatus &current_status)> get_gnss_status_handler_function
Prototype of the handler function for setPositionSubscriberHandler method.
Definition: gnssApi.h:94
boost::function< void(boost::system::error_code error_code, GnssPowerStatus pwr_stat)> power_status_handler_function
Prototype of the handler function for generateEventMsg method.
Definition: gnssApi.h:97
SwResetType
Defines the possible ways of performing a GNSS Reset.
Definition: gnssApi.h:43
boost::function< void(boost::system::error_code error_code, GnssInfo type, const std::string &value)> get_info_handler_function
Prototype of the handler function for getModemInfo method.
Definition: gnssApi.h:96
boost::function< void(boost::system::error_code error_code)> result_handler_function
Prototype of the handler function for obtaining result of the different operations.
Definition: gnssApi.h:98
Client class.
Definition: gnssClient.h:14
SimulationMode
Possible simulation modes.
Definition: gnssApi.h:29
boost::function< void(boost::system::error_code error_code, GnssPosition &next_position)> get_periodic_position_handler_function
Prototype of the handler function for setPositionSubscriberHandler method.
Definition: gnssApi.h:93
GnssInfo
Defines the possible information that can be queried.
Definition: gnssApi.h:70
boost::function< void(boost::system::error_code error_code, tm date)> get_time_date_handler_function
Prototype of the handler function for getStoredTimeDate method.
Definition: gnssApi.h:95
boost::function< void(boost::system::error_code error_code, GnssPosition &last_position)> get_position_handler_function
Prototype of the handler function for getLastPosition method.
Definition: gnssApi.h:92
GnssPowerStatus
Defines the possible GNSS POWER states that the gnss can be in.
Definition: gnssApi.h:35
Manages dealer and susbriber.
Definition: dpyMwClient.h:59