Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
openlcb::TractionProxyService::Impl::ProxyRequestFlow Class Reference

State flow handling incoming OpenLCB messages of MTI == Traction proxy Request. More...

Inheritance diagram for openlcb::TractionProxyService::Impl::ProxyRequestFlow:
openlcb::IncomingMessageStateFlow StateFlow< Buffer< GenMessage >, QList< 4 > > TypedStateFlow< MessageType, Base > FlowInterface< MessageType >

Public Member Functions

 ProxyRequestFlow (Impl *impl)
 
- Public Member Functions inherited from openlcb::IncomingMessageStateFlow
 IncomingMessageStateFlow (If *iface)
 
Ififace ()
 
GenMessagenmsg ()
 Returns the NMRAnet message we received.
 
- Public Member Functions inherited from StateFlow< Buffer< GenMessage >, QList< 4 > >
 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.
 

Protected Member Functions

Action entry () OVERRIDE
 Entry into the StateFlow activity.
 
Action handle_cmd ()
 
Action handle_manage ()
 
Action handle_allocate ()
 
size_t size ()
 Returns the size of the incoming message payload.
 
const uint8_t * payload ()
 Returns the incoming message payload (bytes).
 
Action reject_permanent ()
 Rejects the incoming message with a permanent error.
 
- 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.
 

Private Attributes

Implimpl_
 
Buffer< GenMessage > * response_
 
unsigned reserved_: 1
 

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.
 

Detailed Description

State flow handling incoming OpenLCB messages of MTI == Traction proxy Request.

Definition at line 107 of file TractionProxy.cxx.

Constructor & Destructor Documentation

◆ ProxyRequestFlow()

openlcb::TractionProxyService::Impl::ProxyRequestFlow::ProxyRequestFlow ( Impl impl)
inline

Definition at line 110 of file TractionProxy.cxx.

◆ ~ProxyRequestFlow()

openlcb::TractionProxyService::Impl::ProxyRequestFlow::~ProxyRequestFlow ( )
inline

Definition at line 119 of file TractionProxy.cxx.

Member Function Documentation

◆ entry()

Action openlcb::TractionProxyService::Impl::ProxyRequestFlow::entry ( )
inlineprotectedvirtual

Entry into the StateFlow activity.

Pure virtual which must be defined by derived class.

Returns
function pointer to next state

Implements TypedStateFlow< MessageType, Base >.

Definition at line 126 of file TractionProxy.cxx.

◆ handle_allocate()

Action openlcb::TractionProxyService::Impl::ProxyRequestFlow::handle_allocate ( )
inlineprotected

Definition at line 227 of file TractionProxy.cxx.

◆ handle_cmd()

Action openlcb::TractionProxyService::Impl::ProxyRequestFlow::handle_cmd ( )
inlineprotected

Definition at line 150 of file TractionProxy.cxx.

◆ handle_manage()

Action openlcb::TractionProxyService::Impl::ProxyRequestFlow::handle_manage ( )
inlineprotected

Definition at line 182 of file TractionProxy.cxx.

◆ payload()

const uint8_t * openlcb::TractionProxyService::Impl::ProxyRequestFlow::payload ( )
inlineprotected

Returns the incoming message payload (bytes).

Definition at line 272 of file TractionProxy.cxx.

◆ reject_permanent()

Action openlcb::TractionProxyService::Impl::ProxyRequestFlow::reject_permanent ( )
inlineprotected

Rejects the incoming message with a permanent error.

Definition at line 278 of file TractionProxy.cxx.

◆ size()

size_t openlcb::TractionProxyService::Impl::ProxyRequestFlow::size ( )
inlineprotected

Returns the size of the incoming message payload.

Definition at line 266 of file TractionProxy.cxx.

Member Data Documentation

◆ impl_

Impl* openlcb::TractionProxyService::Impl::ProxyRequestFlow::impl_
private

Definition at line 291 of file TractionProxy.cxx.

◆ reserved_

unsigned openlcb::TractionProxyService::Impl::ProxyRequestFlow::reserved_
private

Definition at line 293 of file TractionProxy.cxx.

◆ response_

Buffer<GenMessage>* openlcb::TractionProxyService::Impl::ProxyRequestFlow::response_
private

Definition at line 292 of file TractionProxy.cxx.


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