Kea 2.7.5
|
Encapsulates PSID length. More...
#include <option_data_types.h>
Public Member Functions | |
PSIDLen () | |
Default constructor. | |
PSIDLen (const uint8_t psid_len) | |
Constructor. | |
uint8_t | asUint8 () const |
Returns PSID length as uint8_t value. | |
unsigned int | asUnsigned () const |
Returns PSID length as unsigned int. | |
Encapsulates PSID length.
Definition at line 204 of file option_data_types.h.
|
inline |
Default constructor.
Definition at line 208 of file option_data_types.h.
|
inlineexplicit |
Constructor.
It checks that the specified value is not greater than 16, which is a maximum value for the PSID length.
psid_len | PSID length. |
isc::OutOfRange | If specified PSID length is greater than 16. |
Definition at line 217 of file option_data_types.h.
References asUnsigned(), and isc_throw.
|
inline |
Returns PSID length as uint8_t value.
Definition at line 226 of file option_data_types.h.
|
inline |
Returns PSID length as unsigned int.
This is useful to convert the value to a numeric type which can be logged directly. Note that the uint8_t value has to be cast to an integer value to be logged as a number. This is because the uint8_t is often implemented as char, in which case directly logging an uint8_t value prints a character rather than a number.
Definition at line 238 of file option_data_types.h.
Referenced by PSIDLen().