SerialMsgManager Class Reference
Class which manages the logic relative to send/receive messages via serial port This class implements all the logic necessary to queue messages, to retry sends or to discard messages.
#include <serialMsgManager.h>
Inheritance diagram for SerialMsgManager:

Public Member Functions | |
SerialMsgManager (std::string port, int baudrate) | |
bool | startCommunications () |
bool | rebootCommunications () |
Method to be called when maximum consecutive errors have been reached. More... | |
bool | isPortOpened () |
void | stopCommunications () |
![]() | |
boost::system::error_code | subscribe (MessageManagerObserver *observer) |
boost::system::error_code | unsubscribe (MessageManagerObserver *observer) |
boost::system::error_code | sendAsync (const Transaction &transaction) |
boost::system::error_code | sendSync (Transaction &transaction) |
Additional Inherited Members | |
![]() | |
static std::string | stringToHex (const std::string &input, bool printAsciiChar) |
![]() | |
void | receivedMessage (const char *data, size_t size) |
Method for notify received messages. More... | |
virtual boost::system::error_code | receiveUntil (int timeout, std::string &receivedResponse) |
![]() | |
boost::asio::io_service | mIo |
Boost asio input output service. | |
Member Function Documentation
bool isPortOpened | ( | ) |
Return Serial port status
- Returns
- true if serial port is opened.
|
virtual |
- Returns
- true if comunications are rebooted, false otherwise
Implements MessageManager.