Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
dcc::RailcomPrintfFlow Class Reference

Registers as a member ofthe railcom hub. More...

#include <RailcomPortDebug.hxx>

Inheritance diagram for dcc::RailcomPrintfFlow:
FlowInterface< MessageType >

Public Member Functions

 RailcomPrintfFlow (dcc::RailcomHubFlow *source)
 Constructor.
 
- Public Member Functions inherited from FlowInterface< MessageType >
virtual Poolpool ()
 
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

string display_railcom_data (const uint8_t *data, int len)
 Helper function to turn some railcom data into string.
 
void send (Buffer< dcc::RailcomHubData > *d, unsigned prio) OVERRIDE
 Incoming railcom data.
 

Private Attributes

dcc::RailcomHubFlowparent_
 Flow to which we are registered.
 

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.
 

Detailed Description

Registers as a member ofthe railcom hub.

Formats all incoming railcom packet in a human-visible way, and puts into the logging facility.

Definition at line 46 of file RailcomPortDebug.hxx.

Constructor & Destructor Documentation

◆ RailcomPrintfFlow()

dcc::RailcomPrintfFlow::RailcomPrintfFlow ( dcc::RailcomHubFlow source)
inline

Constructor.

Parameters
sourceis the railcom hub to listen to.

Definition at line 50 of file RailcomPortDebug.hxx.

◆ ~RailcomPrintfFlow()

dcc::RailcomPrintfFlow::~RailcomPrintfFlow ( )
inline

Definition at line 56 of file RailcomPortDebug.hxx.

Member Function Documentation

◆ display_railcom_data()

string dcc::RailcomPrintfFlow::display_railcom_data ( const uint8_t *  data,
int  len 
)
inlineprivate

Helper function to turn some railcom data into string.

Parameters
datais the pointer to the data.
lentells how many bytes are there valid.
Returns
textual representation of that data (debugging).

Definition at line 65 of file RailcomPortDebug.hxx.

◆ send()

void dcc::RailcomPrintfFlow::send ( Buffer< dcc::RailcomHubData > *  d,
unsigned  prio 
)
inlineprivate

Incoming railcom data.

Parameters
drailcom buffer.
priopriority

Definition at line 109 of file RailcomPortDebug.hxx.

Member Data Documentation

◆ parent_

dcc::RailcomHubFlow* dcc::RailcomPrintfFlow::parent_
private

Flow to which we are registered.

Definition at line 130 of file RailcomPortDebug.hxx.


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