Represent the the Capability Information Bit fields See zigbe Specification r22.1.0, Table 3-62. More...
#include "zigbee-nwk-fields.h"
Public Member Functions | |
CapabilityInformation () | |
CapabilityInformation (uint8_t bitmap) | |
Constructor using the capability in a bitmap form. | |
uint8_t | GetCapability () const |
Used to obtain the complete capability information bit map. | |
MacDeviceType | GetDeviceType () const |
This field will have a value of ROUTER if the joining device is a Zigbee router. | |
PowerSource | GetPowerSource () const |
This field will be set to the value of lowest-order bit of the PowerSource parameter passed to the NLME-JOIN.request primitive. | |
bool | IsAllocateAddrOn () const |
This field will have a value of true in implementations of this specification, indicating that the joining device must be issued a 16 bit network address, except in the case where a device has self-selected its address while using the NWK rejoin command to join a network for the first time in a secure manner. | |
bool | IsAlternatePanCoord () const |
This field will always have a value of false in implementations of this specification. | |
bool | IsReceiverOnWhenIdle () const |
This field will be set to the value of the lowest-order bit of the RxOnWhenIdle parameter passed to the NLME-JOIN.request primitive. | |
void | SetAllocateAddrOn (bool value) |
Set the Allocate Addr On for the capability information field. | |
void | SetCapability (uint8_t capability) |
Set the Capability Information bit map. | |
void | SetDeviceType (MacDeviceType devType) |
Set the device type bit for the capability information field. | |
void | SetPowerSource (PowerSource powerSource) |
Set the power source bit for the capability information field. | |
void | SetReceiverOnWhenIdle (bool value) |
Set the Receiver On When Idle bit for the capability information field. | |
Private Attributes | |
bool | m_allocateAddr {true} |
(Bit 7) The allocate address bit field. | |
bool | m_alternatePanCoord {false} |
(Bit 0) The alternate PAN coordinator bit field. | |
MacDeviceType | m_deviceType {ROUTER} |
(Bit 1) The device type bit field. | |
PowerSource | m_powerSource {MAINPOWER} |
(Bit 2) The power source bits field. | |
bool | m_receiverOnWhenIdle {true} |
(Bit 3) The receiver on when idle bit field. | |
bool | m_securityCapability {false} |
(Bit 6) The security capability bit field. | |
Represent the the Capability Information Bit fields See zigbe Specification r22.1.0, Table 3-62.
Definition at line 59 of file zigbee-nwk-fields.h.
ns3::zigbee::CapabilityInformation::CapabilityInformation | ( | ) |
Definition at line 21 of file zigbee-nwk-fields.cc.
References m_allocateAddr, m_deviceType, m_powerSource, m_receiverOnWhenIdle, m_securityCapability, ns3::zigbee::OTHER_POWER_SOURCE, and ns3::zigbee::ROUTER.
ns3::zigbee::CapabilityInformation::CapabilityInformation | ( | uint8_t | bitmap | ) |
Constructor using the capability in a bitmap form.
bitmap | The bitmap representing the capability. |
Definition at line 31 of file zigbee-nwk-fields.cc.
References SetCapability().
uint8_t ns3::zigbee::CapabilityInformation::GetCapability | ( | ) | const |
Used to obtain the complete capability information bit map.
Definition at line 37 of file zigbee-nwk-fields.cc.
References m_allocateAddr, m_alternatePanCoord, m_deviceType, m_powerSource, m_receiverOnWhenIdle, and m_securityCapability.
Referenced by ns3::zigbee::ZigbeeNwk::MlmeAssociateIndication(), ns3::zigbee::ZigbeeNwk::MlmeGetConfirm(), ns3::zigbee::ZigbeeNwk::MlmeOrphanIndication(), NwkNetworkDiscoveryConfirm(), NwkNetworkDiscoveryConfirm(), NwkNetworkDiscoveryConfirm(), and ZigbeeRreqRetryTestCase::NwkNetworkDiscoveryConfirm().
MacDeviceType ns3::zigbee::CapabilityInformation::GetDeviceType | ( | ) | const |
This field will have a value of ROUTER if the joining device is a Zigbee router.
It will have a value of ENDDEVICE if the devices is a Zigbee end device or else a router-capable device that is joining as an end device.
Definition at line 59 of file zigbee-nwk-fields.cc.
References m_deviceType.
Referenced by ns3::zigbee::ZigbeeNwk::McpsDataIndication(), ns3::zigbee::ZigbeeNwk::MlmeAssociateIndication(), ns3::zigbee::ZigbeeNwk::NldeDataRequest(), ns3::zigbee::ZigbeeNwk::NlmeDirectJoinRequest(), ns3::zigbee::ZigbeeNwk::NlmeRouteDiscoveryRequest(), and ns3::zigbee::ZigbeeNwk::NlmeStartRouterRequest().
PowerSource ns3::zigbee::CapabilityInformation::GetPowerSource | ( | ) | const |
This field will be set to the value of lowest-order bit of the PowerSource parameter passed to the NLME-JOIN.request primitive.
Definition at line 65 of file zigbee-nwk-fields.cc.
References m_powerSource.
bool ns3::zigbee::CapabilityInformation::IsAllocateAddrOn | ( | ) | const |
This field will have a value of true in implementations of this specification, indicating that the joining device must be issued a 16 bit network address, except in the case where a device has self-selected its address while using the NWK rejoin command to join a network for the first time in a secure manner.
In this case, it shall have a value of false.
Definition at line 77 of file zigbee-nwk-fields.cc.
References m_allocateAddr.
Referenced by ns3::zigbee::ZigbeeNwk::MlmeAssociateIndication(), and ns3::zigbee::ZigbeeNwk::NlmeDirectJoinRequest().
bool ns3::zigbee::CapabilityInformation::IsAlternatePanCoord | ( | ) | const |
This field will always have a value of false in implementations of this specification.
Definition at line 53 of file zigbee-nwk-fields.cc.
References m_alternatePanCoord.
bool ns3::zigbee::CapabilityInformation::IsReceiverOnWhenIdle | ( | ) | const |
This field will be set to the value of the lowest-order bit of the RxOnWhenIdle parameter passed to the NLME-JOIN.request primitive.
Definition at line 71 of file zigbee-nwk-fields.cc.
References m_receiverOnWhenIdle.
Referenced by ns3::zigbee::ZigbeeNwk::McpsDataIndication(), ns3::zigbee::ZigbeeNwk::MlmeAssociateIndication(), and ns3::zigbee::ZigbeeNwk::NlmeDirectJoinRequest().
void ns3::zigbee::CapabilityInformation::SetAllocateAddrOn | ( | bool | value | ) |
Set the Allocate Addr On for the capability information field.
value | True if the device requires to have its 16 bit network address allocated. |
Definition at line 113 of file zigbee-nwk-fields.cc.
References m_allocateAddr.
Referenced by NwkNetworkDiscoveryConfirm(), NwkNetworkDiscoveryConfirm(), NwkNetworkDiscoveryConfirm(), and ZigbeeRreqRetryTestCase::NwkNetworkDiscoveryConfirm().
void ns3::zigbee::CapabilityInformation::SetCapability | ( | uint8_t | capability | ) |
Set the Capability Information bit map.
capability | The 8 bit map representing the full capability |
Definition at line 83 of file zigbee-nwk-fields.cc.
References m_allocateAddr, m_alternatePanCoord, m_deviceType, m_powerSource, m_receiverOnWhenIdle, and m_securityCapability.
Referenced by CapabilityInformation(), ns3::zigbee::ZigbeeNwk::McpsDataIndication(), ns3::zigbee::ZigbeeNwk::NldeDataRequest(), ns3::zigbee::ZigbeeNwk::NlmeDirectJoinRequest(), ns3::zigbee::ZigbeeNwk::NlmeRouteDiscoveryRequest(), and ns3::zigbee::ZigbeeNwk::NlmeStartRouterRequest().
void ns3::zigbee::CapabilityInformation::SetDeviceType | ( | MacDeviceType | devType | ) |
Set the device type bit for the capability information field.
devType | The device type field to set in the capability information. |
Definition at line 95 of file zigbee-nwk-fields.cc.
References m_deviceType.
Referenced by ns3::zigbee::ZigbeeNwk::MlmeGetConfirm(), ns3::zigbee::ZigbeeNwk::MlmeOrphanIndication(), NwkNetworkDiscoveryConfirm(), NwkNetworkDiscoveryConfirm(), NwkNetworkDiscoveryConfirm(), and ZigbeeRreqRetryTestCase::NwkNetworkDiscoveryConfirm().
void ns3::zigbee::CapabilityInformation::SetPowerSource | ( | PowerSource | powerSource | ) |
Set the power source bit for the capability information field.
powerSource | The power source field to set in the capability information. |
Definition at line 101 of file zigbee-nwk-fields.cc.
References m_powerSource.
void ns3::zigbee::CapabilityInformation::SetReceiverOnWhenIdle | ( | bool | value | ) |
Set the Receiver On When Idle bit for the capability information field.
value | True if the receiver should remain on when idle. |
Definition at line 107 of file zigbee-nwk-fields.cc.
References m_receiverOnWhenIdle.
Referenced by ns3::zigbee::ZigbeeNwk::MlmeOrphanIndication().
|
private |
(Bit 7) The allocate address bit field.
Definition at line 165 of file zigbee-nwk-fields.h.
Referenced by CapabilityInformation(), GetCapability(), IsAllocateAddrOn(), SetAllocateAddrOn(), and SetCapability().
|
private |
(Bit 0) The alternate PAN coordinator bit field.
Definition at line 160 of file zigbee-nwk-fields.h.
Referenced by GetCapability(), IsAlternatePanCoord(), and SetCapability().
|
private |
(Bit 1) The device type bit field.
Definition at line 161 of file zigbee-nwk-fields.h.
Referenced by CapabilityInformation(), GetCapability(), GetDeviceType(), SetCapability(), and SetDeviceType().
|
private |
(Bit 2) The power source bits field.
Definition at line 162 of file zigbee-nwk-fields.h.
Referenced by CapabilityInformation(), GetCapability(), GetPowerSource(), SetCapability(), and SetPowerSource().
|
private |
(Bit 3) The receiver on when idle bit field.
Definition at line 163 of file zigbee-nwk-fields.h.
Referenced by CapabilityInformation(), GetCapability(), IsReceiverOnWhenIdle(), SetCapability(), and SetReceiverOnWhenIdle().
|
private |
(Bit 6) The security capability bit field.
Definition at line 164 of file zigbee-nwk-fields.h.
Referenced by CapabilityInformation(), GetCapability(), and SetCapability().