Skip to content

Class jac::RouterInputPacketCommunicator

ClassList > jac > RouterInputPacketCommunicator

Inherits the following classes: jac::InputPacketCommunicator, jac::Consumer

Public Functions

Type Name
RouterInputPacketCommunicator ()
virtual size_t available () override
Get the number of packets available to read.
virtual void cancelRead () override
Cancel any blocking read.
virtual void clear () override
Clear the buffer.
virtual std::optional< std::pair< int, std::vector< uint8_t > > > get () override
Get the next packet.
virtual void processPacket (int linkId, std::span< const uint8_t > data) override

Public Functions inherited from jac::InputPacketCommunicator

See jac::InputPacketCommunicator

Type Name
InputPacketCommunicator () = default
InputPacketCommunicator (const InputPacketCommunicator &) = delete
virtual size_t available () = 0
Get the number of packets available to read.
virtual void cancelRead () = 0
Cancel any blocking read.
virtual void clear () = 0
Clear the buffer.
virtual std::optional< std::pair< int, std::vector< uint8_t > > > get () = 0
Get the next packet.
InputPacketCommunicator & operator= (const InputPacketCommunicator &) = delete
virtual ~InputPacketCommunicator () = default

Public Functions inherited from jac::Consumer

See jac::Consumer

Type Name
Consumer () = default
Consumer (const Consumer &) = delete
Consumer (Consumer &&) = delete
Consumer & operator= (const Consumer &) = delete
Consumer & operator= (Consumer &&) = delete
virtual void processPacket (int linkId, std::span< const uint8_t > data) = 0
virtual ~Consumer () = default

Public Functions Documentation

function RouterInputPacketCommunicator

inline jac::RouterInputPacketCommunicator::RouterInputPacketCommunicator () 

function available

Get the number of packets available to read.

inline virtual size_t jac::RouterInputPacketCommunicator::available () override

Returns:

The number

Implements jac::InputPacketCommunicator::available

function cancelRead

inline virtual void jac::RouterInputPacketCommunicator::cancelRead () override

Implements jac::InputPacketCommunicator::cancelRead

function clear

inline virtual void jac::RouterInputPacketCommunicator::clear () override

Implements jac::InputPacketCommunicator::clear

function get

Get the next packet.

inline virtual std::optional< std::pair< int, std::vector< uint8_t > > > jac::RouterInputPacketCommunicator::get () override

Note:

This method blocks until a packet is available.

Returns:

The packet

Implements jac::InputPacketCommunicator::get

function processPacket

inline virtual void jac::RouterInputPacketCommunicator::processPacket (
    int linkId,
    std::span< const uint8_t > data
) override

Implements jac::Consumer::processPacket


The documentation for this class was generated from the following file src/jac/link/routerCommunicator.h