modemApi.h
Go to the documentation of this file.
58 typedef boost::function<void(boost::system::error_code, std::list<std::string> modems)> modem_list_handler_function;
65 typedef boost::function<void(boost::system::error_code, std::list<std::string> sims)> sim_list_handler_function;
73 typedef boost::function<void(boost::system::error_code error_code,std::string modemid, struct ModemStatus& status)> modem_status_handler_function;
82 typedef boost::function<void(boost::system::error_code, std::string modemid, ListEvent event)> modem_list_event_handler_function;
90 typedef boost::function<void(boost::system::error_code, std::string modemid, dpyModem::ModemWarning warning)> modem_warning_event_handler_function;
98 typedef boost::function<void(boost::system::error_code error_code,std::string modemid, const bool &enabled)> modem_data_connection_status_handler_function;
105 typedef boost::function<void(boost::system::error_code, ModemInfo modeminfo)> modem_info_handler_function;
112 typedef boost::function<void(boost::system::error_code, SimInfo siminfo)> sim_info_handler_function;
121 typedef boost::function<void(boost::system::error_code, std::string modemid, std::string simid, ListEvent event)> sim_list_event_handler_function;
129 typedef boost::function<void(boost::system::error_code, std::string simid, dpyModem::SimStatus status)> simStatus_handler_function;
137 typedef boost::function<void(boost::system::error_code& ec, ModemWarning warning_notif)> warning_handler_function;
139 void(boost::system::error_code error_code, MODEM_INFO type, const std::string& value)> get_info_handler_function;
141 void(boost::system::error_code error_code, const AccessPointNetwork& apn_info, const bool& forced_apn)> get_apn_handler_function;
143 void(boost::system::error_code error_code, const AccessPointNetwork& apn_info)> get_apn_by_imsi_handler_function;
145 typedef boost::function<void(boost::system::error_code error_code, const bool &enabled)> data_connection_status_handler_function;
146 typedef boost::function<void(boost::system::error_code error_code, const std::string& modemId, const std::string& interfaceName, std::map<dpyNetworking::Statistics, uint32_t>statisticsValues, const std::string& interfaceIpAddress )> interface_statistics_function_handler;
154 typedef boost::function<void(boost::system::error_code error_code, std::string modemid, int simSlot)> sim_slot_handler_function;
161 typedef boost::function<void(boost::system::error_code error_code, dpyModem::AccessPointNetwork found_apn)> forced_apn_handler_function;
222 void asyncGetModemInfo(const std::string& modemid, dpyModem::modem_info_handler_function handler);
229 void asyncGetModemStatus(const std::string& modemid, dpyModem::modem_status_handler_function handler);
255 void asyncRequestModemOperation(const std::string& modemid, const dpyModem::ModemOperation& operation, dpyModem::result_handler_function handler);
262 void asyncIsDataConnectionEnabled(const std::string& modemid,dpyModem::modem_data_connection_status_handler_function handler);
272 void asyncGetModemSims(const std::string& modemid, dpyModem::sim_list_handler_function handler);
280 void asyncGetActiveSims(const std::string& modemid, dpyModem::sim_list_handler_function handler);
289 void asyncSwitchCurrentSimCard(const std::string& modemid, dpyModem::result_handler_function handler);
297 void getCurrentSimSlot(const std::string& modemid, dpyModem::sim_slot_handler_function handler);
337 void asyncGetApnByImsi(const std::string& imsi, dpyModem::get_apn_by_imsi_handler_function handler);
350 void asyncAddNewApn(const std::string& imsi, const dpyModem::AccessPointNetwork& apn, dpyModem::result_handler_function handler);
377 void asyncModifyApnByImsi(const std::string& current_imsi, const dpyModem::AccessPointNetwork& new_apn, dpyModem::result_handler_function handler);
387 [[deprecated("Do not use the IMSI parameter to configure a forced APN. Forced APN is used for all inserted SIMs")]]
388 void asyncForceCustomApn(const std::string& imsi, dpyModem::result_handler_function handler, const bool& force = false, const dpyModem::AccessPointNetwork& custom_apn = {});
399 void asyncForceCustomApn(dpyModem::result_handler_function handler, const bool& force = false, const dpyModem::AccessPointNetwork& custom_apn = {});
406 void asyncGetInterfaceStatistics(const std::string& modemid, dpyModem::interface_statistics_function_handler);
415 void asyncForceNetworkMode(const std::string& modemid, dpyModem::NetworkMode mode,dpyModem::result_handler_function handler);
425 virtual void monitorServiceAvailability_S(dpyModem::service_availability_handler_function handler);
428 virtual void asyncGetModemInfo(const std::string& modemid, dpyModem::modem_info_handler_function handler);
429 virtual void asyncGetModemStatus(const std::string& modemid, dpyModem::modem_status_handler_function handler);
433 virtual void asyncRequestModemOperation(const std::string& modemid, const dpyModem::ModemOperation& operation, dpyModem::result_handler_function handler);
434 virtual void asyncIsDataConnectionEnabled(const std::string& modemid,dpyModem::modem_data_connection_status_handler_function handler);
435 virtual void asyncGetModemSims(const std::string& modemid, dpyModem::sim_list_handler_function handler);
436 virtual void asyncGetActiveSims(const std::string& modemid, dpyModem::sim_list_handler_function handler);
437 virtual void asyncSwitchCurrentSimCard(const std::string& modemid, dpyModem::result_handler_function handler);
438 virtual void getCurrentSimSlot(const std::string& modemid, dpyModem::sim_slot_handler_function handler);
442 virtual void asyncGetSimInfo(const std::string& simid, dpyModem::sim_info_handler_function handler);
443 virtual void asyncGetSimStatus(const std::string& simid, dpyModem::simStatus_handler_function handler);
444 virtual void asyncGetApnByImsi(const std::string& imsi, dpyModem::get_apn_by_imsi_handler_function handler);
445 virtual void asyncAddNewApn(const std::string& imsi, const dpyModem::AccessPointNetwork& apn, dpyModem::result_handler_function handler);
446 virtual void asyncDeleteApnByImsi(const std::string& imsi, dpyModem::result_handler_function handler);
447 virtual void asyncModifyApnByImsi(const std::string& current_imsi, const dpyModem::AccessPointNetwork& new_apn, dpyModem::result_handler_function handler);
448 virtual void asyncForceCustomApn(const std::string& imsi, dpyModem::result_handler_function handler, const bool& force = false, const dpyModem::AccessPointNetwork& custom_apn = {});
449 virtual void asyncForceCustomApn(dpyModem::result_handler_function handler, const bool& force = false, const dpyModem::AccessPointNetwork& custom_apn = {});
450 virtual void asyncGetInterfaceStatistics(const std::string& modemid, dpyModem::interface_statistics_function_handler);
451 virtual void asyncForceNetworkMode(const std::string& modemid, dpyModem::NetworkMode mode,dpyModem::result_handler_function handler);
void monitorServiceAvailability_S(dpyModem::service_availability_handler_function handler)
Monitor Modem service availability.
@ ENABLE_DATA_CONNECTION
Operation that enables the data connections performed with the modem (modem data connection enabled b...
Definition: modemApi.h:50
void getSimStatusEvents_U()
Method which requests sims associated with a specific modem.
void asyncForceNetworkMode(const std::string &modemid, dpyModem::NetworkMode mode, dpyModem::result_handler_function handler)
Force a modem to work under a specific Network Mode (2G,3G,4G,...)
@ SIM_IMSI
SIM card IMSI (International Mobile Subscriber Identity)
Definition: modemApi.h:34
void getModemWarningEvents_S(dpyModem::modem_warning_event_handler_function handler)
Subscribes to modem warning events.
boost::shared_ptr< ModemClient > mClient
Reference to an Client Object.
Definition: modemApi.h:180
boost::function< void(boost::system::error_code, std::string simid, dpyModem::SimStatus status)> simStatus_handler_function
Prototype of the handler function for sim status getter and events.
Definition: modemApi.h:129
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: modemApi.h:144
boost::function< void(boost::system::error_code error_code, dpyModem::AccessPointNetwork found_apn)> forced_apn_handler_function
Prototype of the handler function for get the global forced APN.
Definition: modemApi.h:161
void asyncGetActiveSims(const std::string &modemid, dpyModem::sim_list_handler_function handler)
Method which requests sims being in use for a specific modem.
boost::function< void(const bool &available)> service_availability_handler_function
Prototype of the handler function used to monitor service availability.
Definition: modemApi.h:136
void asyncGetSimStatus(const std::string &simid, dpyModem::simStatus_handler_function handler)
Method which requests sim status.
boost::function< void(boost::system::error_code error_code, MODEM_INFO type, const std::string &value)> get_info_handler_function
Prototype of the handler function for getModemInfo method.
Definition: modemApi.h:139
boost::function< void(boost::system::error_code error_code, const AccessPointNetwork &apn_info)> get_apn_by_imsi_handler_function
Prototype of the handler function for obtaining apn information (getCurrentApn or getApnByImsi method...
Definition: modemApi.h:143
void getSimStatusEvents_S(dpyModem::simStatus_handler_function handler)
Subscribes to sim status events.
void asyncAddNewApn(const std::string &imsi, const dpyModem::AccessPointNetwork &apn, dpyModem::result_handler_function handler)
Add a new APN to the APN list being used by the Modem when performing Modem data communications.
@ SIM_APN
APN that is being used by the SIM card to perform data connections.
Definition: modemApi.h:37
boost::function< void(boost::system::error_code, SimInfo siminfo)> sim_info_handler_function
Prototype of the handler function used to get a specific sim information.
Definition: modemApi.h:112
boost::function< void(boost::system::error_code, std::string modemid, dpyModem::ModemWarning warning)> modem_warning_event_handler_function
Prototype of the handler function for subscribing to modem warnings.
Definition: modemApi.h:90
void asyncModifyApnByImsi(const std::string ¤t_imsi, const dpyModem::AccessPointNetwork &new_apn, dpyModem::result_handler_function handler)
Modify an existing APN (associated with a specific imsi) in the APN list.
boost::function< void(boost::system::error_code, ModemInfo modeminfo)> modem_info_handler_function
Prototype of the handler function used to get a specific modem information.
Definition: modemApi.h:105
Defines the status information structure that is obtained after a MODEM STATUS report.
Definition: iModem.h:130
boost::function< void(boost::system::error_code, std::list< std::string > sims)> sim_list_handler_function
Prototype of the handler function for getting available sims.
Definition: modemApi.h:65
boost::function< void(boost::system::error_code error_code, const bool &enabled)> data_connection_status_handler_function
Prototype of the handler function for isDataConnectionEnabled method.
Definition: modemApi.h:145
void asyncSwitchCurrentSimCard(const std::string &modemid, dpyModem::result_handler_function handler)
Change current Sim card being used by the specified modem, and start using alternative sim.
boost::function< void(boost::system::error_code error_code, const AccessPointNetwork &apn_info, const bool &forced_apn)> get_apn_handler_function
Prototype of the handler function for obtaining apn information (getCurrentApn or getApnByImsi method...
Definition: modemApi.h:141
void asyncForceCustomApn(const std::string &imsi, dpyModem::result_handler_function handler, const bool &force=false, const dpyModem::AccessPointNetwork &custom_apn={})
Allows to select a specific APN manually ignoring the APN list (disabled by default)....
void asyncIsDataConnectionEnabled(const std::string &modemid, dpyModem::modem_data_connection_status_handler_function handler)
Query if a specific modem data connection functionalities are enabled or not.
MODEM_INFO
Defines the possible information that can be queried.
Definition: modemApi.h:28
void asyncGetModems(dpyModem::modem_list_handler_function handler)
Method which requests available modems.
void monitorServiceAvailability_U()
Stop monitoring Modem service availability.
void asyncGetModemInfo(const std::string &modemid, dpyModem::modem_info_handler_function handler)
Method which requests modem information.
Definition: iSim.h:40
boost::function< void(boost::system::error_code error_code, std::string modemid, struct ModemStatus &status)> modem_status_handler_function
Prototype of the handler function for modem status getter and events.
Definition: modemApi.h:73
ModemOperation
Defines the possible operations that can be queried to a modem.
Definition: modemApi.h:42
void asyncGetSimInfo(const std::string &simid, dpyModem::sim_info_handler_function handler)
Method which requests modem information.
boost::function< void(boost::system::error_code &ec, ModemWarning warning_notif)> warning_handler_function
Prototype of the handler function for getModemNotifications_S method.
Definition: modemApi.h:137
@ SW_RESTART
Operation that generates a software modem restart.
Definition: modemApi.h:47
boost::function< void(boost::system::error_code error_code, std::string modemid, const bool &enabled)> modem_data_connection_status_handler_function
Prototype of the handler function to receive modem data connection status.
Definition: modemApi.h:98
boost::function< void(boost::system::error_code error_code, std::string modemid, int simSlot)> sim_slot_handler_function
Prototype of the handler function for get the current sim slot.
Definition: modemApi.h:154
boost::function< void(boost::system::error_code error_code, const std::string &modemId, const std::string &interfaceName, std::map< dpyNetworking::Statistics, uint32_t >statisticsValues, const std::string &interfaceIpAddress)> interface_statistics_function_handler
Prototype of the handler function for asyncGetInterfaceStatistics method.
Definition: modemApi.h:146
boost::function< void(boost::system::error_code, std::list< std::string > modems)> modem_list_handler_function
Prototype of the handler function for getting available modems.
Definition: modemApi.h:58
@ DISABLE_DATA_CONNECTION
Operation that disables the data connections performed with the modem.
Definition: modemApi.h:49
Deepsy Modem namespace that includes the different enums, structs or method signatures that should be...
ModemWarning
Defines the possible warnings that the modem can report during its operation.
Definition: iModem.h:152
void getModemStatusEvents_S(dpyModem::modem_status_handler_function handler)
Establish the handler that the subscriber will call when a new modem status (coming from any modem) i...
boost::function< void(boost::system::error_code, std::string modemid, ListEvent event)> modem_list_event_handler_function
Prototype of the handler function for subscribing to list events.
Definition: modemApi.h:82
void asyncGetModemSims(const std::string &modemid, dpyModem::sim_list_handler_function handler)
Method which requests sims associated with a specific modem.
void getModemListEvents_S(dpyModem::modem_list_event_handler_function handler)
Subscribes to modem list events.
void asyncRequestModemOperation(const std::string &modemid, const dpyModem::ModemOperation &operation, dpyModem::result_handler_function handler)
Query a specific modem to perform a specific operation.
@ HW_RESTART
Operation that generates a hardware modem restart.
Definition: modemApi.h:48
void asyncGetApnByImsi(const std::string &imsi, dpyModem::get_apn_by_imsi_handler_function handler)
Obtain the APN that corresponds to the specified imsi as it would be obtained with the APN list.
SimStatus
Defines the possible states in which SIM card may be.
Definition: iSim.h:48
void asyncDeleteApnByImsi(const std::string &imsi, dpyModem::result_handler_function handler)
Delete a particular APN from the APN list by specifying the IMSI.
@ SIM_ICCID
SIM card ICCID (Integrated Circuit Card Identifier)
Definition: modemApi.h:35
void asyncGetModemStatus(const std::string &modemid, dpyModem::modem_status_handler_function handler)
Method which requests modem status.
@ ENABLE
Operation that enables the modem (modem enabled by default)
Definition: modemApi.h:45
boost::function< void(boost::system::error_code, std::string modemid, std::string simid, ListEvent event)> sim_list_event_handler_function
Prototype of the handler function for subscribing to list events.
Definition: modemApi.h:121
void asyncGetForcedAPN(dpyModem::forced_apn_handler_function handler)
Obtain the Forced APN configured on the device. If there is no forced APN, it returns an empty one.
void getCurrentSimSlot(const std::string &modemid, dpyModem::sim_slot_handler_function handler)
Get current Sim card slot being used by the specified modem.
void getSimListEvents_S(dpyModem::sim_list_event_handler_function handler)
Subscribes to sim list events.
void asyncGetInterfaceStatistics(const std::string &modemid, dpyModem::interface_statistics_function_handler)
Allows to obtain different statistics of the interface related to transmission and reception of packa...