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

Interface class for the asynchronous frame write flow. More...

#include <CanIf.hxx>

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

Public Member Functions

 CanFrameWriteFlow (CanIf *service)
 Constructor.
 
Poolpool () OVERRIDE
 
void send (Buffer< CanHubData > *message, unsigned priority=UINT_MAX) OVERRIDE
 Entry point to this 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_
 Parent 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

Interface class for the asynchronous frame write flow.

This flow allows you to write frames to the CAN bus.

Usage: . allocate a buffer for this flow. . fill in buffer->data()->mutable_frame() [*] . call flow->send(buffer)

Definition at line 129 of file CanIf.hxx.

Constructor & Destructor Documentation

◆ CanFrameWriteFlow()

CanFrameWriteFlow::CanFrameWriteFlow ( CanIf service)
inline

Constructor.

Parameters
serviceis the interface that owns this flow.

Definition at line 133 of file CanIf.hxx.

Member Function Documentation

◆ pool()

Pool * CanFrameWriteFlow::pool ( )
virtual
Returns
the buffer pool to use for this flow.

Reimplemented from FlowInterface< Buffer< CanHubData > >.

Definition at line 39 of file CanIf.cxx.

◆ send()

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

Entry point to this flow.

Parameters
messagebuffer to send.
priorityPriority to use when sending.

Implements FlowInterface< Buffer< CanHubData > >.

Definition at line 44 of file CanIf.cxx.

Member Data Documentation

◆ ifCan_

CanIf* CanFrameWriteFlow::ifCan_
private

Parent that owns this flow.

Definition at line 150 of file CanIf.hxx.


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