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,63] or unspecified. More...

#include <SimWheelTypes.hpp>

Public Member Functions

 InputNumber ()
 Construct an unspecified input number.
 
 InputNumber (uint8_t value)
 Cast an integer to a input number.
 
 InputNumber (UNSPECIFIED value)
 Assign an unspecified value.
 
 InputNumber (const InputNumber &number)
 Copy an input number.
 
 operator uint64_t () const
 Typecast this input number to a 64-bit bitmap.
 
 operator uint8_t () const
 Typecast this input number to an unsigned int.
 
bool operator== (const UNSPECIFIED value) const
 Check if this input number is unspecified.
 
bool operator!= (const UNSPECIFIED value) const
 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 uint64_t booked ()
 Get a bitmap of all booked input numbers.
 

Detailed Description

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

Definition at line 251 of file SimWheelTypes.hpp.

Constructor & Destructor Documentation

◆ InputNumber() [1/4]

InputNumber::InputNumber ( )
inline

Construct an unspecified input number.

Definition at line 255 of file SimWheelTypes.hpp.

◆ InputNumber() [2/4]

InputNumber::InputNumber ( uint8_t value)
inline

Cast an integer to a input number.

Parameters
valueInput number in the range [0,63]

Definition at line 265 of file SimWheelTypes.hpp.

◆ InputNumber() [3/4]

InputNumber::InputNumber ( UNSPECIFIED value)
inline

Assign an unspecified value.

Parameters
valueThe unspecified value

Definition at line 277 of file SimWheelTypes.hpp.

◆ InputNumber() [4/4]

InputNumber::InputNumber ( const InputNumber & number)
inline

Copy an input number.

Parameters
numberInput number to be copied

Definition at line 287 of file SimWheelTypes.hpp.

Member Function Documentation

◆ book()

void InputNumber::book ( ) const
inline

Book as in use.

Definition at line 362 of file SimWheelTypes.hpp.

◆ bookAll()

static void InputNumber::bookAll ( )
inlinestatic

Book all input numbers as in use (for testing)

Definition at line 382 of file SimWheelTypes.hpp.

◆ booked() [1/3]

static uint64_t InputNumber::booked ( )
inlinestatic

Get a bitmap of all booked input numbers.

Returns
uint64_t A bitmap

Definition at line 420 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 394 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 406 of file SimWheelTypes.hpp.

◆ operator uint64_t()

InputNumber::operator uint64_t ( ) const
inlineexplicit

Typecast this input number to a 64-bit bitmap.

Returns
A bitmap

Definition at line 297 of file SimWheelTypes.hpp.

◆ operator uint8_t()

InputNumber::operator uint8_t ( ) const
inline

Typecast this input number to an unsigned int.

Returns
uint8_t Input number

Definition at line 310 of file SimWheelTypes.hpp.

◆ operator!=()

bool InputNumber::operator!= ( const UNSPECIFIED value) const
inline

Check if this input number was specified.

Parameters
valueUnspecified value
Returns
true If specified
false otherwise

Definition at line 334 of file SimWheelTypes.hpp.

◆ operator==()

bool InputNumber::operator== ( const UNSPECIFIED value) const
inline

Check if this input number is unspecified.

Parameters
valueUnspecified value
Returns
true If unspecified
false otherwise

Definition at line 325 of file SimWheelTypes.hpp.

◆ unbook()

void InputNumber::unbook ( ) const
inline

Unbook.

Definition at line 372 of file SimWheelTypes.hpp.


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