35#ifndef _OPENLCB_STREAMRECEIVERINTERFACE_HXX_
36#define _OPENLCB_STREAMRECEIVERINTERFACE_HXX_
43template <
class T>
class Buffer;
94 uint16_t max_window = 0)
Base class for all QMember types that hold data in an expandable format.
Abstract class for message recipients.
Collection of related state machines that pend on incoming messages.
Base class for NMRAnet nodes conforming to the asynchronous interface.
virtual void cancel_request()=0
Cancels the currently pending stream receive request.
#define HASSERT(x)
Checks that the value of expression x is true, else terminates the current process.
Holds a reference to a raw buffer, with the start and size information.
All callable flow request objects have to derive from this struct.
void reset_base()
Call this from all instances of reset(...).
int resultCode
If high bits are zero, this is a 16-bit OpenLCB result code.
Container of both a NodeID and NodeAlias.
static constexpr uint8_t INVALID_STREAM_ID
This value is invalid as a source or destination stream ID.
ByteSink * target_
Where to send the incoming stream data.
void reset()
Gets a local stream ID.
uint8_t srcStreamId_
Source (remote) stream ID. May be INVALID_STREAM_ID.
uint16_t streamWindowSize_
if non-zero, limits the maximum window size by the local side.
uint8_t localStreamId_
Local (target) stream ID. Must be valid.
Node * dst_
Local node for receiving the stream.
NodeHandle src_
Remote node that will send us the stream.
@ ERROR_CANCELED
The operation was canceled by the caller using cancel_request()
@ OPERATION_PENDING
This bit in the resultCode is cleared when done is called.
void reset(ByteSink *target, Node *dst, NodeHandle src, uint8_t src_stream_id=StreamDefs::INVALID_STREAM_ID, uint8_t dst_stream_id=StreamDefs::INVALID_STREAM_ID, uint16_t max_window=0)
Starts the stream receiver and prepares for an announced stream.