Zserio C++ runtime library
1.1.0
Built for Zserio 2.15.0
|
Functions | |
uint8_t | numBits (uint64_t numValues) |
template<typename BITMASK1 , typename BITMASK2 > | |
bool | isSet (BITMASK1 bitmaskValue, BITMASK2 requiredMask) |
bool zserio::builtin::isSet | ( | BITMASK1 | bitmaskValue, |
BITMASK2 | requiredMask | ||
) |
Checks whether the requiredMask is set within the bitmaskValue.
This method implements zserio built-in operator isset.
bitmaskValue | Bitmask value to check. |
requiredMask | Mask to use. |
Definition at line 23 of file BuiltInOperators.h.
uint8_t zserio::builtin::numBits | ( | uint64_t | numValues | ) |
Gets the minimum number of bits required to encode numValues
different values.
This method implements Zserio built-in operator numbits
.
Note: Please note that this method returns 0 if numValues
is zero.
Examples: numbits(0) = 0
numbits(1) = 1
numbits(2) = 1
numbits(3) = 2
numbits(4) = 2
numbits(8) = 3
numbits(16) = 4
numValues | The number of different values from which to calculate number of bits. |
numValues
different values. Definition at line 9 of file BuiltInOperators.cpp.