Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
openlcb::EventConfigEntry Class Reference

Implementation class for event ID configuration entries. More...

#include <ConfigEntry.hxx>

Inheritance diagram for openlcb::EventConfigEntry:
openlcb::NumericConfigEntry< TR > openlcb::ConfigEntryBase openlcb::ConfigReference

Public Member Functions

template<typename T >
constexpr EventConfigEntry (T t)
 
void handle_events (const EventOffsetCallback &fn)
 
- Public Member Functions inherited from openlcb::NumericConfigEntry< TR >
constexpr unsigned end_offset () const
 
TR read (int fd) const
 Reads the data from the configuration file.
 
TR read_or_write_trimmed (int fd, TR min_value, TR max_value)
 Reads data from configuration file obeying a specific trimming.
 
TR read_or_write_default (int fd, TR min_value, TR max_value, TR def_value)
 Reads data from configuration file if the value is valid.
 
void write (int fd, TR d) const
 Writes the data to the configuration file.
 
- Public Member Functions inherited from openlcb::ConfigReference
constexpr ConfigReference (unsigned offset)
 Initializes the config reference from a configuration space offset.
 
constexpr ConfigReference (const ConfigReference &ref)
 Initializes the config reference from an existing config reference.
 
constexpr unsigned offset () const
 

Static Public Member Functions

static constexpr AtomConfigRenderer config_renderer ()
 
- Static Public Member Functions inherited from openlcb::NumericConfigEntry< TR >
static uint8_t endian_convert (uint8_t d)
 Performs endian conversion.
 
static uint16_t endian_convert (uint16_t d)
 Performs endian conversion.
 
static uint32_t endian_convert (uint32_t d)
 Performs endian conversion.
 
static uint64_t endian_convert (uint64_t d)
 Performs endian conversion.
 
static int8_t endian_convert (int8_t d)
 Performs endian conversion.
 
static int16_t endian_convert (int16_t d)
 Performs endian conversion.
 
static int32_t endian_convert (int32_t d)
 Performs endian conversion.
 
static int64_t endian_convert (int64_t d)
 Performs endian conversion.
 
static constexpr unsigned size ()
 Storage bytes occupied by the instance in the config file.
 
static constexpr NumericConfigRenderer config_renderer ()
 
- Static Public Member Functions inherited from openlcb::ConfigEntryBase
template<typename... Args>
static constexpr GroupConfigOptions group_opts (Args... args)
 
static void handle_events (const EventOffsetCallback &fn)
 

Additional Inherited Members

- Protected Member Functions inherited from openlcb::ConfigEntryBase
template<class T >
raw_read (int fd) const
 Reads a given typed variable from the configuration file.
 
template<class T >
void raw_write (int fd, const T &value) const
 Writes a given typed variable to the configuration file.
 
void repeated_read (int fd, void *buf, size_t size) const
 Performs a reliable read from the given FD.
 
void repeated_write (int fd, const void *buf, size_t size) const
 Performs a reliable write to the given FD.
 
- Protected Attributes inherited from openlcb::ConfigReference
unsigned offset_
 zero-based offset from the beginning of the configuration file.
 

Detailed Description

Implementation class for event ID configuration entries.

Definition at line 340 of file ConfigEntry.hxx.

Constructor & Destructor Documentation

◆ EventConfigEntry()

template<typename T >
constexpr openlcb::EventConfigEntry::EventConfigEntry ( t)
inlineconstexpr

Definition at line 344 of file ConfigEntry.hxx.

Member Function Documentation

◆ config_renderer()

static constexpr AtomConfigRenderer openlcb::EventConfigEntry::config_renderer ( )
inlinestaticconstexpr

Definition at line 349 of file ConfigEntry.hxx.

◆ handle_events()

void openlcb::EventConfigEntry::handle_events ( const EventOffsetCallback fn)
inline

Definition at line 354 of file ConfigEntry.hxx.


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