|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
22 #include "ns3/packet.h"
29 m_aid (0), m_lastBeacon (0), m_beaconInterval (0)
133 os <<
"BeaconTiming=(Number of units=" << (uint16_t)
m_numOfUnits;
136 os <<
"(AID=" << (uint16_t)(*j)->GetAid () <<
", Last beacon at=" << (*j)->GetLastBeacon ()
137 <<
", with beacon interval=" << (*j)->GetBeaconInterval () <<
")";
182 return (uint8_t)(
x & 0xff);
209 catch (std::bad_cast&)
static uint8_t AidToU8(uint16_t x)
Aid to U8 function.
void WriteHtolsbU16(uint16_t data)
bool operator==(const MeshHeader &a, const MeshHeader &b)
void DelNeighboursTimingElementUnit(uint16_t aid, Time last_beacon, Time beacon_interval)
Delete neighbors timing element unit.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void ClearTimingElement()
Clear timing element.
uint32_t GetDistanceFrom(Iterator const &o) const
virtual uint8_t GetInformationFieldSize() const
Length of serialized information (i.e., the length of the body of the IE, not including the Element I...
See 7.3.2.89 of 802.11s draft 2.07.
virtual WifiInformationElementId ElementId() const
void WriteU8(uint8_t data)
uint16_t m_beaconInterval
Beacon interval of remote mesh point.
uint8_t WifiInformationElementId
This type is used to represent an Information Element ID.
U * PeekPointer(const Ptr< U > &p)
virtual void SerializeInformationField(Buffer::Iterator i) const
Serialize information (i.e., the body of the IE, not including the Element ID and length octets)
NeighboursTimingUnitsList GetNeighboursTimingElementsList()
This methods are needed for beacon collision avoidance module:
int64_t GetMicroSeconds(void) const
Get an approximation of the time stored in this instance in the indicated unit.
Information element describing one unit of beacon timing element.
void SetLastBeacon(uint16_t lastBeacon)
Set last beacon value.
uint16_t GetLastBeacon() const
Get last beacon value.
uint8_t m_aid
Least significant octet of AID:
Simulation virtual time values and global simulation resolution.
bool operator==(WifiInformationElement const &a) const
equality operator
void SetBeaconInterval(uint16_t beaconInterval)
Set beacon interval value.
NeighboursTimingUnitsList m_neighbours
the neighbors
uint16_t ReadLsbtohU16(void)
std::vector< Ptr< IeBeaconTimingUnit > > NeighboursTimingUnitsList
This type is a list of timing elements obtained from neighbours with their beacons:
iterator in a Buffer instance
uint16_t m_numOfUnits
Timing element parameters:
static uint16_t BeaconIntervalToU16(Time x)
Beacon interval to U16 function.
virtual uint8_t DeserializeInformationField(Buffer::Iterator i, uint8_t length)
Deserialize information (i.e., the body of the IE, not including the Element ID and length octets)
void AddNeighboursTimingElementUnit(uint16_t aid, Time last_beacon, Time beacon_interval)
Add neighbors timing element unit.
uint16_t GetBeaconInterval() const
Get beacon interval.
uint8_t GetAid() const
Get AID value.
static uint16_t TimestampToU16(Time x)
Timestamp to U16 function.
std::ostream & operator<<(std::ostream &os, const IeBeaconTiming &a)
void SetAid(uint8_t aid)
Set AID value.
uint16_t m_lastBeacon
Last time we received a beacon in accordance with a local TSF measured in 256 microseconds unit.
virtual void Print(std::ostream &os) const
Generate human-readable form of IE.