This class represents an IEEE 802.15.4 Short or Extended Address.
More...
#include <src/core/mac/mac_frame.hpp>
This class represents an IEEE 802.15.4 Short or Extended Address.
§ Type
This enumeration specifies the IEEE 802.15.4 Address type.
| Enumerator |
|---|
| kTypeNone | No address.
|
| kTypeShort | IEEE 802.15.4 Short Address.
|
| kTypeExtended | IEEE 802.15.4 Extended Address.
|
§ GetExtended() [1/2]
| const ExtAddress& ot::Mac::Address::GetExtended |
( |
void |
| ) |
const |
|
inline |
This method gets the address as an Extended Address.
This method MUST be used only if the address type is Extended Address.
- Returns
- A constant reference to the Extended Address.
§ GetExtended() [2/2]
| ExtAddress& ot::Mac::Address::GetExtended |
( |
void |
| ) |
|
|
inline |
This method gets the address as an Extended Address.
This method MUST be used only if the address type is Extended Address.
- Returns
- A reference to the Extended Address.
§ GetShort()
This method gets the address as a Short Address.
This method MUST be used only if the address type is Short Address.
- Returns
- The Short Address.
§ GetType()
| Type ot::Mac::Address::GetType |
( |
void |
| ) |
const |
|
inline |
This method gets the address type (Short Address, Extended Address, or none).
- Returns
- The address type.
§ IsBroadcast()
| bool ot::Mac::Address::IsBroadcast |
( |
void |
| ) |
const |
|
inline |
This method indicates whether or not the address is a Short Broadcast Address.
- Returns
- TRUE if address is Short Broadcast Address, FALSE otherwise.
§ IsExtended()
| bool ot::Mac::Address::IsExtended |
( |
void |
| ) |
const |
|
inline |
This method indicates whether or not the Address is an Extended Address.
- Returns
- TRUE if it is an Extended Address, FALSE otherwise.
§ IsNone()
| bool ot::Mac::Address::IsNone |
( |
void |
| ) |
const |
|
inline |
This method indicates whether or not there is an address.
- Returns
- TRUE if there is no address (i.e. address type is
kTypeNone), FALSE otherwise.
§ IsShort()
| bool ot::Mac::Address::IsShort |
( |
void |
| ) |
const |
|
inline |
This method indicates whether or not the Address is a Short Address.
- Returns
- TRUE if it is a Short Address, FALSE otherwise.
§ IsShortAddrInvalid()
| bool ot::Mac::Address::IsShortAddrInvalid |
( |
void |
| ) |
const |
|
inline |
This method indicates whether or not the address is a Short Invalid Address.
- Returns
- TRUE if address is Short Invalid Address, FALSE otherwise.
§ SetExtended() [1/2]
| void ot::Mac::Address::SetExtended |
( |
const ExtAddress & |
aExtAddress | ) |
|
|
inline |
This method sets the address with an Extended Address.
The type is also updated to indicate that the address is Extended.
- Parameters
-
§ SetExtended() [2/2]
| void ot::Mac::Address::SetExtended |
( |
const uint8_t * |
aBuffer, |
|
|
bool |
aReverse |
|
) |
| |
This method sets the address with an Extended Address given as byte array.
The type is also updated to indicate that the address is Extended.
- Parameters
-
| [in] | aBuffer | Pointer to a array containing the Extended Address. OT_EXT_ADDRESS_SIZE bytes from buffer are copied to form the Extended Address. |
| [in] | aReverse | If true then OT_EXT_ADDRESS_SIZE bytes from aBuffer are copied in reverse order, otherwise they are copied as provided. |
§ SetNone()
| void ot::Mac::Address::SetNone |
( |
void |
| ) |
|
|
inline |
This method sets the address to none (i.e., clears the address).
Address type will be updated to kTypeNone.
§ SetShort()
| void ot::Mac::Address::SetShort |
( |
ShortAddress |
aShortAddress | ) |
|
|
inline |
This method sets the address with a Short Address.
The type is also updated to indicate that address is Short.
- Parameters
-
§ ToString()
This method converts an address to a null-terminated string.
- Returns
- A
String representing the address.
The documentation for this class was generated from the following files: