Namespaces
Enumerations
enum DataLengthType
| Name | Value |
|---|---|
| kWithUint8Length | 0 |
| kWithUint16Length | 1 |
Type is used as the template parameter in `Data` and `MutableData` to indicate the `uint` type to
use for the data length.
Defined at line 56 of file ../../third_party/openthread/src/core/common/data.hpp
enum StringMatchMode
| Name | Value |
|---|---|
| kStringExactMatch | 0 |
| kStringCaseInsensitiveMatch | 1 |
Represents comparison mode when matching strings.
Defined at line 62 of file ../../third_party/openthread/src/core/common/string.hpp
enum StringEncodingCheck
| Name | Value |
|---|---|
| kStringNoEncodingCheck | 0 |
| kStringCheckUtf8Encoding | 1 |
Represents string encoding check when copying string.
Defined at line 71 of file ../../third_party/openthread/src/core/common/string.hpp
Records
-
class BinarySearch -
class Clearable -
class CoreType -
class CoreType -
class CoreType -
class CoreType -
class CoreType -
class Data -
class DataUtils -
class Equatable -
class GetProvider -
class Instance -
class InstanceLocator -
class InstanceLocatorInit -
class MappedEnum -
class MaxPowerTable -
class MutableData -
class NonCopyable -
class NumericLimits -
class NumericLimits -
class NumericLimits -
class NumericLimits -
class NumericLimits -
class NumericLimits -
class NumericLimits -
class NumericLimits -
class NumericLimits -
class Radio -
class SerialNumber -
class String -
class StringWriter -
class Stringify -
class Time -
class Unequatable
Functions
-
template <typename Type>const Type & AsConst (Type & aObject)Casts a given non-const reference to a const reference.
Parameters
aObject [in] A non-const reference to an object.Template Parameters
Type The reference type.Defined at line 50 of file ../../third_party/openthread/src/core/common/const_cast.hpp
-
uint16_t Swap16 (uint16_t v)Defined at line 52 of file ../../third_party/openthread/src/core/common/encoding.hpp
-
template <typename ObjectType>void ClearAllBytes (ObjectType & aObject)Clears (sets to zero) all bytes of a given object.
Parameters
aObject [in] A reference to the object of type `ObjectType` to clear all its bytes.Template Parameters
ObjectType The object type.Defined at line 52 of file ../../third_party/openthread/src/core/common/clearable.hpp
-
template <typename Type>Type Min (Type aFirst, Type aSecond)This template function returns the minimum of two given values.
Uses `operator
<
` to compare the values.
Parameters
aFirst [in] The first value.aSecond [in] The second value.Template Parameters
Type The value type.Defined at line 54 of file ../../third_party/openthread/src/core/common/num_utils.hpp
-
uint32_t Swap32 (uint32_t v)Defined at line 57 of file ../../third_party/openthread/src/core/common/encoding.hpp
-
template <typename Type>const Type * AsConst (Type * aPointer)Casts a given non-const pointer to a const pointer.
Parameters
aPointer [in] A non-const pointer to an object.Template Parameters
Type The pointer type.Defined at line 61 of file ../../third_party/openthread/src/core/common/const_cast.hpp
-
uint64_t Swap64 (uint64_t v)Defined at line 63 of file ../../third_party/openthread/src/core/common/encoding.hpp
-
template <typename Type>typename CoreType<Type>::Type & AsCoreType (Type * aObject)Converts a pointer to public OT type (C struct) to the corresponding core C++ type reference.
Parameters
aObject [in] A pointer to the object to convert.Template Parameters
Type The public OT type to convert.Defined at line 64 of file ../../third_party/openthread/src/core/common/as_core_type.hpp
-
Instance & GetSingleInstance ()Gets the single OpenThread instance.
Defined at line 66 of file ../../third_party/openthread/src/core/common/locator.hpp
-
template <typename Type>Type Max (Type aFirst, Type aSecond)This template function returns the maximum of two given values.
Uses `operator
<
` to compare the values.
Parameters
aFirst [in] The first value.aSecond [in] The second value.Template Parameters
Type The value type.Defined at line 68 of file ../../third_party/openthread/src/core/common/num_utils.hpp
-
template <typename Type>Type & AsNonConst (const Type & aObject)Casts a given const reference to a non-const reference.
Parameters
aObject [in] A const reference to an object.Template Parameters
Type The reference type.Defined at line 72 of file ../../third_party/openthread/src/core/common/const_cast.hpp
-
template <typename UintType>uint8_t CountBitsInMask (UintType aMask)Counts the number of `1` bits in the binary representation of a given unsigned int bit-mask value.
Parameters
aMask [in] A bit mask.Template Parameters
UintType The unsigned int type (MUST be `uint8_t`, `uint16_t`, `uint32_t`, or `uint64_t`).Defined at line 72 of file ../../third_party/openthread/src/core/common/bit_utils.hpp
-
uint32_t Reverse32 (uint32_t v)Defined at line 75 of file ../../third_party/openthread/src/core/common/encoding.hpp
-
template <typename Type>const typename CoreType<Type>::Type & AsCoreType (const Type * aObject)Converts a const pointer to public OT type (C struct) to the corresponding core C++ type reference.
Parameters
aObject [in] A const pointer to the object to convert.Template Parameters
Type The public OT type to convert.Defined at line 80 of file ../../third_party/openthread/src/core/common/as_core_type.hpp
-
template <typename Type>Type * AsNonConst (const Type * aPointer)Casts a given const pointer to a non-const pointer.
Parameters
aPointer [in] A const pointer to an object.Template Parameters
Type The pointer type.Defined at line 83 of file ../../third_party/openthread/src/core/common/const_cast.hpp
-
template <typename Type>Type Clamp (Type aValue, Type aMin, Type aMax)This template function returns clamped version of a given value to a given closed range [min, max].
Uses `operator
<
` to compare the values. The behavior is undefined if the value of
is greater than
Parameters
aValue [in] The value to clamp.aMin [in] The minimum value.aMax [in] The maximum value.Template Parameters
Type The value type.Defined at line 83 of file ../../third_party/openthread/src/core/common/num_utils.hpp
-
template <typename Type>typename CoreType<Type>::Type * AsCoreTypePtr (Type * aObject)Converts a pointer to public OT type (C struct) to the corresponding core C++ type pointer.
Parameters
aObject [in] A pointer to the object to convert.Template Parameters
Type The public OT type to convert.Defined at line 96 of file ../../third_party/openthread/src/core/common/as_core_type.hpp
-
template <typename UintType>uint8_t ClampToUint8 (UintType aValue)This template function returns a clamped version of given integer to a `uint8_t`.
If
is greater than max value of a `uint8_t`, the max value is returned.
Parameters
aValue [in] The value to clamp.Template Parameters
UintType The value type (MUST be `uint16_t`, `uint32_t`, or `uint64_t`).Defined at line 101 of file ../../third_party/openthread/src/core/common/num_utils.hpp
-
template <typename Type>const typename CoreType<Type>::Type * AsCoreTypePtr (const Type * aObject)Converts a const pointer to public OT type (C struct) to the corresponding core C++ type pointer.
Parameters
aObject [in] A pointer to the object to convert.Template Parameters
Type The public OT type to convert.Defined at line 110 of file ../../third_party/openthread/src/core/common/as_core_type.hpp
-
template <typename UintType>void SetBit (UintType & aBits, uint8_t aBitOffset)Sets the specified bit in a given integer to 1.
Parameters
aBits [in,out] A reference to the integer to modify.aBitOffset [in] The offset of the bit to set (0 corresponds to the least-significant bit).Template Parameters
UintType The value type (MUST be `uint8_t`, `uint16_t`, `uint32_t`, or `uint64_t`).Defined at line 113 of file ../../third_party/openthread/src/core/common/bit_utils.hpp
-
template <typename UintType>uint16_t ClampToUint16 (UintType aValue)This template function returns a clamped version of given integer to a `uint16_t`.
If
is greater than max value of a `uint16_t`, the max value is returned.
Parameters
aValue [in] The value to clamp.Template Parameters
UintType The value type (MUST be `uint32_t`, or `uint64_t`).Defined at line 119 of file ../../third_party/openthread/src/core/common/num_utils.hpp
-
template <typename UintType>void ClearBit (UintType & aBits, uint8_t aBitOffset)Clears the specified bit in a given integer to 0.
Parameters
aBits [in,out] A reference to the integer to modify.aBitOffset [in] The offset of the bit to clear (0 corresponds to the least-significant bit).Template Parameters
UintType The value type (MUST be `uint8_t`, `uint16_t`, `uint32_t`, or `uint64_t`).Defined at line 128 of file ../../third_party/openthread/src/core/common/bit_utils.hpp
-
template <typename UintType>uint8_t BitOffsetOfMask (UintType aMask)Gets the offset of the lowest non-zero bit in a given mask.
Parameters
aMask [in] The bitmask to inspect (MUST NOT be zero).Template Parameters
UintType The value type (MUST be `uint8_t`, `uint16_t`, `uint32_t`, or `uint64_t`).Defined at line 184 of file ../../third_party/openthread/src/core/common/bit_utils.hpp
-
template <uint16_t kSize>Error StringCopy (char (&)[kSize] aTargetBuffer, const char * aSource, StringEncodingCheck aEncodingCheck)Copies a string into a given target buffer with a given size if it fits.
Parameters
aTargetBuffer [out] A reference to the target buffer array to copy into.aSource [in] A pointer to null-terminated string to copy from. Can be `nullptr` which treated as "".aEncodingCheck [in] Specifies the encoding format check (e.g., UTF-8) to perform.Template Parameters
kSize The size of buffer.Defined at line 198 of file ../../third_party/openthread/src/core/common/string.hpp
-
uint16_t StringLength (const char * aString, uint16_t aMaxLength)Returns the number of characters that precede the terminating null character.
Parameters
aString [in] A pointer to the string.aMaxLength [in] The maximum length in bytes. -
const char * ErrorToString (Error aError)Converts an `Error` into a string.
Parameters
aError [in] An error. -
uint16_t CountMatchingBits (const uint8_t * aFirst, const uint8_t * aSecond, uint16_t aMaxBitLength)Counts the number of consecutive matching bits between two byte arrays.
This function compares two byte arrays bit-by-bit, starting from the most significant bit (MSB) of the first byte
in each array. The comparison proceeds until a mismatch is found or until a maximum of
bits have
been successfully compared.
It is the caller's responsibility to ensure that both
and
point to buffers large enough to
contain at least
bits.
Parameters
aFirst [in] A pointer to the first byte array to compare.aSecond [in] A pointer to the second byte array to compare.aMaxBitLength [in] The maximum number of bits to compare from the start of the arrays.Returns
The number of consecutive matching bits.
-
template <typename EnumType>const typename MappedEnum<EnumType>::Type MapEnum (EnumType aValue)Convert an enumeration type value to a related enumeration type value.
Parameters
aValue [in] The enumeration value to convertDefined at line 134 of file ../../third_party/openthread/src/core/common/as_core_type.hpp
-
template <typename IntType>int8_t ClampToInt8 (IntType aValue)Returns a clamped version of given integer to a `int8_t`.
If
is smaller than min value of a `int8_t`, the min value of `int8_t` is returned.
If
is larger than max value of a `int8_t`, the max value of `int8_t` is returned.
Parameters
aValue [in] The value to clamp.Template Parameters
IntType The value type (MUST be `int16_t`, `int32_t`, or `int64_t`).Defined at line 139 of file ../../third_party/openthread/src/core/common/num_utils.hpp
-
template <typename UintType>bool GetBit (UintType aBits, uint8_t aBitOffset)Gets the value of the specified bit in a given integer.
Parameters
aBits [in] The integer to read from.aBitOffset [in] The offset of the bit to read (0 corresponds to the least-significant bit).Template Parameters
UintType The value type (MUST be `uint8_t`, `uint16_t`, `uint32_t`, or `uint64_t`).Defined at line 145 of file ../../third_party/openthread/src/core/common/bit_utils.hpp
-
template <typename UintType>void SetToUintMax (UintType & aVariable)Sets a given unsigned integer variable to its maximum possible value.
Parameters
aVariable [out] A reference to the variable to set to its max possible value.Template Parameters
UintType The unsigned integer type.Defined at line 154 of file ../../third_party/openthread/src/core/common/num_utils.hpp
-
template <typename UintType>bool CanAddSafely (UintType aFirstValue, UintType aSecondValue)Indicates whether or not the addition of two unsigned integers will result in an overflow.
Parameters
aFirstValue [in] The first operand in the addition.aSecondValue [in] The second operand in the addition.Template Parameters
UintType The value type (MUST be `uint8_t`, `uint16_t`, `uint32_t`, or `uint64_t`).Defined at line 172 of file ../../third_party/openthread/src/core/common/num_utils.hpp
-
template <typename Type>bool IsValueInRange (Type aValue, Type aMin, Type aMax)This template function checks whether a given value is in a given closed range [min, max].
Uses `operator
<
=` to compare the values. The behavior is undefined if the value of
is greater than
Parameters
aValue [in] The value to checkaMin [in] The minimum value.aMax [in] The maximum value.Template Parameters
Type The value type.Defined at line 195 of file ../../third_party/openthread/src/core/common/num_utils.hpp
-
const char * StringFind (const char * aString, char aChar)Finds the first occurrence of a given character in a null-terminated string.
Parameters
aString [in] A pointer to the string.aChar [in] A char to search for in the string. -
const char * StringFind (const char * aString, const char * aSubString, StringMatchMode aMode)Finds the first occurrence of a given sub-string in a null-terminated string.
Parameters
aString [in] A pointer to the string.aSubString [in] A sub-string to search for.aMode [in] The string comparison mode, exact match or case insensitive match. -
bool StringStartsWith (const char * aString, const char * aPrefixString, StringMatchMode aMode)Checks whether a null-terminated string starts with a given prefix string.
Parameters
aString [in] A pointer to the string.aPrefixString [in] A prefix string.aMode [in] The string comparison mode, exact match or case insensitive match. -
bool StringEndsWith (const char * aString, char aChar)Checks whether a null-terminated string ends with a given character.
Parameters
aString [in] A pointer to the string.aChar [in] A char to check. -
bool StringEndsWith (const char * aString, const char * aSubString, StringMatchMode aMode)Checks whether a null-terminated string ends with a given sub-string.
Parameters
aString [in] A pointer to the string.aSubString [in] A sub-string to check against.aMode [in] The string comparison mode, exact match or case insensitive match. -
bool StringMatch (const char * aFirstString, const char * aSecondString)Checks whether or not two null-terminated strings match exactly.
Parameters
aFirstString [in] A pointer to the first string.aSecondString [in] A pointer to the second string. -
bool StringMatch (const char * aFirstString, const char * aSecondString, StringMatchMode aMode)Checks whether or not two null-terminated strings match.
Parameters
aFirstString [in] A pointer to the first string.aSecondString [in] A pointer to the second string.aMode [in] The string comparison mode, exact match or case insensitive match. -
Error StringCopy (char * TargetBuffer, uint16_t aTargetSize, const char * aSource, StringEncodingCheck aEncodingCheck)Copies a string into a given target buffer with a given size if it fits.
Parameters
aTargetBuffer [out] A pointer to the target buffer to copy into.aTargetSize [out] The size (number of characters) in array.aSource [in] A pointer to null-terminated string to copy from. Can be `nullptr` which treated as "".aEncodingCheck [in] Specifies the encoding format check (e.g., UTF-8) to perform. -
Error StringParseUint8 (const char *& aString, uint8_t & aUint8, uint8_t aMaxValue)Parses a decimal number from a string as `uint8_t` and skips over the parsed characters.
If the string does not start with a digit, `kErrorParse` is returned.
All the digit characters in the string are parsed until reaching a non-digit character. The pointer `aString` is
updated to point to the first non-digit character after the parsed digits.
If the parsed number value is larger than
`kErrorParse` is returned.
Parameters
aString [in,out] A reference to a pointer to string to parse.aUint8 [out] A reference to return the parsed value.aMaxValue [in] Maximum allowed value for the parsed number. -
Error StringParseUint8 (const char *& aString, uint8_t & aUint8)Parses a decimal number from a string as `uint8_t` and skips over the parsed characters.
If the string does not start with a digit, `kErrorParse` is returned.
All the digit characters in the string are parsed until reaching a non-digit character. The pointer `aString` is
updated to point to the first non-digit character after the parsed digits.
If the parsed number value is larger than maximum `uint8_t` value, `kErrorParse` is returned.
Parameters
aString [in,out] A reference to a pointer to string to parse.aUint8 [out] A reference to return the parsed value. -
void StringConvertToLowercase (char * aString)Converts all uppercase letter characters in a given string to lowercase.
Parameters
aString [in,out] A pointer to the string to convert. -
void StringConvertToUppercase (char * aString)Converts all lowercase letter characters in a given string to uppercase.
Parameters
aString [in,out] A pointer to the string to convert. -
char ToLowercase (char aChar)Converts an uppercase letter character to lowercase.
If
is uppercase letter it is converted lowercase. Otherwise, it remains unchanged.
Parameters
aChar [in] The character to convert -
char ToUppercase (char aChar)Converts a lowercase letter character to uppercase.
If
is lowercase letter it is converted uppercase. Otherwise, it remains unchanged.
Parameters
aChar [in] The character to convert -
bool IsUppercase (char aChar)Checks whether a given character is an uppercase letter ('A'-'Z').
Parameters
aChar [in] The character to check. -
bool IsLowercase (char aChar)Checks whether a given character is a lowercase letter ('a'-'z').
Parameters
aChar [in] The character to check. -
bool IsDigit (char aChar)Checks whether a given character is a digit character ('0'-'9').
Parameters
aChar [in] The character to check. -
Error ParseDigit (char aDigitChar, uint8_t & aValue)Parse a given digit character to its numeric value.
Parameters
aDigitChar [in] The digit character to parse.aValue [out] A reference to return the parsed value on success. -
Error ParseHexDigit (char aHexChar, uint8_t & aValue)Parse a given hex digit character ('0'-'9', 'A'-'F', or 'a'-'f') to its numeric value.
Parameters
aHexChar [in] The hex digit character to parse.aValue [out] A reference to return the parsed value on success. -
const char * ToYesNo (bool aBool)Converts a boolean to "yes" or "no" string.
Parameters
aBool [in] A boolean value to convert. -
bool IsValidUtf8String (const char * aString)Validates whether a given byte sequence (string) follows UTF-8 encoding.
Control characters are not allowed.
Parameters
aString [in] A null-terminated byte sequence. -
bool IsValidUtf8String (const char * aString, size_t aLength)Validates whether a given byte sequence (string) follows UTF-8 encoding.
Control characters are not allowed.
Parameters
aString [in] A byte sequence.aLength [in] Length of the sequence. -
template <typename UintType>void WriteBit (UintType & aBits, uint8_t aBitOffset, bool aValue)Writes the specified bit in a given integer to a given value (0 or 1).
Parameters
aBits [in,out] A reference to the integer to modify.aBitOffset [in] The offset of the bit to write (0 corresponds to the least-significant bit).aValue [in] The value to write.Template Parameters
UintType The value type (MUST be `uint8_t`, `uint16_t`, `uint32_t`, or `uint64_t`).Defined at line 161 of file ../../third_party/openthread/src/core/common/bit_utils.hpp
-
template <typename UintType, UintType kMask, UintType kOffset = BitOffsetOfMask(kMask)>void WriteBits (UintType & aBits, UintType aValue)Writes a value to a specified bit-field within an integer.
Parameters
aBits [in,out] A reference to the integer to modify.aValue [in] The value to write into the field (the value should not be pre-shifted).Template Parameters
UintType The value type (MUST be `uint8_t`, `uint16_t`, `uint32_t`, or `uint64_t`).kMask The bit mask indicating the field to modify (MUST not be 0). The mask must be pre-shifted.kOffset The bit offset to write. If not provided, this is computed fromDefined at line 202 of file ../../third_party/openthread/src/core/common/bit_utils.hpp
-
template <typename Type>int ThreeWayCompare (Type aFirst, Type aSecond)This template function performs a three-way comparison between two values.
Parameters
aFirst [in] The first value.aSecond [in] The second value.Template Parameters
Type The value type.Defined at line 212 of file ../../third_party/openthread/src/core/common/num_utils.hpp
-
template <typename UintType, UintType kMask, UintType kOffset = BitOffsetOfMask(kMask)>UintType UpdateBits (UintType aBits, UintType aValue)Writes a value to a specified bit-field within an integer and returns the modified integer.
Parameters
aBits [in] The original integer value.aValue [in] The value to write into the field (it should not be pre-shifted).Template Parameters
UintType The value type (MUST be `uint8_t`, `uint16_t`, `uint32_t`, or `uint64_t`).kMask The bitmask indicating the field to modify (must not be zero). The mask must be pre-shifted.kOffset The bit offset of the field. If not provided, this is computed fromDefined at line 222 of file ../../third_party/openthread/src/core/common/bit_utils.hpp
-
template <>int ThreeWayCompare<bool> (bool aFirst, bool aSecond)This is template specialization of three-way comparison between two boolean values.
Parameters
aFirst [in] The first boolean value.aSecond [in] The second boolean value.Defined at line 227 of file ../../third_party/openthread/src/core/common/num_utils.hpp
-
template <typename UintType, UintType kMask, UintType kOffset = BitOffsetOfMask(kMask)>UintType ReadBits (UintType aBits)Reads the value of a specified bit-field from an integer.
Parameters
aBits [in] The integer value to read from.Template Parameters
UintType The value type (MUST be `uint8_t`, `uint16_t`, `uint32_t`, or `uint64_t`).kMask The bitmask indicating the field to read (must not be zero). The mask must be pre-shifted.kOffset The bit offset of the field. If not provided, this is computed fromDefined at line 241 of file ../../third_party/openthread/src/core/common/bit_utils.hpp
-
template <typename IntType>IntType DivideAndRoundToClosest (IntType aDividend, IntType aDivisor)This template function divides two numbers and rounds the result to the closest integer.
Parameters
aDividend [in] The dividend value.aDivisor [in] The divisor value.Template Parameters
IntType The integer type.Returns
The result of division and rounding to the closest integer.
Defined at line 242 of file ../../third_party/openthread/src/core/common/num_utils.hpp
-
template <typename IntType>IntType DivideAndRoundUp (IntType aDividend, IntType aDivisor)This template function divides two numbers and always rounds the result up.
Parameters
aDividend [in] The dividend value.aDivisor [in] The divisor value.Template Parameters
IntType The integer type.Returns
The result of division and rounding up.
Defined at line 257 of file ../../third_party/openthread/src/core/common/num_utils.hpp
-
template <typename UintType, UintType kMask, UintType kOffset = BitOffsetOfMask(kMask)>UintType UpdateBitsLittleEndian (UintType aBits, UintType aValue)Writes a value to a specified bit-field within a little-endian integer and returns the modified integer in
little-endian format.
Parameters
aBits [in] The original integer value in little-endian format.aValue [in] The value to write into the field (it should not be pre-shifted).Template Parameters
UintType The value type (MUST be `uint8_t`, `uint16_t`, `uint32_t`, or `uint64_t`).kMask The bitmask indicating the field to modify (must not be zero). The mask must be pre-shifted.kOffset The bit offset of the field. If not provided, this is computed fromDefined at line 262 of file ../../third_party/openthread/src/core/common/bit_utils.hpp
-
unsigned long ToUlong (uint32_t aUint32)Casts a given `uint32_t` to `unsigned long`.
Parameters
aUint32 [in] A `uint32_t` value.Defined at line 269 of file ../../third_party/openthread/src/core/common/num_utils.hpp
-
template <typename UintType, UintType kMask, UintType kOffset = BitOffsetOfMask(kMask)>UintType UpdateBitsBigEndian (UintType aBits, UintType aValue)Writes a value to a specified bit-field within a big-endian integer and returns the modified integer in big-endian
format.
Parameters
aBits [in] The original integer value in big-endian format.aValue [in] The value to write into the field (it should not be pre-shifted).Template Parameters
UintType The value type (MUST be `uint8_t`, `uint16_t`, `uint32_t`, or `uint64_t`).kMask The bitmask indicating the field to modify (must not be zero). The mask must be pre-shifted.kOffset The bit offset of the field. If not provided, this is computed fromDefined at line 284 of file ../../third_party/openthread/src/core/common/bit_utils.hpp
-
template <typename UintType, UintType kMask, UintType kOffset = BitOffsetOfMask(kMask)>UintType ReadBitsLittleEndian (UintType aBits)Reads the value of a specified bit-field from a little-endian integer.
Parameters
aBits [in] The integer value in little-endian format to read from.Template Parameters
UintType The value type (MUST be `uint8_t`, `uint16_t`, `uint32_t`, or `uint64_t`).kMask The bitmask indicating the field to read (must not be zero). The mask must be pre-shifted.kOffset The bit offset of the field. If not provided, this is computed fromDefined at line 304 of file ../../third_party/openthread/src/core/common/bit_utils.hpp
-
template <typename UintType, UintType kMask, UintType kOffset = BitOffsetOfMask(kMask)>UintType ReadBitsBigEndian (UintType aBits)Reads the value of a specified bit-field from a big-endian integer.
Parameters
aBits [in] The integer value in big-endian format to read from.Template Parameters
UintType The value type (MUST be `uint8_t`, `uint16_t`, `uint32_t`, or `uint64_t`).kMask The bitmask indicating the field to read (must not be zero). The mask must be pre-shifted.kOffset The bit offset of the field. If not provided, this is computed fromDefined at line 323 of file ../../third_party/openthread/src/core/common/bit_utils.hpp
-
bool AreStringsInOrder (const char * aFirstconst char * aSecond)This `constexpr` function checks whether two given C strings are in order (alphabetical order).
This is intended for use from `static_assert`, e.g., checking if a lookup table entries are sorted. It is not
recommended to use this function in other situations as it uses recursion so that it can be `constexpr`.
Parameters
aFirst [in] The first string.aSecond [in] The second string.Defined at line 374 of file ../../third_party/openthread/src/core/common/string.hpp
Variables
uint64_t[] gInstanceRaw