A Discrete-Event Network Simulator
API
ns3::CapabilityField Class Reference

Represent the Capability Information Field. More...

#include "lr-wpan-fields.h"

+ Collaboration diagram for ns3::CapabilityField:

Public Member Functions

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

Private Attributes

bool m_allocAddr
 Capability Information Field, Allocate Address (bit 7) More...
 
bool m_deviceType
 Capability Information Field, Device Type (bit 1) More...
 
bool m_powerSource
 Capability Information Field, Power Source (bit 2) More...
 
bool m_receiverOnWhenIdle
 Capability Information Field, Receiver On When Idle (bit 3) More...
 
bool m_securityCap
 Capability Information Field, Security Capability (bit 6) More...
 

Detailed Description

Represent the Capability Information Field.

See IEEE 802.15.4-2011 Section 5.3.1.2 Figure 50

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

Constructor & Destructor Documentation

◆ CapabilityField()

ns3::CapabilityField::CapabilityField ( )

Member Function Documentation

◆ Deserialize()

Buffer::Iterator ns3::CapabilityField::Deserialize ( Buffer::Iterator  i)

Deserialize the entire Capability Information Field.

Parameters
ian iterator which points to where the Capability information field should be read.
Returns
an iterator.

< Bit 0 (reserved)

< Bit 1

< Bit 2

< Bit 3 Bit 4-5 (reserved)

< Bit 6

< Bit 7

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

References m_allocAddr, m_deviceType, m_powerSource, m_receiverOnWhenIdle, m_securityCap, and ns3::Buffer::Iterator::ReadU8().

Referenced by ns3::CommandPayloadHeader::Deserialize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetSerializedSize()

uint32_t ns3::CapabilityField::GetSerializedSize ( void  ) const

Get the size of the serialized Capability Information Field.

Returns
the size of the serialized field.

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

Referenced by ns3::CommandPayloadHeader::GetSerializedSize().

+ Here is the caller graph for this function:

◆ IsDeviceTypeFfd()

bool ns3::CapabilityField::IsDeviceTypeFfd ( void  ) 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 539 of file lr-wpan-fields.cc.

References m_deviceType.

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

+ Here is the caller graph for this function:

◆ IsPowSrcAvailable()

bool ns3::CapabilityField::IsPowSrcAvailable ( void  ) 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 545 of file lr-wpan-fields.cc.

References m_powerSource.

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

+ Here is the caller graph for this function:

◆ IsReceiverOnWhenIdle()

bool ns3::CapabilityField::IsReceiverOnWhenIdle ( void  ) 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 551 of file lr-wpan-fields.cc.

References m_receiverOnWhenIdle.

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

+ Here is the caller graph for this function:

◆ IsSecurityCapability()

bool ns3::CapabilityField::IsSecurityCapability ( void  ) 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 558 of file lr-wpan-fields.cc.

References m_securityCap.

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

+ Here is the caller graph for this function:

◆ IsShortAddrAllocOn()

bool ns3::CapabilityField::IsShortAddrAllocOn ( void  ) 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 564 of file lr-wpan-fields.cc.

References m_allocAddr.

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

+ Here is the caller graph for this function:

◆ Serialize()

Buffer::Iterator ns3::CapabilityField::Serialize ( Buffer::Iterator  i) const

Serialize the entire Capability Information Field.

Parameters
ian iterator which points to where the Capability information field should be written.
Returns
an iterator.

< Bit 0 (reserved)

< Bit 1

< Bit 2

< Bit 3 Bit 4-5 (reserved)

< Bit 6

< Bit 7

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

References m_allocAddr, m_deviceType, m_powerSource, m_receiverOnWhenIdle, m_securityCap, and ns3::Buffer::Iterator::WriteU8().

Referenced by ns3::CommandPayloadHeader::Serialize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetFfdDevice()

void ns3::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 570 of file lr-wpan-fields.cc.

References m_deviceType.

◆ SetPowSrcAvailable()

void ns3::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 576 of file lr-wpan-fields.cc.

References m_powerSource.

◆ SetRxOnWhenIdle()

void ns3::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 582 of file lr-wpan-fields.cc.

References m_receiverOnWhenIdle.

◆ SetSecurityCap()

void ns3::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 588 of file lr-wpan-fields.cc.

References m_securityCap.

◆ SetShortAddrAllocOn()

void ns3::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 594 of file lr-wpan-fields.cc.

References m_allocAddr.

Member Data Documentation

◆ m_allocAddr

bool ns3::CapabilityField::m_allocAddr
private

Capability Information Field, Allocate Address (bit 7)

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

Referenced by CapabilityField(), Deserialize(), IsShortAddrAllocOn(), Serialize(), and SetShortAddrAllocOn().

◆ m_deviceType

bool ns3::CapabilityField::m_deviceType
private

Capability Information Field, Device Type (bit 1)

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

Referenced by CapabilityField(), Deserialize(), IsDeviceTypeFfd(), Serialize(), and SetFfdDevice().

◆ m_powerSource

bool ns3::CapabilityField::m_powerSource
private

Capability Information Field, Power Source (bit 2)

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

Referenced by CapabilityField(), Deserialize(), IsPowSrcAvailable(), Serialize(), and SetPowSrcAvailable().

◆ m_receiverOnWhenIdle

bool ns3::CapabilityField::m_receiverOnWhenIdle
private

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

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

Referenced by CapabilityField(), Deserialize(), IsReceiverOnWhenIdle(), Serialize(), and SetRxOnWhenIdle().

◆ m_securityCap

bool ns3::CapabilityField::m_securityCap
private

Capability Information Field, Security Capability (bit 6)

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

Referenced by CapabilityField(), Deserialize(), IsSecurityCapability(), Serialize(), and SetSecurityCap().


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