|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
25 #include <ns3/address-utils.h>
56 std::cout <<
"SuperframeField Beacon Order value must be 15 or less\n";
69 std::cout <<
"SuperframeField Frame Order value must be 15 or less\n";
82 std::cout <<
"The final slot cannot greater than the slots in a CAP (15)\n";
185 os <<
" Beacon Order = " << uint32_t (superframeField.
GetBeaconOrder ())
186 <<
", Frame Order = " << uint32_t (superframeField.
GetFrameOrder ())
187 <<
", Final CAP slot = " << uint32_t (superframeField.
GetFinalCapSlot ())
188 <<
", Battery Life Ext = " << bool (superframeField.
IsBattLifeExt ())
189 <<
", PAN Coordinator = " << bool (superframeField.
IsPanCoor ())
190 <<
", Association Permit = " << bool (superframeField.
IsAssocPermit ());
210 uint8_t gtsSpecField;
222 uint8_t gtsDirectionField;
226 return gtsDirectionField;
266 uint8_t gtsDescStartAndLenght;
276 i.
WriteU8 (gtsDescStartAndLenght);
286 uint8_t gtsSpecField = i.
ReadU8 ();
291 uint8_t gtsDirectionField = i.
ReadU8 ();
294 uint8_t gtsDescStartAndLenght;
299 gtsDescStartAndLenght = i.
ReadU8 ();
310 os <<
" GTS specification = " << uint32_t (gtsFields.
GetGtsSpecField ())
342 uint8_t pndAddrSpecField;
349 return pndAddrSpecField;
357 if (totalPendAddr == 7)
373 if (totalPendAddr == 7)
457 uint8_t pndAddrSpecField = i.
ReadU8 ();
477 os <<
" Num. Short Addr = " << uint32_t (pendingAddrFields.
GetNumShortAddr ())
478 <<
", Num. Ext Addr = " << uint32_t (pendingAddrFields.
GetNumExtAddr ());
void SetFinalCapSlot(uint8_t capSlot)
Set the superframe specification Final CAP slot field.
uint8_t GetNumShortAddr(void) const
Get the number of Short Pending Address indicated in the Pending Address Specification Field.
uint8_t GetBeaconOrder(void) const
Get the Superframe Specification Beacon Order field.
bool IsBattLifeExt(void) const
Check if the Battery Life Extension bit is enabled.
bool m_sspecBatLifeExt
Superframe Specification field Battery Life Extension (Bit 12) Superframe Specification field Reserve...
void SetBattLifeExt(bool battLifeExt)
Set the Superframe Specification Battery Life Extension (BLE).
bool m_sspecPanCoor
Superframe Specification field PAN Coordinator (Bit 14)
void WriteHtolsbU16(uint16_t data)
uint8_t GetPndAddrSpecField(void) const
Get the whole Pending Address Specification Field from the Pending Address Fields.
gtsDescriptor m_gtsList[7]
GTS List field (maximum descriptors stored == 7)
uint8_t m_sspecBcnOrder
Superframe Specification field Beacon Order (Bit 0-3)
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void SetSuperframeOrder(uint8_t frmOrder)
Set the superframe specification Superframe Order field.
Represent the Pending Address Specification field.
This class can contain 16 bit addresses.
uint8_t GetFrameOrder(void) const
Get the Superframe Specification Frame Order field.
void SetBeaconOrder(uint8_t bcnOrder)
Set the superframe specification Beacon Order field.
void WriteU8(uint8_t data)
void SetGtsSpecField(uint8_t gtsSpec)
Set the GTS Specification Field to the GTS Fields.
uint8_t m_gtsSpecPermit
GTS specification field GTS Permit (Bit 7)
Represent the Superframe Specification information field.
uint32_t GetSerializedSize(void) const
Get the size of the serialized Superframe specification information field.
void SetPndAddrSpecField(uint8_t pndAddrSpecField)
Set the whole Pending Address Specification field.
uint8_t m_pndAddrSpecNumExtAddr
Pending Address Specification field Number of Extended Address (Bits 4-6) Pending Address Specificati...
uint8_t m_sspecFnlCapSlot
Superframe Specification field Final CAP slot (Bit 8-11)
void SetPanCoor(bool panCoor)
Set the Superframe Specification PAN coordinator field.
Buffer::Iterator Serialize(Buffer::Iterator i) const
Serialize the entire Pending Address Fields.
void SetGtsDirectionField(uint8_t gtsDir)
Set the GTS direction field to the GTS Fields.
Buffer::Iterator Deserialize(Buffer::Iterator i)
Deserialize the all the Pending Address Fields.
void SetSuperframe(uint16_t superFrm)
Set the whole Superframe Specification Information field.
bool IsPanCoor(void) const
Check if the PAN Coordinator bit is enabled.
uint8_t m_pndAddrSpecNumShortAddr
Pending Address Specification field Number of Short Address (Bits 0-2) Pending Address Specification ...
uint8_t m_sspecSprFrmOrder
Superframe Specification field Superframe Order (Bit 4-7)
Buffer::Iterator Deserialize(Buffer::Iterator i)
Deserialize the entire GTS fields.
bool m_sspecAssocPermit
Superframe Specification field Association Permit (Bit 15)
uint8_t GetGtsDirectionField(void) const
Get the GTS Direction Field from the GTS Fields.
Represent the GTS information fields.
Buffer::Iterator Serialize(Buffer::Iterator i) const
Serialize the entire superframe specification field.
uint32_t GetSerializedSize(void) const
Get the size of the serialized Pending Address Fields.
uint16_t ReadLsbtohU16(void)
iterator in a Buffer instance
Buffer::Iterator Serialize(Buffer::Iterator i) const
Serialize the entire GTS fields.
Buffer::Iterator Deserialize(Buffer::Iterator i)
Deserialize the entire superframe specification field.
bool SearchAddress(Mac16Address shortAddr)
Search for the short Pending Address in the Address List.
void WriteTo(Buffer::Iterator &i, Ipv4Address ad)
Write an Ipv4Address to a Buffer.
void SetAssocPermit(bool assocPermit)
Set the Superframe Specification Association Permit field.
uint8_t m_gtsDescLength
GTS Descriptor GTS Length (Bit 20-23)
void AddAddress(Mac16Address shortAddr)
Add a short Pending Address to the Address List.
uint8_t m_gtsDirMask
GTS Direction field Directions Mask (Bit 0-6)
uint8_t m_gtsDescStartSlot
GTS Descriptor GTS Starting Slot(Bit 16-19)
uint8_t m_gtsSpecDescCount
GTS specification field Descriptor Count (Bit 0-2)
std::array< Mac16Address, 7 > m_shortAddrList
Pending Short Address List.
std::array< Mac64Address, 7 > m_extAddrList
Pending Extended Address List.
uint8_t GetFinalCapSlot(void) const
Get the the Final CAP Slot.
uint8_t GetGtsSpecField(void) const
Get the GTS Specification Field from the GTS Fields.
uint8_t GetNumExtAddr(void) const
Get the number of Extended Pending Address indicated in the Pending Address Specification Field.
std::ostream & operator<<(std::ostream &os, const Angles &a)
uint32_t GetSerializedSize(void) const
Get the size of the serialized GTS fields.
bool IsAssocPermit(void) const
Check if the Association Permit bit is enabled.
uint16_t GetSuperframe(void) const
Get the Superframe specification information field.
void ReadFrom(Buffer::Iterator &i, Ipv4Address &ad)
Read an Ipv4Address from a Buffer.