Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
dcc::DccShortAddress Struct Reference

Strongly typed wrapper representing a short DCC address. More...

#include <Address.hxx>

Public Member Functions

 DccShortAddress (unsigned v)
 Constructor.
 

Public Attributes

uint8_t value
 Address value.
 

Static Public Attributes

static constexpr unsigned ADDRESS_MAX = 127
 Largest valid address.
 

Detailed Description

Strongly typed wrapper representing a short DCC address.

This allows C++ type inference to decide whether a particular value is a long or short address.

Definition at line 48 of file Address.hxx.

Constructor & Destructor Documentation

◆ DccShortAddress()

dcc::DccShortAddress::DccShortAddress ( unsigned  v)
inlineexplicit

Constructor.

Parameters
vis the address value (0<=v<128);

Definition at line 55 of file Address.hxx.

Member Data Documentation

◆ ADDRESS_MAX

constexpr unsigned dcc::DccShortAddress::ADDRESS_MAX = 127
staticconstexpr

Largest valid address.

Definition at line 51 of file Address.hxx.

◆ value

uint8_t dcc::DccShortAddress::value

Address value.

Definition at line 53 of file Address.hxx.


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