|
Open Model Railroad Network (OpenMRN)
|
This flow listens to Railcom packets coming from the hub, and if they are correctly decoded, pulses the given GPIO output. More...
#include <RailcomPortDebug.hxx>
Public Member Functions | |
| RailcomToGpioFlow (dcc::RailcomHubFlow *source, const Gpio *output) | |
| Constructor. | |
Public Member Functions inherited from FlowInterface< MessageType > | |
| virtual Pool * | pool () |
| virtual void | send (MessageType *message, unsigned priority=UINT_MAX)=0 |
| Entry point to the flow. | |
| 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. | |
Private Member Functions | |
| void | send (Buffer< dcc::RailcomHubData > *d, unsigned prio) OVERRIDE |
| Incoming railcom data. | |
Private Attributes | |
| dcc::RailcomHubFlow * | parent_ |
| Flow to which we are registered. | |
| const Gpio * | output_ |
| Output gpio to toggle. | |
Additional Inherited Members | |
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. | |
This flow listens to Railcom packets coming from the hub, and if they are correctly decoded, pulses the given GPIO output.
Correctly decoded is defined as having every single byte be a correct 4/8 codepoint.
Definition at line 136 of file RailcomPortDebug.hxx.
|
inline |
Constructor.
| source | is the railcom hub to listen to. |
| output |
Definition at line 142 of file RailcomPortDebug.hxx.
|
inline |
Definition at line 149 of file RailcomPortDebug.hxx.
|
inlineprivate |
Incoming railcom data.
| d | railcom buffer. |
| prio | priority |
Definition at line 159 of file RailcomPortDebug.hxx.
|
private |
Output gpio to toggle.
Definition at line 196 of file RailcomPortDebug.hxx.
|
private |
Flow to which we are registered.
Definition at line 194 of file RailcomPortDebug.hxx.