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

Represent the Capability Information Field. More...

#include "lr-wpan-fields.h"

+ Collaboration diagram for ns3::lrwpan::CapabilityField:

Public Member Functions

 CapabilityField ()
 
 CapabilityField (uint8_t bitmap)
 Construct a Capability field based on a bitmap.
 
uint8_t GetCapability () const
 Get the bitmap representing the device capability.
 
bool IsDeviceTypeFfd () const
 True if the device type is a Full Functional Device (FFD) false if is a Reduced Functional Device (RFD).
 
bool IsPowSrcAvailable () const
 True if the device is receiving power from alternating current mains.
 
bool IsReceiverOnWhenIdle () const
 True if the device does not disable its receiver to conserve power during idle periods.
 
bool IsSecurityCapability () const
 True if the device is capable of sending and receiving cryptographically protected MAC frames.
 
bool IsShortAddrAllocOn () const
 True if the device wishes the coordinator to allocate a short address as result of the association procedure.
 
void SetCapability (uint8_t bitmap)
 Set the bitmap representing the device capability.
 
void SetFfdDevice (bool devType)
 Set the Device type in the Capability Information Field.
 
void SetPowSrcAvailable (bool pow)
 Set the Power Source available flag in the Capability Information Field.
 
void SetRxOnWhenIdle (bool rxIdle)
 Indicate if the receiver is On on Idle.
 
void SetSecurityCap (bool sec)
 Set the Security Capability flag in the Capability Information Field.
 
void SetShortAddrAllocOn (bool addrAlloc)
 Set the Short Address Flag in the Capability Information Field.
 

Private Attributes

bool m_allocAddr
 Capability Information Field, Allocate Address (bit 7)
 
bool m_deviceType
 Capability Information Field, Device Type (bit 1)
 
bool m_powerSource
 Capability Information Field, Power Source (bit 2)
 
bool m_receiverOnWhenIdle
 Capability Information Field, Receiver On When Idle (bit 3)
 
bool m_reservedBit0
 Capability Information Field, Reserved (bit 0)
 
uint8_t m_reservedBit45
 Capability Information Field, Reserved (bit 4 & 5)
 
bool m_securityCap
 Capability Information Field, Security Capability (bit 6)
 

Detailed Description

Represent the Capability Information Field.

See IEEE 802.15.4-2011 Section 5.3.1.2 Figure 50

Definition at line 346 of file lr-wpan-fields.h.

Constructor & Destructor Documentation

◆ CapabilityField() [1/2]

ns3::lrwpan::CapabilityField::CapabilityField ( )

◆ CapabilityField() [2/2]

ns3::lrwpan::CapabilityField::CapabilityField ( uint8_t  bitmap)

Construct a Capability field based on a bitmap.

Parameters
bitmapThe bitmap representing the capability

Definition at line 480 of file lr-wpan-fields.cc.

References SetCapability().

+ Here is the call graph for this function:

Member Function Documentation

◆ GetCapability()

uint8_t ns3::lrwpan::CapabilityField::GetCapability ( ) const

Get the bitmap representing the device capability.

Returns
The bitmap representing the device capability.

< Bit 0 (reserved)

< Bit 1

< Bit 2

< Bit 3

< Bit 4-5 (reserved)

< Bit 6

< Bit 7

Definition at line 486 of file lr-wpan-fields.cc.

References m_allocAddr, m_deviceType, m_powerSource, m_receiverOnWhenIdle, m_reservedBit0, m_reservedBit45, and m_securityCap.

Referenced by ScanConfirm().

+ Here is the caller graph for this function:

◆ IsDeviceTypeFfd()

bool ns3::lrwpan::CapabilityField::IsDeviceTypeFfd ( ) const

True if the device type is a Full Functional Device (FFD) false if is a Reduced Functional Device (RFD).

Returns
True if the device type is a Full Functional Device (FFD) false if is a Reduced Functional Device (RFD).

Definition at line 514 of file lr-wpan-fields.cc.

References m_deviceType.

Referenced by ns3::lrwpan::operator<<(), and ns3::lrwpan::CommandPayloadHeader::Print().

+ Here is the caller graph for this function:

◆ IsPowSrcAvailable()

bool ns3::lrwpan::CapabilityField::IsPowSrcAvailable ( ) const

True if the device is receiving power from alternating current mains.

Returns
True if the device is receiving power from alternating current mains.

Definition at line 520 of file lr-wpan-fields.cc.

References m_powerSource.

Referenced by ns3::lrwpan::operator<<(), and ns3::lrwpan::CommandPayloadHeader::Print().

+ Here is the caller graph for this function:

◆ IsReceiverOnWhenIdle()

bool ns3::lrwpan::CapabilityField::IsReceiverOnWhenIdle ( ) const

True if the device does not disable its receiver to conserve power during idle periods.

Returns
True if the device does not disable its receiver to conserve power during idle periods.

Definition at line 526 of file lr-wpan-fields.cc.

References m_receiverOnWhenIdle.

Referenced by ns3::lrwpan::operator<<(), and ns3::lrwpan::CommandPayloadHeader::Print().

+ Here is the caller graph for this function:

◆ IsSecurityCapability()

bool ns3::lrwpan::CapabilityField::IsSecurityCapability ( ) const

True if the device is capable of sending and receiving cryptographically protected MAC frames.

Returns
True if the device is capable of sending and receiving cryptographically protected MAC frames.

Definition at line 532 of file lr-wpan-fields.cc.

References m_securityCap.

Referenced by ns3::lrwpan::operator<<(), and ns3::lrwpan::CommandPayloadHeader::Print().

+ Here is the caller graph for this function:

◆ IsShortAddrAllocOn()

bool ns3::lrwpan::CapabilityField::IsShortAddrAllocOn ( ) const

True if the device wishes the coordinator to allocate a short address as result of the association procedure.

Returns
True if the device wishes the coordinator to allocate a short address as result of the association procedure.

Definition at line 538 of file lr-wpan-fields.cc.

References m_allocAddr.

Referenced by AssociateIndication(), ns3::lrwpan::operator<<(), and ns3::lrwpan::CommandPayloadHeader::Print().

+ Here is the caller graph for this function:

◆ SetCapability()

void ns3::lrwpan::CapabilityField::SetCapability ( uint8_t  bitmap)

Set the bitmap representing the device capability.

Parameters
bitmapThe bitmap representing the capability

< Bit 0 (reserved)

< Bit 1

< Bit 2

< Bit 3

< Bit 4-5 (reserved)

< Bit 6

< Bit 7

Definition at line 502 of file lr-wpan-fields.cc.

References m_allocAddr, m_deviceType, m_powerSource, m_receiverOnWhenIdle, m_reservedBit0, m_reservedBit45, and m_securityCap.

Referenced by CapabilityField(), and AssociateIndication().

+ Here is the caller graph for this function:

◆ SetFfdDevice()

void ns3::lrwpan::CapabilityField::SetFfdDevice ( bool  devType)

Set the Device type in the Capability Information Field.

True = full functional device (FFD) False = reduced functional device (RFD).

Parameters
devTypeThe device type described in the Capability Information Field.

Definition at line 544 of file lr-wpan-fields.cc.

References m_deviceType.

◆ SetPowSrcAvailable()

void ns3::lrwpan::CapabilityField::SetPowSrcAvailable ( bool  pow)

Set the Power Source available flag in the Capability Information Field.

Parameters
powSet true if a Power Source is available in the Capability Information Field.

Definition at line 550 of file lr-wpan-fields.cc.

References m_powerSource.

◆ SetRxOnWhenIdle()

void ns3::lrwpan::CapabilityField::SetRxOnWhenIdle ( bool  rxIdle)

Indicate if the receiver is On on Idle.

Parameters
rxIdleSet true if the receiver is on when Idle

Definition at line 556 of file lr-wpan-fields.cc.

References m_receiverOnWhenIdle.

◆ SetSecurityCap()

void ns3::lrwpan::CapabilityField::SetSecurityCap ( bool  sec)

Set the Security Capability flag in the Capability Information Field.

Parameters
secSet true if the device have Security Capabilities.

Definition at line 562 of file lr-wpan-fields.cc.

References m_securityCap.

◆ SetShortAddrAllocOn()

void ns3::lrwpan::CapabilityField::SetShortAddrAllocOn ( bool  addrAlloc)

Set the Short Address Flag in the Capability Information Field.

Parameters
addrAllocDescribes whether or not the coordinator should allocate a short address in the association process.

Definition at line 568 of file lr-wpan-fields.cc.

References m_allocAddr.

Referenced by ScanConfirm().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_allocAddr

bool ns3::lrwpan::CapabilityField::m_allocAddr
private

Capability Information Field, Allocate Address (bit 7)

Definition at line 458 of file lr-wpan-fields.h.

Referenced by CapabilityField(), GetCapability(), IsShortAddrAllocOn(), SetCapability(), and SetShortAddrAllocOn().

◆ m_deviceType

bool ns3::lrwpan::CapabilityField::m_deviceType
private

Capability Information Field, Device Type (bit 1)

Definition at line 453 of file lr-wpan-fields.h.

Referenced by CapabilityField(), GetCapability(), IsDeviceTypeFfd(), SetCapability(), and SetFfdDevice().

◆ m_powerSource

bool ns3::lrwpan::CapabilityField::m_powerSource
private

Capability Information Field, Power Source (bit 2)

Definition at line 454 of file lr-wpan-fields.h.

Referenced by CapabilityField(), GetCapability(), IsPowSrcAvailable(), SetCapability(), and SetPowSrcAvailable().

◆ m_receiverOnWhenIdle

bool ns3::lrwpan::CapabilityField::m_receiverOnWhenIdle
private

Capability Information Field, Receiver On When Idle (bit 3)

Definition at line 455 of file lr-wpan-fields.h.

Referenced by CapabilityField(), GetCapability(), IsReceiverOnWhenIdle(), SetCapability(), and SetRxOnWhenIdle().

◆ m_reservedBit0

bool ns3::lrwpan::CapabilityField::m_reservedBit0
private

Capability Information Field, Reserved (bit 0)

Definition at line 452 of file lr-wpan-fields.h.

Referenced by GetCapability(), and SetCapability().

◆ m_reservedBit45

uint8_t ns3::lrwpan::CapabilityField::m_reservedBit45
private

Capability Information Field, Reserved (bit 4 & 5)

Definition at line 456 of file lr-wpan-fields.h.

Referenced by GetCapability(), and SetCapability().

◆ m_securityCap

bool ns3::lrwpan::CapabilityField::m_securityCap
private

Capability Information Field, Security Capability (bit 6)

Definition at line 457 of file lr-wpan-fields.h.

Referenced by CapabilityField(), GetCapability(), IsSecurityCapability(), SetCapability(), and SetSecurityCap().


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