SerialPortClient Class Reference

Interacts with SerialPort service.

#include <serialportClient.h>

Inheritance diagram for SerialPortClient:

Public Member Functions

 SerialPortClient (std::string &ip, int dport, int sport)
 
void getSerialPortList (dpySerialPort::serialPort_list_handler handler)
 Method which requests serial port list. More...
 
void setSerialPortConfiguration (dpySerialPort::handler_function handler, const std::string &portid, dpySerialPort::SerialPortConf serialPortConfiguration)
 Modifies serial port configuration. More...
 
void send (dpySerialPort::handler_function handler, const std::string &portid, const std::string &data)
 Send message through serial port. More...
 
void serialPortEvent_S (dpySerialPort::serialport_receive_handler_function handler)
 Start receiving serial port events.
 
void serialPortEvent_U ()
 Stops receiving serial port events.
 
- Public Member Functions inherited from DpyMwClient
 DpyMwClient (std::string &ip, int dport, int sport)
 
void start ()
 
void stop ()
 
void subscribe (int messageType, boost::any handler)
 
void unsubscribe (int messageType)
 
bool isAlive ()
 
void monitorServiceAvailability_S (const f_hearbeat_handler &handler)
 
void monitorServiceAvailability_U ()
 

Additional Inherited Members

- Protected Member Functions inherited from DpyMwClient
void sendRequest (int requestType, int responseType, std::string content, boost::any handler, int ms_timeout=2000)
 
- Protected Attributes inherited from DpyMwClient
map_proto_register_client m_register_map
 
std::mutex m_map_mutex
 

Member Function Documentation

void getSerialPortList ( dpySerialPort::serialPort_list_handler  handler)
Parameters
handlerHandler to be called when a response comes from the service
void send ( dpySerialPort::handler_function  handler,
const std::string &  portid,
const std::string &  data 
)
Parameters
handlerHandler to be called when a response comes from the service
portidserial port id
datamessage to send
void setSerialPortConfiguration ( dpySerialPort::handler_function  handler,
const std::string &  portid,
dpySerialPort::SerialPortConf  serialPortConfiguration 
)
Parameters
handlerHandler to be called when a response comes from the service
portidserial port id
serialPortConfigurationconfiguration of the serial port to modify