messageManager.h
35 Message(std::string content="", int timeout = 100, int retries = 3, std::string expectedInitResponse = "", std::string expectedEndResponse="");
94 virtual void transactionProcessed(boost::system::error_code error_code, Transaction transaction) = 0;
std::string expectedEndResponse
Expected end of the response.
Definition: messageManager.h:33
int retries
Number of times that the application will try to send the command after a timeout or a response diffe...
Definition: messageManager.h:31
Transaction(std::list< Message > list)
Constructor using list.
Definition: messageManager.h:58
virtual void unsolicitedInfo(const std::string &message)=0
std::string receivedResponse
Received response.
Definition: messageManager.h:34
void receivedMessage(const char *data, size_t size)
Method for notify received messages.
virtual boost::system::error_code send(std::string message)=0
Method to send the messages.
virtual ~MessageManagerObserver()
Destructor.
Definition: messageManager.h:105
virtual void transactionProcessed(boost::system::error_code error_code, Transaction transaction)=0
virtual std::list< std::string > getUnsolicitedInfoCodes()
Definition: messageManager.h:84
Class which manages the logic relative to send/receive messages. This class implements all the logic ...
Definition: messageManager.h:117
Transaction(std::initializer_list< Message > list)
Constructor using initializer list.
Definition: messageManager.h:63
int timeout
Timeout interval that the application will wait before considering the command sent as failed defined...
Definition: messageManager.h:30
std::string content
Command to send via serial , which may be transformed depending on the protocol.
Definition: messageManager.h:29
boost::asio::basic_waitable_timer< boost::chrono::steady_clock > steady_timer
Typedef to use a steady timer.
Definition: dpyMwClient.h:52
virtual bool rebootCommunications()=0
Method to be called when maximum consecutive errors have been reached.
int intervalMessage
Time to wait between send messages from the same transaction in milliseconds.
Definition: messageManager.h:49
std::string expectedInitResponse
Expected init of the response.
Definition: messageManager.h:32