|
Open Model Railroad Network (OpenMRN)
|
Public Types | |
| enum | { OPERATION_PENDING = 0x20000 , ERROR_CANCELED = Defs::ERROR_OUT_OF_ORDER | 1 } |
Public Member Functions | |
| void | reset () |
| Gets a local stream ID. | |
| 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. | |
Public Member Functions inherited from CallableFlowRequestBase | |
| void | reset_base () |
| Call this from all instances of reset(...). | |
Public Attributes | |
| ByteSink * | target_ {nullptr} |
| Where to send the incoming stream data. | |
| NodeHandle | src_ {0, 0} |
| Remote node that will send us the stream. | |
| Node * | dst_ {nullptr} |
| Local node for receiving the stream. | |
| uint8_t | srcStreamId_ {StreamDefs::INVALID_STREAM_ID} |
| Source (remote) stream ID. May be INVALID_STREAM_ID. | |
| uint8_t | localStreamId_ {StreamDefs::INVALID_STREAM_ID} |
| Local (target) stream ID. Must be valid. | |
| uint16_t | streamWindowSize_ {0} |
| if non-zero, limits the maximum window size by the local side. | |
Public Attributes inherited from CallableFlowRequestBase | |
| int | resultCode |
| If high bits are zero, this is a 16-bit OpenLCB result code. | |
| BarrierNotifiable | done |
| Used internally by the invoke_subflow mechanism of StateFlow to notify the calling flow upon completion. | |
Definition at line 53 of file StreamReceiverInterface.hxx.
| anonymous enum |
| Enumerator | |
|---|---|
| OPERATION_PENDING | This bit in the resultCode is cleared when done is called. |
| ERROR_CANCELED | The operation was canceled by the caller using |
Definition at line 55 of file StreamReceiverInterface.hxx.
|
inline |
Gets a local stream ID.
This will be returning the assigned local stream ID from the stream receiver object.
Definition at line 65 of file StreamReceiverInterface.hxx.
|
inline |
Starts the stream receiver and prepares for an announced stream.
This is generally invoked by a handler of a higher level protocol where the stream connection is arranged, such as the Memory Config Protocol.
This call is processed synchronously. It is expected that shortly after this call a stream init message will arrive to the local interface, originating from the stream source node.
| src | node handle of the source node that announced the stream. |
| src_stream_id | stream ID on the source node side. It is possible that this is not yet known at the time of this call, in which case INVALID_STREAM_ID may be passed in. |
| dst_stream_id | allocated stream ID at the local node. If it is INVALID_STREAM_ID, then the assigned local ID is used by the stream receiver. |
| max_window | if non-zero, limits the maximum window size by the local side. If zero, the default max window size will be taken from a linker-time constant. |
Definition at line 91 of file StreamReceiverInterface.hxx.
| Node* openlcb::StreamReceiveRequest::dst_ {nullptr} |
Local node for receiving the stream.
Definition at line 112 of file StreamReceiverInterface.hxx.
| uint8_t openlcb::StreamReceiveRequest::localStreamId_ {StreamDefs::INVALID_STREAM_ID} |
Local (target) stream ID. Must be valid.
Definition at line 116 of file StreamReceiverInterface.hxx.
| NodeHandle openlcb::StreamReceiveRequest::src_ {0, 0} |
Remote node that will send us the stream.
Definition at line 110 of file StreamReceiverInterface.hxx.
| uint8_t openlcb::StreamReceiveRequest::srcStreamId_ {StreamDefs::INVALID_STREAM_ID} |
Source (remote) stream ID. May be INVALID_STREAM_ID.
Definition at line 114 of file StreamReceiverInterface.hxx.
| uint16_t openlcb::StreamReceiveRequest::streamWindowSize_ {0} |
if non-zero, limits the maximum window size by the local side.
If zero, the default max window size will be taken from a linker-time constant.
Definition at line 120 of file StreamReceiverInterface.hxx.
| ByteSink* openlcb::StreamReceiveRequest::target_ {nullptr} |
Where to send the incoming stream data.
Definition at line 108 of file StreamReceiverInterface.hxx.