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

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

#include <Address.hxx>

Public Member Functions

 DccLongAddress (unsigned v)
 Constructor.
 

Public Attributes

uint16_t value
 Address value.
 

Static Public Attributes

static constexpr unsigned ADDRESS_MAX = 10239
 Largest valid address.
 

Detailed Description

Strongly typed wrapper representing a long DCC address.

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

Definition at line 65 of file Address.hxx.

Constructor & Destructor Documentation

◆ DccLongAddress()

dcc::DccLongAddress::DccLongAddress ( unsigned  v)
inlineexplicit

Constructor.

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

Definition at line 72 of file Address.hxx.

Member Data Documentation

◆ ADDRESS_MAX

constexpr unsigned dcc::DccLongAddress::ADDRESS_MAX = 10239
staticconstexpr

Largest valid address.

Definition at line 68 of file Address.hxx.

◆ value

uint16_t dcc::DccLongAddress::value

Address value.

Definition at line 70 of file Address.hxx.


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