Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
openlcb::StreamSender Class Reference
Inheritance diagram for openlcb::StreamSender:
StateFlow< ByteBuffer, QList< 1 > > TypedStateFlow< MessageType, Base > FlowInterface< MessageType > openlcb::StreamSenderCan

Public Types

enum  StreamSenderState : uint8_t {
  IDLE , STARTED , INITIATING , RUNNING ,
  FULL , CLOSING , STATE_ERROR
}
 Describes the different states in the stream sender. More...
 
- Public Types inherited from TypedStateFlow< MessageType, Base >
typedef Base::Action Action
 Allows using Action without having StateFlowBase:: prefix in front of it.
 
- Public Types inherited from FlowInterface< MessageType >
typedef MessageType message_type
 Stores the message template type for external reference.
 

Public Member Functions

 StreamSender (Service *s)
 
- Public Member Functions inherited from StateFlow< ByteBuffer, QList< 1 > >
 StateFlow (Service *service)
 Constructor.
 
- Public Member Functions inherited from TypedStateFlow< MessageType, Base >
 TypedStateFlow (Service *service)
 Constructor.
 
virtual ~TypedStateFlow ()
 Destructor.
 
void send (MessageType *msg, unsigned priority=UINT_MAX) OVERRIDE
 Sends a message to the state flow for processing.
 
virtual Action entry () override=0
 Entry into the StateFlow activity.
 
- Public Member Functions inherited from FlowInterface< MessageType >
virtual Poolpool ()
 
virtual MessageType * type_helper ()
 This function is never user in the code, but GDB can use it to infer the correct message types.
 
MessageType * alloc ()
 Synchronously allocates a message buffer from the pool of this flow.
 
void alloc_async (Executable *target)
 Asynchronously allocates a message buffer from the pool of this flow.
 

Additional Inherited Members

- Static Public Member Functions inherited from FlowInterface< MessageType >
static MessageType * cast_alloc (QMember *entry)
 Down casts and initializes an asynchronous allocation result to the appropriate flow's buffer type.
 
- Protected Member Functions inherited from TypedStateFlow< MessageType, Base >
void release () OVERRIDE
 Unrefs the current buffer.
 
void return_buffer ()
 For state flows that are operated using invoke_subflow_and_wait this is a way to hand back the buffer to the caller.
 
MessageType * message ()
 
MessageType * transfer_message ()
 Releases ownership of the current message.
 

Detailed Description

Definition at line 51 of file StreamSender.hxx.

Member Enumeration Documentation

◆ StreamSenderState

Describes the different states in the stream sender.

Enumerator
IDLE 

This stream sender is not in use now.

STARTED 

The local client has started using the stream sender (via API).

INITIATING 

The stream initiate message was sent.

RUNNING 

Stream is open and data can be transferred.

FULL 

Stream buffer is full, waiting for proceed message.

CLOSING 

Stream close message was sent.

STATE_ERROR 

An error occurred.

Definition at line 60 of file StreamSender.hxx.

Constructor & Destructor Documentation

◆ StreamSender()

openlcb::StreamSender::StreamSender ( Service s)
inline

Definition at line 54 of file StreamSender.hxx.


The documentation for this class was generated from the following file: