|
Open Model Railroad Network (OpenMRN)
|
Helper class in the StateFlow hierarchy. More...
#include <StateFlow.hxx>
Public Types | |
| 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 | |
| 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 Pool * | pool () |
| 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 | |
| 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. | |
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. | |
Helper class in the StateFlow hierarchy.
Merges the typed FlowInterface<Msg> abstract base into the regular stateflow hierarchy.
Definition at line 1297 of file StateFlow.hxx.
| typedef Base::Action TypedStateFlow< MessageType, Base >::Action |
Allows using Action without having StateFlowBase:: prefix in front of it.
Definition at line 1302 of file StateFlow.hxx.
|
inline |
Constructor.
| service | Service that this state flow is part of |
Definition at line 1307 of file StateFlow.hxx.
|
inlinevirtual |
Destructor.
Definition at line 1311 of file StateFlow.hxx.
|
overridepure virtual |
Entry into the StateFlow activity.
Pure virtual which must be defined by derived class.
Implemented in MockSend, dcc::FakeTrackIf, dcc::LocalTrackIf, dcc::LocalTrackIfSelect, ProgrammingTrackBackend, openlcb::RailcomToOpenLCBDebugProxy, dcc::SimpleUpdateLoop, DispatchFlow< MessageType, NUM_PRIO >, DispatchFlow< Buffer< CanHubData >, 1 >, DispatchFlow< Buffer< CanMessageData >, 4 >, DispatchFlow< Buffer< D >, 1 >, DispatchFlow< Buffer< GenMessage >, 4 >, DispatchFlow< Buffer< HubData >, 1 >, DispatchFlow< Buffer< ThrottleCommand >, 1 >, openlcb::AliasAllocator, openlcb::BootloaderClient, openlcb::BootloaderClient::WriteResponseHandler, openlcb::BootloaderPort, openlcb::BroadcastTimeServerDateRolloverFinish, openlcb::BroadcastTimeServerTime, openlcb::BroadcastTimeServerSync, openlcb::BroadcastTimeServerSet, openlcb::BulkAliasAllocator, openlcb::GcCanRoutingHub::DeliveryFlow, openlcb::DatagramService::DatagramDispatcher, openlcb::CanDatagramParser, openlcb::DccAccyProducer, openlcb::DccPacketDebugFlow, openlcb::EventCallerFlow, openlcb::EventIteratorFlow, openlcb::GlobalCanMessageWriteFlow, openlcb::AliasConflictHandler, openlcb::RemoteAliasCacheUpdater, openlcb::AMEQueryHandler, openlcb::FrameToGlobalMessageParser, openlcb::FrameToAddressedMessageParser, openlcb::NodeIdLookupFlow, openlcb::AddressedCanMessageWriteFlow, openlcb::VerifyNodeIdHandler, openlcb::UnhandledAddressedMessageHandler, openlcb::TcpSendFlow, openlcb::MemoryConfigHandler, openlcb::MemoryConfigClient, openlcb::MemoryConfigClient::ResponseFlow, openlcb::MemoryConfigClientWithStream, openlcb::MemoryConfigStreamHandler, openlcb::InitializeFlow, openlcb::ProtocolIdentificationHandler, openlcb::SimpleInfoFlow, openlcb::SNIPHandler, openlcb::SNIPClient, openlcb::StreamReceiverCan, openlcb::StreamSenderCan, openlcb::TractionResponseHandler, openlcb::TractionProxyService::Impl::ProxyRequestFlow, openlcb::TractionThrottle, openlcb::TrainService::Impl::TractionRequestFlow, traction_modem::TxFlow, BufferPort, HubToGcPort, ESPWifiClient, GCAdapter::BinaryToGCMember, GCAdapter::GCToBinaryMember, DisplayPort, FdHubWriteFlow< Data >, FdHubWriteFlow< typename HFlow::value_type >, HubDeviceSelect< HFlow, ReadFlow >::WriteFlow, NumberDumper::Displayer, FdLoggingServer, and withrottle::ServerCommandLoco.
|
inlineprotected |
Definition at line 1353 of file StateFlow.hxx.
|
inlineprotected |
Unrefs the current buffer.
Definition at line 1334 of file StateFlow.hxx.
|
inlineprotected |
For state flows that are operated using invoke_subflow_and_wait this is a way to hand back the buffer to the caller.
message() will be null afterwards.
Definition at line 1346 of file StateFlow.hxx.
|
inlinevirtual |
Sends a message to the state flow for processing.
This function never blocks.
| msg | Message to enqueue |
| priority | the priority at which to enqueue this message. |
Implements FlowInterface< MessageType >.
Definition at line 1321 of file StateFlow.hxx.
|
inlineprotected |
Releases ownership of the current message.
Definition at line 1361 of file StateFlow.hxx.