SignalSet class is used as a set of signals.
More...
#include "distortos/SignalSet.hpp"
|
using | Bitset = std::bitset< 32 > |
| type of internal bitset for 32 signals More...
|
|
|
int | set (uint8_t signalNumber, bool value) |
| Sets value of single bit. More...
|
|
◆ Bitset
type of internal bitset for 32 signals
◆ SignalSet() [1/4]
constexpr distortos::SignalSet::SignalSet |
( |
uint32_t |
bitmask | ) |
|
|
inlineexplicit |
SignalSet's constructor.
- Parameters
-
[in] | bitmask | is the bit mask used to initialize internal bitset |
◆ SignalSet() [2/4]
constexpr distortos::SignalSet::SignalSet |
( |
const Bitset & |
bitset | ) |
|
|
inlineexplicit |
SignalSet's constructor.
- Parameters
-
[in] | bitset | is a reference to Bitset from which internal bitset is copy-constructed |
◆ SignalSet() [3/4]
constexpr distortos::SignalSet::SignalSet |
( |
const Empty & |
| ) |
|
|
inlineexplicit |
◆ SignalSet() [4/4]
constexpr distortos::SignalSet::SignalSet |
( |
const Full & |
| ) |
|
|
inlineexplicit |
◆ add()
int distortos::SignalSet::add |
( |
const uint8_t |
signalNumber | ) |
|
|
inline |
◆ getBitset()
Bitset distortos::SignalSet::getBitset |
( |
| ) |
const |
|
inline |
- Returns
- copy of internal bitset
◆ remove()
int distortos::SignalSet::remove |
( |
const uint8_t |
signalNumber | ) |
|
|
inline |
◆ set()
int distortos::SignalSet::set |
( |
uint8_t |
signalNumber, |
|
|
bool |
value |
|
) |
| |
|
private |
Sets value of single bit.
- Parameters
-
[in] | signalNumber | is the bit position that will be modified, [0; 31] |
[in] | value | is the new value for selected bit |
- Returns
- 0 on success, error code otherwise:
- EINVAL - signalNumber value is invalid;
◆ test()
std::pair< int, bool > distortos::SignalSet::test |
( |
uint8_t |
signalNumber | ) |
const |
◆ bitset_
Bitset distortos::SignalSet::bitset_ |
|
private |
internal bitset for 32 signals
◆ empty
◆ full
The documentation for this class was generated from the following files: