Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
SelectBufferInfo< Buffer< CanHubData > > Struct Reference

Partial template specialization of buffer traits for CAN frame-typed hubs. More...

#include <HubDeviceSelect.hxx>

Public Types

typedef Buffer< CanHubDatabuffer_type
 Helper type for declaring the payload buffer type.
 

Static Public Member Functions

static void resize_target (buffer_type *b)
 CAN buffers do not need to be resized.
 
static void check_target_size (buffer_type *b, int remaining)
 a CAN buffer is only okay if the entire buffer was read in in one go.
 
static bool needs_read_fully ()
 
static bool limit_input ()
 

Detailed Description

Partial template specialization of buffer traits for CAN frame-typed hubs.

The implementation here is equivalent to SelectBufferInfo<Hubcontainer<StructContainer<T>>> but the c++ template inference cannot figure this out.

Definition at line 125 of file HubDeviceSelect.hxx.

Member Typedef Documentation

◆ buffer_type

typedef Buffer<CanHubData> SelectBufferInfo< Buffer< CanHubData > >::buffer_type

Helper type for declaring the payload buffer type.

Definition at line 127 of file HubDeviceSelect.hxx.

Member Function Documentation

◆ check_target_size()

static void SelectBufferInfo< Buffer< CanHubData > >::check_target_size ( buffer_type b,
int  remaining 
)
inlinestatic

a CAN buffer is only okay if the entire buffer was read in in one go.

Parameters
bis the filled buffer,
remainingtells how many bytes are empty.

Definition at line 136 of file HubDeviceSelect.hxx.

◆ limit_input()

static bool SelectBufferInfo< Buffer< CanHubData > >::limit_input ( )
inlinestatic
Returns
true if the input needs to be throttled.

Definition at line 148 of file HubDeviceSelect.hxx.

◆ needs_read_fully()

static bool SelectBufferInfo< Buffer< CanHubData > >::needs_read_fully ( )
inlinestatic
Returns
true because CAN buffers always need to be completely read before forwarding to lower levels.

Definition at line 142 of file HubDeviceSelect.hxx.

◆ resize_target()

static void SelectBufferInfo< Buffer< CanHubData > >::resize_target ( buffer_type b)
inlinestatic

CAN buffers do not need to be resized.

Definition at line 130 of file HubDeviceSelect.hxx.


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