The ModuleID_t class is a intermediate object generated to contain configurations in a sorted fashion.
More...
#include <ARICHDatabaseTools.h>
|
static constexpr auto | isValidChannel (const int channel) noexcept -> bool |
| isValidChannel defines the range of valid channels. More...
|
|
static auto | isValidSector (const uint8_t sector) noexcept -> bool |
|
|
static constexpr auto | m_gValidSectors |
| m_gValidSectors is a array containing allowed sector ids More...
|
|
static constexpr auto | m_gMaxChannel = int8_t {36} |
| m_gMaxChannel number of maximum channel starting from 0
|
|
|
uint16_t | m_ID |
| m_ID contains the unique sector and channel ids.
|
|
|
static constexpr auto | m_gMemberSize = sizeof(int8_t) * 8 |
| m_gMemberSize size of each sub ids
|
|
static constexpr auto | m_gMemberMask = 0xff |
| m_gMemberMask is a mask to get the desired sub id info.
|
|
|
auto | operator<< (std::ostream &rStream, const ModuleID_t id) -> std::ostream & |
| operator << to print the id using any std::ostream implementation... More...
|
|
The ModuleID_t class is a intermediate object generated to contain configurations in a sorted fashion.
Definition at line 30 of file ARICHDatabaseTools.h.
◆ ModuleID_t() [1/2]
ModuleID_t |
( |
const int8_t |
sector = '0' , |
|
|
const int |
channel = 0 |
|
) |
| |
|
inlinenoexcept |
◆ ModuleID_t() [2/2]
ModuleID_t used to construct from a given integer that has a valid module ID.
Note: An invalid ID causes an undefined behaviour!
- Parameters
-
Definition at line 76 of file ARICHDatabaseTools.h.
◆ getChannel()
auto getChannel |
( |
| ) |
const -> int8_t
|
|
inlinenoexcept |
◆ getNumbering()
auto getNumbering |
( |
| ) |
const -> int
|
|
inlinenoexcept |
getNumbering returns the channel number Ax = 1+x; Bx = 36 + x; Cx = 72 + x; Dx = 108 + x; Note: an invalid id return an invalid number!!!
- Returns
- channel number increamened by an offset determined by section ID.
- See also
- isValidID()
Definition at line 114 of file ARICHDatabaseTools.h.
◆ getSector()
auto getSector |
( |
| ) |
const -> int8_t
|
|
inlinenoexcept |
◆ isValidChannel()
static constexpr auto isValidChannel |
( |
const int |
channel | ) |
-> bool
|
|
inlinestaticconstexprnoexcept |
isValidChannel defines the range of valid channels.
- Parameters
-
- Returns
- true if channel id/number is in the valid range otherwise false.
Definition at line 49 of file ARICHDatabaseTools.h.
◆ isValidID()
auto isValidID |
( |
| ) |
const -> bool
|
|
inlinenoexcept |
◆ operator!=()
comparison operator!=
- Note
- if using c++17 replace thi one with <=> operator
Definition at line 145 of file ARICHDatabaseTools.h.
◆ operator++() [1/2]
precrement operator ++X
- Note
- does not check the module range!!! overflow is allowed!!!
Definition at line 190 of file ARICHDatabaseTools.h.
◆ operator++() [2/2]
postcrement operator X++
- Note
- does not check the module range!!! overflow is allowed!!!
Definition at line 202 of file ARICHDatabaseTools.h.
◆ operator<()
auto operator< |
( |
const ModuleID_t & |
rOther | ) |
const -> bool
|
|
inlinenoexcept |
comparison operator<
- Note
- if using c++17 replace thi one with <=> operator
Definition at line 154 of file ARICHDatabaseTools.h.
◆ operator<=()
auto operator<= |
( |
const ModuleID_t & |
rOther | ) |
const -> bool
|
|
inlinenoexcept |
comparison operator<=
- Note
- if using c++17 replace thi one with <=> operator
Definition at line 163 of file ARICHDatabaseTools.h.
◆ operator==()
auto operator== |
( |
const ModuleID_t & |
rOther | ) |
const -> bool
|
|
inlinenoexcept |
comparison operator==
- Note
- if using c++17 replace thi one with <=> operator
Definition at line 136 of file ARICHDatabaseTools.h.
◆ operator>()
auto operator> |
( |
const ModuleID_t & |
rOther | ) |
const -> bool
|
|
inlinenoexcept |
comparison operator>
- Note
- if using c++17 replace thi one with <=> operator
Definition at line 172 of file ARICHDatabaseTools.h.
◆ operator>=()
auto operator>= |
( |
const ModuleID_t & |
rOther | ) |
const -> bool
|
|
inlinenoexcept |
comparison operator>=
- Note
- if using c++17 replace thi one with <=> operator
Definition at line 181 of file ARICHDatabaseTools.h.
◆ operator<<
auto operator<< |
( |
std::ostream & |
rStream, |
|
|
const ModuleID_t |
id |
|
) |
| -> std::ostream&
|
|
friend |
operator << to print the id using any std::ostream implementation...
- Parameters
-
Definition at line 125 of file ARICHDatabaseTools.h.
◆ m_gValidSectors
constexpr std::array< uint8_t, 4 > m_gValidSectors |
|
staticconstexpr |
Initial value:=
std::array<uint8_t, 4>( {{'A', 'B', 'C', 'D'}})
m_gValidSectors is a array containing allowed sector ids
Definition at line 36 of file ARICHDatabaseTools.h.
The documentation for this class was generated from the following file: