Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
CanFrameReadFlow Class Reference

This flow is responsible for taking data from the can HUB and sending it to the IfCan's dispatcher. More...

#include <CanIf.hxx>

Inheritance diagram for CanFrameReadFlow:
FlowInterface< Buffer< CanHubData > >

Public Member Functions

 CanFrameReadFlow (CanIf *service)
 Constructor.
 
Poolpool () OVERRIDE
 
void send (Buffer< CanHubData > *message, unsigned priority=UINT_MAX) OVERRIDE
 Entry point to the flow.
 
- Public Member Functions inherited from FlowInterface< Buffer< CanHubData > >
virtual Buffer< CanHubData > * type_helper ()
 This function is never user in the code, but GDB can use it to infer the correct message types.
 
Buffer< CanHubData > * 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 Attributes

CanIfifCan_
 Interface that owns this flow.
 

Additional Inherited Members

- Public Types inherited from FlowInterface< Buffer< CanHubData > >
typedef Buffer< CanHubDatamessage_type
 Stores the message template type for external reference.
 
- Static Public Member Functions inherited from FlowInterface< Buffer< CanHubData > >
static Buffer< CanHubData > * cast_alloc (QMember *entry)
 Down casts and initializes an asynchronous allocation result to the appropriate flow's buffer type.
 

Detailed Description

This flow is responsible for taking data from the can HUB and sending it to the IfCan's dispatcher.

Definition at line 155 of file CanIf.hxx.

Constructor & Destructor Documentation

◆ CanFrameReadFlow()

CanFrameReadFlow::CanFrameReadFlow ( CanIf service)
inline

Constructor.

Parameters
servicespecifies which thread to execute this state flow on.

Definition at line 160 of file CanIf.hxx.

Member Function Documentation

◆ pool()

Pool * CanFrameReadFlow::pool ( )
virtual
Returns
the buffer pool to use for incoming can frames. This is the dispatcher's buffer pool, by default the main buffer pool.

Reimplemented from FlowInterface< Buffer< CanHubData > >.

Definition at line 52 of file CanIf.cxx.

◆ send()

void CanFrameReadFlow::send ( Buffer< CanHubData > *  message,
unsigned  priority = UINT_MAX 
)
virtual

Entry point to the flow.

Parameters
messageincoming buffer.
prioritypriority to assign it to
Todo:
(balazs.racz): Figure out what priority the new message should be at.

Implements FlowInterface< Buffer< CanHubData > >.

Definition at line 61 of file CanIf.cxx.

Member Data Documentation

◆ ifCan_

CanIf* CanFrameReadFlow::ifCan_
private

Interface that owns this flow.

Definition at line 179 of file CanIf.hxx.


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