Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
FdHubWriteFlow< Data > Class Template Reference

State flow for writing data to an fd. More...

#include <HubDevice.hxx>

Inheritance diagram for FdHubWriteFlow< Data >:
StateFlow< Buffer< Data >, QList< 1 > > TypedStateFlow< MessageType, Base > FlowInterface< MessageType >

Public Member Functions

 FdHubWriteFlow (FdHubPortBase *parent)
 Constructor.
 
StateFlowBase::Action entry () OVERRIDE
 Handles the next incoming entry.
 
- Public Member Functions inherited from StateFlow< Buffer< Data >, 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.
 
- 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.
 

Public Attributes

FdHubPortBaseport_
 The owning port.
 

Additional Inherited Members

- 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.
 
- 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

template<class Data>
class FdHubWriteFlow< Data >

State flow for writing data to an fd.

This flow performs synchronous writes, thus must be run on its own executor (and must never be run on the shared executor used by the stack).

Definition at line 217 of file HubDevice.hxx.

Constructor & Destructor Documentation

◆ FdHubWriteFlow()

template<class Data >
FdHubWriteFlow< Data >::FdHubWriteFlow ( FdHubPortBase parent)
inline

Constructor.

Parameters
parentis the owning port.

Definition at line 221 of file HubDevice.hxx.

Member Function Documentation

◆ entry()

template<class Data >
StateFlowBase::Action FdHubWriteFlow< Data >::entry ( )
inlinevirtual

Handles the next incoming entry.

Returns
next action

Implements TypedStateFlow< MessageType, Base >.

Definition at line 228 of file HubDevice.hxx.

Member Data Documentation

◆ port_

template<class Data >
FdHubPortBase* FdHubWriteFlow< Data >::port_

The owning port.

Definition at line 274 of file HubDevice.hxx.


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