OpenSourceSimWheelESP32
Open-source wireless steering wheel/button box for ESP32 boards
Loading...
Searching...
No Matches
InputNumber Struct Reference

Firmware-defined input numbers in the range [0,127] or unspecified. More...

#include <SimWheelTypes.hpp>

Public Member Functions

constexpr InputNumber () noexcept
 Construct an unspecified input number.
 
constexpr InputNumber (uint8_t value)
 Cast an integer to a input number.
 
constexpr InputNumber (UNSPECIFIED value) noexcept
 Assign an unspecified value.
 
constexpr InputNumber (const InputNumber &number)=default
 Copy constructor (default)
 
constexpr InputNumber (InputNumber &&number)=default
 Move constructor (default)
 
constexpr InputNumberoperator= (const InputNumber &number)=default
 Copy-assignment (default)
 
constexpr InputNumberoperator= (InputNumber &&number)=default
 Move-assignment (default)
 
constexpr operator uint128_t () const
 Typecast to 128-bit bitmap.
 
constexpr operator uint8_t () const
 Typecast this input number to an unsigned int.
 
bool constexpr operator== (const UNSPECIFIED value) const
 Check if this input number is unspecified.
 
bool constexpr operator!= (const UNSPECIFIED value) const noexcept
 Check if this input number was specified.
 
void book () const
 Book as in use.
 
void unbook () const
 Unbook.
 

Static Public Member Functions

static void bookAll ()
 Book all input numbers as in use (for testing)
 
static bool booked (InputNumber inputNumber)
 Check if an input number is booked.
 
static bool booked (uint8_t inputNumber)
 Check if an input number is booked.
 
static uint128_t booked ()
 Get a bitmap of all booked input numbers.
 
static void unbook (uint8_t inputNumber)
 Book an input number as in use.
 
static void book (uint8_t inputNumber)
 Unbook.
 

Detailed Description

Firmware-defined input numbers in the range [0,127] or unspecified.

Definition at line 497 of file SimWheelTypes.hpp.

Constructor & Destructor Documentation

◆ InputNumber() [1/5]

InputNumber::InputNumber ( )
inlineconstexprnoexcept

Construct an unspecified input number.

Definition at line 501 of file SimWheelTypes.hpp.

◆ InputNumber() [2/5]

InputNumber::InputNumber ( uint8_t value)
inlineconstexpr

Cast an integer to a input number.

Parameters
valueInput number in the range [0,127]

Definition at line 511 of file SimWheelTypes.hpp.

◆ InputNumber() [3/5]

InputNumber::InputNumber ( UNSPECIFIED value)
inlineconstexprnoexcept

Assign an unspecified value.

Parameters
valueThe unspecified value

Definition at line 523 of file SimWheelTypes.hpp.

◆ InputNumber() [4/5]

InputNumber::InputNumber ( const InputNumber & number)
constexprdefault

Copy constructor (default)

Parameters
numberInput number to be copied

◆ InputNumber() [5/5]

InputNumber::InputNumber ( InputNumber && number)
constexprdefault

Move constructor (default)

Parameters
numberInput number to be moved

Member Function Documentation

◆ book() [1/2]

void InputNumber::book ( ) const
inline

Book as in use.

Definition at line 634 of file SimWheelTypes.hpp.

◆ book() [2/2]

static void InputNumber::book ( uint8_t inputNumber)
inlinestatic

Unbook.

Parameters
inputNumberInput number

Definition at line 703 of file SimWheelTypes.hpp.

◆ bookAll()

static void InputNumber::bookAll ( )
inlinestatic

Book all input numbers as in use (for testing)

Definition at line 652 of file SimWheelTypes.hpp.

◆ booked() [1/3]

static uint128_t InputNumber::booked ( )
inlinestatic

Get a bitmap of all booked input numbers.

Returns
uint128_t A bitmap

Definition at line 686 of file SimWheelTypes.hpp.

◆ booked() [2/3]

static bool InputNumber::booked ( InputNumber inputNumber)
inlinestatic

Check if an input number is booked.

Parameters
inputNumberInput number to check
Returns
true If booked
false If not booked

Definition at line 664 of file SimWheelTypes.hpp.

◆ booked() [3/3]

static bool InputNumber::booked ( uint8_t inputNumber)
inlinestatic

Check if an input number is booked.

Parameters
inputNumberInput number to check
Returns
true If booked
false If not booked

Definition at line 676 of file SimWheelTypes.hpp.

◆ operator uint128_t()

InputNumber::operator uint128_t ( ) const
inlineexplicitconstexpr

Typecast to 128-bit bitmap.

Returns
uint128_t Bitmap

Definition at line 562 of file SimWheelTypes.hpp.

◆ operator uint8_t()

InputNumber::operator uint8_t ( ) const
inlineconstexpr

Typecast this input number to an unsigned int.

Returns
uint8_t Input number

Definition at line 572 of file SimWheelTypes.hpp.

◆ operator!=()

bool constexpr InputNumber::operator!= ( const UNSPECIFIED value) const
inlineconstexprnoexcept

Check if this input number was specified.

Parameters
valueUnspecified value
Returns
true If specified
false otherwise

Definition at line 596 of file SimWheelTypes.hpp.

◆ operator=() [1/2]

InputNumber & InputNumber::operator= ( const InputNumber & number)
constexprdefault

Copy-assignment (default)

Parameters
numberInput number to be copied
Returns
constexpr InputNumer&

◆ operator=() [2/2]

InputNumber & InputNumber::operator= ( InputNumber && number)
constexprdefault

Move-assignment (default)

Parameters
numberInput number to be moved

◆ operator==()

bool constexpr InputNumber::operator== ( const UNSPECIFIED value) const
inlineconstexpr

Check if this input number is unspecified.

Parameters
valueUnspecified value
Returns
true If unspecified
false otherwise

Definition at line 584 of file SimWheelTypes.hpp.

◆ unbook() [1/2]

void InputNumber::unbook ( ) const
inline

Unbook.

Definition at line 643 of file SimWheelTypes.hpp.

◆ unbook() [2/2]

static void InputNumber::unbook ( uint8_t inputNumber)
inlinestatic

Book an input number as in use.

Parameters
inputNumberInput Number

Definition at line 693 of file SimWheelTypes.hpp.


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