Skip to content

Class jac::OutputStreamCommunicator

ClassList > jac > OutputStreamCommunicator

Communicator interface that can be used send stream data.

  • #include <communicator.h>

Inherited by the following classes: jac::RouterOutputStreamCommunicator

Public Functions

Type Name
OutputStreamCommunicator () = default
OutputStreamCommunicator (const OutputStreamCommunicator &) = delete
OutputStreamCommunicator & operator= (const OutputStreamCommunicator &) = delete
virtual bool put (uint8_t c) = 0
Put a single byte to the stream.
virtual void setRecipients (std::vector< int > recipients) = 0
Set the data links the stream should be sent to. Empty links for broadcast.
virtual size_t write (std::span< const uint8_t > data) = 0
Write a buffer to the stream.
virtual ~OutputStreamCommunicator () = default

Public Functions Documentation

function OutputStreamCommunicator [1/2]

jac::OutputStreamCommunicator::OutputStreamCommunicator () = default

function OutputStreamCommunicator [2/2]

jac::OutputStreamCommunicator::OutputStreamCommunicator (
    const OutputStreamCommunicator &
) = delete

function operator=

OutputStreamCommunicator & jac::OutputStreamCommunicator::operator= (
    const OutputStreamCommunicator &
) = delete

function put

Put a single byte to the stream.

virtual bool jac::OutputStreamCommunicator::put (
    uint8_t c
) = 0

Parameters:

  • c the byte to put

Returns:

True if the byte was put successfully

function setRecipients

Set the data links the stream should be sent to. Empty links for broadcast.

virtual void jac::OutputStreamCommunicator::setRecipients (
    std::vector< int > recipients
) = 0

Parameters:

  • recipients the data link ids

function write

Write a buffer to the stream.

virtual size_t jac::OutputStreamCommunicator::write (
    std::span< const uint8_t > data
) = 0

Parameters:

  • data the buffer to write

Returns:

The number of bytes put

function ~OutputStreamCommunicator

virtual jac::OutputStreamCommunicator::~OutputStreamCommunicator () = default

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