Represent the Superframe Specification information field. More...
#include "lr-wpan-fields.h"
Public Member Functions | |
SuperframeField () | |
Buffer::Iterator | Deserialize (Buffer::Iterator i) |
Deserialize the entire superframe specification field. More... | |
uint8_t | GetBeaconOrder (void) const |
Get the Superframe Specification Beacon Order field. More... | |
uint8_t | GetFinalCapSlot (void) const |
Get the the Final CAP Slot. More... | |
uint8_t | GetFrameOrder (void) const |
Get the Superframe Specification Frame Order field. More... | |
uint32_t | GetSerializedSize (void) const |
Get the size of the serialized Superframe specification information field. More... | |
uint16_t | GetSuperframe (void) const |
Get the Superframe specification information field. More... | |
bool | IsAssocPermit (void) const |
Check if the Association Permit bit is enabled. More... | |
bool | IsBattLifeExt (void) const |
Check if the Battery Life Extension bit is enabled. More... | |
bool | IsPanCoor (void) const |
Check if the PAN Coordinator bit is enabled. More... | |
Buffer::Iterator | Serialize (Buffer::Iterator i) const |
Serialize the entire superframe specification field. More... | |
void | SetAssocPermit (bool assocPermit) |
Set the Superframe Specification Association Permit field. More... | |
void | SetBattLifeExt (bool battLifeExt) |
Set the Superframe Specification Battery Life Extension (BLE). More... | |
void | SetBeaconOrder (uint8_t bcnOrder) |
Set the superframe specification Beacon Order field. More... | |
void | SetFinalCapSlot (uint8_t capSlot) |
Set the superframe specification Final CAP slot field. More... | |
void | SetPanCoor (bool panCoor) |
Set the Superframe Specification PAN coordinator field. More... | |
void | SetSuperframe (uint16_t superFrm) |
Set the whole Superframe Specification Information field. More... | |
void | SetSuperframeOrder (uint8_t frmOrder) |
Set the superframe specification Superframe Order field. More... | |
Private Attributes | |
bool | m_sspecAssocPermit |
Superframe Specification field Association Permit (Bit 15) More... | |
bool | m_sspecBatLifeExt |
Superframe Specification field Battery Life Extension (Bit 12) Superframe Specification field Reserved (not necessary) (Bit 13) More... | |
uint8_t | m_sspecBcnOrder |
Superframe Specification field Beacon Order (Bit 0-3) More... | |
uint8_t | m_sspecFnlCapSlot |
Superframe Specification field Final CAP slot (Bit 8-11) More... | |
bool | m_sspecPanCoor |
Superframe Specification field PAN Coordinator (Bit 14) More... | |
uint8_t | m_sspecSprFrmOrder |
Superframe Specification field Superframe Order (Bit 4-7) More... | |
Represent the Superframe Specification information field.
See IEEE 802.15.4-2011 Section 5.2.2.1.2 Figure 41
Definition at line 54 of file lr-wpan-fields.h.
ns3::SuperframeField::SuperframeField | ( | ) |
Definition at line 29 of file lr-wpan-fields.cc.
References SetAssocPermit(), SetBattLifeExt(), SetBeaconOrder(), SetFinalCapSlot(), SetPanCoor(), and SetSuperframeOrder().
Buffer::Iterator ns3::SuperframeField::Deserialize | ( | Buffer::Iterator | i | ) |
Deserialize the entire superframe specification field.
i | an iterator which points to where the superframe specification field should be read. |
Definition at line 174 of file lr-wpan-fields.cc.
References ns3::Buffer::Iterator::ReadLsbtohU16(), and SetSuperframe().
Referenced by ns3::BeaconPayloadHeader::Deserialize().
uint8_t ns3::SuperframeField::GetBeaconOrder | ( | void | ) | const |
Get the Superframe Specification Beacon Order field.
Definition at line 109 of file lr-wpan-fields.cc.
References m_sspecBcnOrder.
Referenced by ns3::operator<<(), and ns3::LrWpanMac::PdDataIndication().
uint8_t ns3::SuperframeField::GetFinalCapSlot | ( | void | ) | const |
Get the the Final CAP Slot.
Definition at line 121 of file lr-wpan-fields.cc.
References m_sspecFnlCapSlot.
Referenced by ns3::operator<<(), and ns3::LrWpanMac::PdDataIndication().
uint8_t ns3::SuperframeField::GetFrameOrder | ( | void | ) | const |
Get the Superframe Specification Frame Order field.
Definition at line 115 of file lr-wpan-fields.cc.
References m_sspecSprFrmOrder.
Referenced by ns3::operator<<(), and ns3::LrWpanMac::PdDataIndication().
uint32_t ns3::SuperframeField::GetSerializedSize | ( | void | ) | const |
Get the size of the serialized Superframe specification information field.
Definition at line 161 of file lr-wpan-fields.cc.
Referenced by ns3::BeaconPayloadHeader::GetSerializedSize().
uint16_t ns3::SuperframeField::GetSuperframe | ( | void | ) | const |
Get the Superframe specification information field.
Definition at line 145 of file lr-wpan-fields.cc.
References m_sspecAssocPermit, m_sspecBatLifeExt, m_sspecBcnOrder, m_sspecFnlCapSlot, m_sspecPanCoor, and m_sspecSprFrmOrder.
Referenced by Serialize().
bool ns3::SuperframeField::IsAssocPermit | ( | void | ) | const |
Check if the Association Permit bit is enabled.
Definition at line 139 of file lr-wpan-fields.cc.
References m_sspecAssocPermit.
Referenced by ns3::operator<<().
bool ns3::SuperframeField::IsBattLifeExt | ( | void | ) | const |
Check if the Battery Life Extension bit is enabled.
Definition at line 127 of file lr-wpan-fields.cc.
References m_sspecBatLifeExt.
Referenced by ns3::operator<<(), and ns3::LrWpanMac::PdDataIndication().
bool ns3::SuperframeField::IsPanCoor | ( | void | ) | const |
Check if the PAN Coordinator bit is enabled.
Definition at line 133 of file lr-wpan-fields.cc.
References m_sspecPanCoor.
Referenced by ns3::operator<<().
Buffer::Iterator ns3::SuperframeField::Serialize | ( | Buffer::Iterator | i | ) | const |
Serialize the entire superframe specification field.
i | an iterator which points to where the superframe specification field should be written. |
Definition at line 167 of file lr-wpan-fields.cc.
References GetSuperframe(), and ns3::Buffer::Iterator::WriteHtolsbU16().
Referenced by ns3::BeaconPayloadHeader::Serialize().
void ns3::SuperframeField::SetAssocPermit | ( | bool | assocPermit | ) |
Set the Superframe Specification Association Permit field.
assocPermit | set true or false the value of the Association Permit flag of the superframe field. |
Definition at line 103 of file lr-wpan-fields.cc.
References m_sspecAssocPermit.
Referenced by SuperframeField().
void ns3::SuperframeField::SetBattLifeExt | ( | bool | battLifeExt | ) |
Set the Superframe Specification Battery Life Extension (BLE).
battLifeExt | Sets true or false the value of the Battery Life Extension flag of the superframe field. |
Definition at line 91 of file lr-wpan-fields.cc.
References m_sspecBatLifeExt.
Referenced by SuperframeField(), and ns3::LrWpanMac::GetSuperframeField().
void ns3::SuperframeField::SetBeaconOrder | ( | uint8_t | bcnOrder | ) |
Set the superframe specification Beacon Order field.
bcnOrder | The beacon order value to set in the superframe. |
Definition at line 52 of file lr-wpan-fields.cc.
References m_sspecBcnOrder.
Referenced by SuperframeField(), and ns3::LrWpanMac::GetSuperframeField().
void ns3::SuperframeField::SetFinalCapSlot | ( | uint8_t | capSlot | ) |
Set the superframe specification Final CAP slot field.
capSlot | Set the final slot of the Contention Access Period (CAP). |
Definition at line 78 of file lr-wpan-fields.cc.
References m_sspecFnlCapSlot.
Referenced by SuperframeField(), and ns3::LrWpanMac::GetSuperframeField().
void ns3::SuperframeField::SetPanCoor | ( | bool | panCoor | ) |
Set the Superframe Specification PAN coordinator field.
panCoor | set true or false the value for the PAN Coordinator flag of the superframe field. |
Definition at line 97 of file lr-wpan-fields.cc.
References m_sspecPanCoor.
Referenced by SuperframeField(), and ns3::LrWpanMac::GetSuperframeField().
void ns3::SuperframeField::SetSuperframe | ( | uint16_t | superFrm | ) |
Set the whole Superframe Specification Information field.
superFrm | The Superframe Specification information field. |
Definition at line 40 of file lr-wpan-fields.cc.
References m_sspecAssocPermit, m_sspecBatLifeExt, m_sspecBcnOrder, m_sspecFnlCapSlot, m_sspecPanCoor, and m_sspecSprFrmOrder.
Referenced by Deserialize().
void ns3::SuperframeField::SetSuperframeOrder | ( | uint8_t | frmOrder | ) |
Set the superframe specification Superframe Order field.
frmOrder | The frame Order value to set on the superframe. |
Definition at line 65 of file lr-wpan-fields.cc.
References m_sspecSprFrmOrder.
Referenced by SuperframeField(), and ns3::LrWpanMac::GetSuperframeField().
|
private |
Superframe Specification field Association Permit (Bit 15)
Definition at line 157 of file lr-wpan-fields.h.
Referenced by GetSuperframe(), IsAssocPermit(), SetAssocPermit(), and SetSuperframe().
|
private |
Superframe Specification field Battery Life Extension (Bit 12) Superframe Specification field Reserved (not necessary) (Bit 13)
Definition at line 154 of file lr-wpan-fields.h.
Referenced by GetSuperframe(), IsBattLifeExt(), SetBattLifeExt(), and SetSuperframe().
|
private |
Superframe Specification field Beacon Order (Bit 0-3)
Definition at line 151 of file lr-wpan-fields.h.
Referenced by GetBeaconOrder(), GetSuperframe(), SetBeaconOrder(), and SetSuperframe().
|
private |
Superframe Specification field Final CAP slot (Bit 8-11)
Definition at line 153 of file lr-wpan-fields.h.
Referenced by GetFinalCapSlot(), GetSuperframe(), SetFinalCapSlot(), and SetSuperframe().
|
private |
Superframe Specification field PAN Coordinator (Bit 14)
Definition at line 156 of file lr-wpan-fields.h.
Referenced by GetSuperframe(), IsPanCoor(), SetPanCoor(), and SetSuperframe().
|
private |
Superframe Specification field Superframe Order (Bit 4-7)
Definition at line 152 of file lr-wpan-fields.h.
Referenced by GetFrameOrder(), GetSuperframe(), SetSuperframe(), and SetSuperframeOrder().