Class ConnectionManager

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 messaging

  • connectionParameters: the parameters of the connection

  • isLarge: 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 messaging

  • connectionParameters: 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 messaging

  • ioConnection: 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