2 #include "../serial/asyncSerialPort.h" 3 #include "messageManager.h" 6 typedef boost::function<void(boost::system::error_code& ec, const std::string& response)> ResponseFunction;
20 bool startCommunications();
24 virtual bool isPortOpened(){
return mSerialPort->isOpened();};
25 virtual void stopCommunications();
33 void stopCommunications();
37 boost::asio::io_service mIo;
38 boost::asio::executor_work_guard<boost::asio::io_context::executor_type> mWorkGuard;
39 boost::shared_ptr<AsyncSerialPort> mSerialPort;
41 boost::system::error_code send(std::string
message);
42 void receiveDataHandler(
const char* data,
int size);
struct to keep a message from a sender
Definition: defTypes.h:24
Class which manages the logic relative to send/receive messages via serial port This class implements...
Definition: serialMsgManager.h:15
bool isPortOpened()
Definition: serialMsgManager.h:32
bool rebootCommunications()
Method to be called when maximum consecutive errors have been reached.
Class which manages the logic relative to send/receive messages. This class implements all the logic ...
Definition: messageManager.h:117