A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::zigbee::CapabilityInformation Class Reference

Represent the the Capability Information Bit fields See zigbe Specification r22.1.0, Table 3-62. More...

#include "zigbee-nwk-fields.h"

+ Collaboration diagram for ns3::zigbee::CapabilityInformation:

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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ CapabilityInformation() [1/2]

ns3::zigbee::CapabilityInformation::CapabilityInformation ( )

◆ CapabilityInformation() [2/2]

ns3::zigbee::CapabilityInformation::CapabilityInformation ( uint8_t bitmap)

Constructor using the capability in a bitmap form.

Parameters
bitmapThe bitmap representing the capability.

Definition at line 31 of file zigbee-nwk-fields.cc.

References SetCapability().

+ Here is the call graph for this function:

Member Function Documentation

◆ GetCapability()

uint8_t ns3::zigbee::CapabilityInformation::GetCapability ( ) const

Used to obtain the complete capability information bit map.

Returns
The bit map with the capability information

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().

+ Here is the caller graph for this function:

◆ GetDeviceType()

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.

Returns
The device type used

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().

+ Here is the caller graph for this function:

◆ GetPowerSource()

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.

Returns
MAINPOWER or OTHER_POWER_SOURCE

Definition at line 65 of file zigbee-nwk-fields.cc.

References m_powerSource.

◆ IsAllocateAddrOn()

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.

Returns
True = The device require a 16 bit address allocation, False = otherwise.

Definition at line 77 of file zigbee-nwk-fields.cc.

References m_allocateAddr.

Referenced by ns3::zigbee::ZigbeeNwk::MlmeAssociateIndication(), and ns3::zigbee::ZigbeeNwk::NlmeDirectJoinRequest().

+ Here is the caller graph for this function:

◆ IsAlternatePanCoord()

bool ns3::zigbee::CapabilityInformation::IsAlternatePanCoord ( ) const

This field will always have a value of false in implementations of this specification.

Returns
false for implementations of this specification.

Definition at line 53 of file zigbee-nwk-fields.cc.

References m_alternatePanCoord.

◆ IsReceiverOnWhenIdle()

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.

Returns
True Rx enabled when the device is idle | False = the receiver is disabled when idle.

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().

+ Here is the caller graph for this function:

◆ SetAllocateAddrOn()

void ns3::zigbee::CapabilityInformation::SetAllocateAddrOn ( bool value)

Set the Allocate Addr On for the capability information field.

Parameters
valueTrue 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().

+ Here is the caller graph for this function:

◆ SetCapability()

void ns3::zigbee::CapabilityInformation::SetCapability ( uint8_t capability)

Set the Capability Information bit map.

Parameters
capabilityThe 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().

+ Here is the caller graph for this function:

◆ SetDeviceType()

void ns3::zigbee::CapabilityInformation::SetDeviceType ( MacDeviceType devType)

Set the device type bit for the capability information field.

Parameters
devTypeThe 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().

+ Here is the caller graph for this function:

◆ SetPowerSource()

void ns3::zigbee::CapabilityInformation::SetPowerSource ( PowerSource powerSource)

Set the power source bit for the capability information field.

Parameters
powerSourceThe power source field to set in the capability information.

Definition at line 101 of file zigbee-nwk-fields.cc.

References m_powerSource.

◆ SetReceiverOnWhenIdle()

void ns3::zigbee::CapabilityInformation::SetReceiverOnWhenIdle ( bool value)

Set the Receiver On When Idle bit for the capability information field.

Parameters
valueTrue 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().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_allocateAddr

bool ns3::zigbee::CapabilityInformation::m_allocateAddr {true}
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().

◆ m_alternatePanCoord

bool ns3::zigbee::CapabilityInformation::m_alternatePanCoord {false}
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().

◆ m_deviceType

MacDeviceType ns3::zigbee::CapabilityInformation::m_deviceType {ROUTER}
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().

◆ m_powerSource

PowerSource ns3::zigbee::CapabilityInformation::m_powerSource {MAINPOWER}
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().

◆ m_receiverOnWhenIdle

bool ns3::zigbee::CapabilityInformation::m_receiverOnWhenIdle {true}
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().

◆ m_securityCapability

bool ns3::zigbee::CapabilityInformation::m_securityCapability {false}
private

(Bit 6) The security capability bit field.

Definition at line 164 of file zigbee-nwk-fields.h.

Referenced by CapabilityInformation(), GetCapability(), and SetCapability().


The documentation for this class was generated from the following files: