Default implementation of comms fault handler. This class attempts to reconnect if the connection is lost. More...
#include <simple_comms_fault_handler.h>
Public Member Functions | |
void | connectionFailCB () |
Connection failure callback method: On a connection failure a blocking reconnection is attempted. More... | |
bool | init (industrial::smpl_msg_connection::SmplMsgConnection *connection) |
Initializes default communications fault handler. More... | |
void | receiveFailCB () |
Receive failure callback method: Nothing is performed. More... | |
void | sendFailCB () |
Send failure callback method: Nothing is performed. More... | |
SimpleCommsFaultHandler () | |
Default constructor. More... | |
~SimpleCommsFaultHandler () | |
Destructor. More... | |
Private Member Functions | |
industrial::smpl_msg_connection::SmplMsgConnection * | getConnection () |
Gets connection for manager. More... | |
void | setConnection (industrial::smpl_msg_connection::SmplMsgConnection *connection) |
Sets connection manager. More... | |
Private Attributes | |
industrial::smpl_msg_connection::SmplMsgConnection * | connection_ |
Reference to reply connection (called if incoming message requires a reply) More... | |
Default implementation of comms fault handler. This class attempts to reconnect if the connection is lost.
THIS CLASS IS NOT THREAD-SAFE
Definition at line 57 of file simple_comms_fault_handler.h.
industrial::simple_comms_fault_handler::SimpleCommsFaultHandler::SimpleCommsFaultHandler | ( | ) |
Default constructor.
Definition at line 45 of file simple_comms_fault_handler.cpp.
industrial::simple_comms_fault_handler::SimpleCommsFaultHandler::~SimpleCommsFaultHandler | ( | ) |
Destructor.
Definition at line 51 of file simple_comms_fault_handler.cpp.
|
virtual |
Connection failure callback method: On a connection failure a blocking reconnection is attempted.
Implements industrial::comms_fault_handler::CommsFaultHandler.
Definition at line 73 of file simple_comms_fault_handler.cpp.
|
inlineprivate |
Gets connection for manager.
Definition at line 126 of file simple_comms_fault_handler.h.
bool industrial::simple_comms_fault_handler::SimpleCommsFaultHandler::init | ( | industrial::smpl_msg_connection::SmplMsgConnection * | connection | ) |
Initializes default communications fault handler.
message | connection to use for reconnecting |
Definition at line 55 of file simple_comms_fault_handler.cpp.
|
inlinevirtual |
Receive failure callback method: Nothing is performed.
Implements industrial::comms_fault_handler::CommsFaultHandler.
Definition at line 93 of file simple_comms_fault_handler.h.
|
inlinevirtual |
Send failure callback method: Nothing is performed.
Implements industrial::comms_fault_handler::CommsFaultHandler.
Definition at line 87 of file simple_comms_fault_handler.h.
|
inlineprivate |
Sets connection manager.
connection | connection reference |
Definition at line 115 of file simple_comms_fault_handler.h.
|
private |
Reference to reply connection (called if incoming message requires a reply)
Definition at line 108 of file simple_comms_fault_handler.h.