Class ConnectionManager¶
Defined in File ConnectionManager.h
Class Documentation¶
-
class
ConnectionManager
¶ Implements the implicit messaging with EIP adapter.
Public Functions
-
ConnectionManager
()¶ Default constructor.
-
ConnectionManager
(const MessageRouter::SPtr &messageRouter)¶ - Note
used fot testing
- Parameters
messageRouter
:
-
~ConnectionManager
()¶ Default destructor.
-
IOConnection::WPtr
forwardOpen
(const SessionInfoIf::SPtr &si, cip::connectionManager::ConnectionParameters connectionParameters, bool isLarge = false)¶ Opens an EIP IO connection with the EIP adapter.
- Return
weak pointer to the created connection or nullptr if got an error
- Parameters
si
: the EIP session for explicit messagingconnectionParameters
: the parameters of the connectionisLarge
: use large forward open if true
-
IOConnection::WPtr
largeForwardOpen
(const SessionInfoIf::SPtr &si, cip::connectionManager::ConnectionParameters connectionParameters)¶ Opens an EIP IO connection with the EIP adapter.
- Return
weak pointer to the created connection or nullptr if got an error
- Parameters
si
: the EIP session for explicit messagingconnectionParameters
: the parameters of the connection
-
void
forwardClose
(const SessionInfoIf::SPtr &si, const IOConnection::WPtr &ioConnection)¶ Closes an EIP IO connection.
- Parameters
si
: the EIP session for explicit messagingioConnection
: the connection to close
-
void
handleConnections
(std::chrono::milliseconds timeout)¶ Handles active connections.
- Parameters
timeout
: the timeout of receiving the data by select function
-
bool
hasOpenConnections
() const¶ - Return
true if there are some opened IO connections
-