32 #ifndef MESSAGE_HANDLER_H 33 #define MESSAGE_HANDLER_H 45 namespace message_handler
158 this->connection_ = connection;
169 this->msg_type_ = msg_type;
178 #endif //MESSAGE_HANDLER_H Interface definition for message handlers. The interface defines the callback function that should ex...
Defines an interface and common methods for sending simple messages (see simple_message). This interface makes a bare minimum of assumptions:
bool callback(industrial::simple_message::SimpleMessage &in)
Callback function that should be executed when a message arrives DO NOT OVERRIDE THIS FUNCTION...
This class defines a simple messaging protocol for communicating with an industrial robot controller...
int msg_type_
Message type expected by callback.
int getMsgType()
Gets message type that callback expects.
void setConnection(industrial::smpl_msg_connection::SmplMsgConnection *connection)
Sets connection for message replies.
bool validateMsg(industrial::simple_message::SimpleMessage &in)
Validates incoming message for processing by internal callback.
~MessageHandler()
Destructor.
industrial::smpl_msg_connection::SmplMsgConnection * connection_
Reference to reply connection (called if incoming message requires a reply)
industrial::smpl_msg_connection::SmplMsgConnection * getConnection()
Gets connectoin for message replies.
void setMsgType(int msg_type)
Sets message type that callback expects.
MessageHandler()
Constructor.
bool init(int msg_type, industrial::smpl_msg_connection::SmplMsgConnection *connection)
Class initializer.
virtual bool internalCB(industrial::simple_message::SimpleMessage &in)=0
Virtual callback function.