Class IOConnection

Class Documentation

class IOConnection

Implements an implicit EIP connection.

See

eipScanner::ConnectionManager

Public Types

using ReceiveDataHandle = std::function<void(cip::CipUdint, cip::CipUint, const std::vector<uint8_t>&)>
using SendDataHandle = std::function<void(std::vector<uint8_t>&)>
using CloseHandle = std::function<void()>
using WPtr = std::weak_ptr<IOConnection>
using SPtr = std::shared_ptr<IOConnection>

Public Functions

~IOConnection()

Default destructor

void setDataToSend(const std::vector<uint8_t> &data)

Sets data to send via the connection each API period.

Note

Set only data. The sequence counter and the real time format header are append automatically

Parameters
  • data: the dat to send

void setReceiveDataListener(ReceiveDataHandle handle)

Sets a callback to handle received data.

Parameters
  • handle:

void setCloseListener(CloseHandle handle)

Sets a callback to notify that the connection was closed.

Parameters
  • handle:

void setSendDataListener(SendDataHandle handle)

Sets a callback to handle data to send.

Parameters
  • handle: