Public Member Functions | Private Member Functions | List of all members
industrial::ping_handler::PingHandler Class Reference

Message handler that handles ping messages. More...

#include <ping_handler.h>

Inheritance diagram for industrial::ping_handler::PingHandler:
Inheritance graph
[legend]

Public Member Functions

bool init (industrial::smpl_msg_connection::SmplMsgConnection *connection)
 Class initializer. More...
 
bool init (int msg_type, industrial::smpl_msg_connection::SmplMsgConnection *connection)
 Class initializer (Direct call to base class with the same name) I couldn't get the "using" form to work/. More...
 
- Public Member Functions inherited from industrial::message_handler::MessageHandler
bool callback (industrial::simple_message::SimpleMessage &in)
 Callback function that should be executed when a message arrives DO NOT OVERRIDE THIS FUNCTION. It performs message validation before the internal callback (which should be overridden) is called. If one is required the callback sends a message reply. More...
 
int getMsgType ()
 Gets message type that callback expects. More...
 
 MessageHandler ()
 Constructor. More...
 
 ~MessageHandler ()
 Destructor. More...
 

Private Member Functions

bool internalCB (industrial::simple_message::SimpleMessage &in)
 Callback executed upon receiving a ping message. More...
 

Additional Inherited Members

- Protected Member Functions inherited from industrial::message_handler::MessageHandler
industrial::smpl_msg_connection::SmplMsgConnectiongetConnection ()
 Gets connectoin for message replies. More...
 
bool init (int msg_type, industrial::smpl_msg_connection::SmplMsgConnection *connection)
 Class initializer. More...
 

Detailed Description

Message handler that handles ping messages.

Responds to ping message types. A ping is a simple message that is meant to test communications channels. A ping simply responds with a copy of the data it was sent.

THIS CLASS IS NOT THREAD-SAFE

Definition at line 60 of file ping_handler.h.

Member Function Documentation

bool industrial::ping_handler::PingHandler::init ( industrial::smpl_msg_connection::SmplMsgConnection connection)

Class initializer.

Parameters
connectionsimple message connection that will be used to send replies.
Returns
true on success, false otherwise (an invalid message type)

Definition at line 50 of file ping_handler.cpp.

bool industrial::ping_handler::PingHandler::init ( int  msg_type,
industrial::smpl_msg_connection::SmplMsgConnection connection 
)
inline

Class initializer (Direct call to base class with the same name) I couldn't get the "using" form to work/.

Parameters
connectionsimple message connection that will be used to send replies.
Returns
true on success, false otherwise (an invalid message type)

Definition at line 81 of file ping_handler.h.

bool industrial::ping_handler::PingHandler::internalCB ( industrial::simple_message::SimpleMessage in)
privatevirtual

Callback executed upon receiving a ping message.

Parameters
inincoming message
Returns
true on success, false otherwise

Implements industrial::message_handler::MessageHandler.

Definition at line 55 of file ping_handler.cpp.


The documentation for this class was generated from the following files:


simple_message
Author(s): Shaun Edwards
autogenerated on Sat Sep 21 2019 03:30:09