To2BitUint()
Converts a signed preference value to its corresponding 2-bit `uint8_t` value. A positive @p aPrf is mapped to "High Preference", a negative @p aPrf is mapped to "Low Preference", and zero @p aPrf is mapped to "Medium Preference".
From2BitUint()
Converts a 2-bit `uint8_t` value to a signed preference value `kHigh`, `kMedium`, and `kLow`. Only the first two bits (LSB) of @p a2BitUint are used and the rest of the bits are ignored. - `0b01` (or 1) is mapped to `kHigh`. - `0b00` (or 0) is mapped to `kMedium`. - `0b11` (or 3) is mapped to `kLow`. - `0b10` (or 2) is reserved for future and is also mapped to `kMedium` (this complies with RFC-4191 where the reserved value `0b10` MUST be treated as `0b00` for Route Preference).
IsValid()
Indicates whether a given `int8_t` preference value is valid, i.e., whether it has of the three values `kHigh`, `kMedium`, or `kLow`.
Is2BitUintValid()
Indicates whether a given 2-bit `uint8_t` preference value is valid.
ToString()
Converts a given preference to a human-readable string.