class Address

Defined at line 245 of file ../../third_party/openthread/src/core/mac/mac_types.hpp

Represents an IEEE 802.15.4 Short or Extended Address.

Public Methods

void Address ()

Initializes an Address.

Defined at line 266 of file ../../third_party/openthread/src/core/mac/mac_types.hpp

Type GetType ()

Gets the address type (Short Address, Extended Address, or none).

Defined at line 276 of file ../../third_party/openthread/src/core/mac/mac_types.hpp

bool IsNone ()

Indicates whether or not there is an address.

Defined at line 283 of file ../../third_party/openthread/src/core/mac/mac_types.hpp

bool IsShort ()

Indicates whether or not the Address is a Short Address.

Defined at line 290 of file ../../third_party/openthread/src/core/mac/mac_types.hpp

bool IsExtended ()

Indicates whether or not the Address is an Extended Address.

Defined at line 297 of file ../../third_party/openthread/src/core/mac/mac_types.hpp

ShortAddress GetShort ()

Gets the address as a Short Address.

MUST be used only if the address type is Short Address.

Defined at line 306 of file ../../third_party/openthread/src/core/mac/mac_types.hpp

const ExtAddress & GetExtended ()

Gets the address as an Extended Address.

MUST be used only if the address type is Extended Address.

Defined at line 315 of file ../../third_party/openthread/src/core/mac/mac_types.hpp

ExtAddress & GetExtended ()

Gets the address as an Extended Address.

MUST be used only if the address type is Extended Address.

Defined at line 324 of file ../../third_party/openthread/src/core/mac/mac_types.hpp

void SetNone ()

Sets the address to none (i.e., clears the address).

Address type will be updated to `kTypeNone`.

Defined at line 331 of file ../../third_party/openthread/src/core/mac/mac_types.hpp

void SetShort (ShortAddress aShortAddress)

Sets the address with a Short Address.

The type is also updated to indicate that address is Short.

Parameters

aShortAddress [in] A Short Address

Defined at line 340 of file ../../third_party/openthread/src/core/mac/mac_types.hpp

void SetExtended (const ExtAddress & aExtAddress)

Sets the address with an Extended Address.

The type is also updated to indicate that the address is Extended.

Parameters

aExtAddress [in] An Extended Address

Defined at line 353 of file ../../third_party/openthread/src/core/mac/mac_types.hpp

void SetExtended (const uint8_t * aBuffer, ExtAddress::CopyByteOrder aByteOrder)

Sets the address with an Extended Address given as a byte array.

The type is also updated to indicate that the address is Extended.

Parameters

aBuffer [in] Pointer to an array containing the Extended Address. `OT_EXT_ADDRESS_SIZE` bytes from buffer are copied to form the Extended Address.
aByteOrder [in] The byte order to copy the address from

Defined at line 368 of file ../../third_party/openthread/src/core/mac/mac_types.hpp

bool IsBroadcast ()

Indicates whether or not the address is a Short Broadcast Address.

Defined at line 388 of file ../../third_party/openthread/src/core/mac/mac_types.hpp

bool IsShortAddrInvalid ()

Indicates whether or not the address is a Short Invalid Address.

Defined at line 395 of file ../../third_party/openthread/src/core/mac/mac_types.hpp

void SetExtendedFromIid (const Ip6::InterfaceIdentifier & aIid)

Sets the address as an Extended Address from a given IPv6 Address Interface Identifier.

Parameters

aIid [in] The IPv6 Interface Identifier to convert to Extended Address.
bool operator== (const Address & aOther)

Overloads operator `==` to evaluate whether or not two `Address` instances are equal.

Parameters

aOther [in] The other `Address` instance to compare with.
InfoString ToString ()

Converts an address to a null-terminated string

Enumerations

enum Type
Name Value
kTypeNone 0
kTypeShort 1
kTypeExtended 2

Specifies the IEEE 802.15.4 Address type.

Defined at line 256 of file ../../third_party/openthread/src/core/mac/mac_types.hpp