22 #include "ns3/packet.h"
29 m_aid (0), m_lastBeacon (0), m_beaconInterval (0)
133 os << std::endl <<
"<information_element id=" <<
ElementId () <<
">" << std::endl;
134 os <<
"Number of units: " << (uint16_t)
m_numOfUnits << std::endl;
137 os <<
"AID=" << (uint16_t)(*j)->GetAid () <<
", Last beacon was at " << (*j)->GetLastBeacon ()
138 <<
", with beacon interval " << (*j)->GetBeaconInterval () << std::endl;
140 os <<
"</information_element>" << std::endl;
183 return (uint8_t)(x & 0xff);
210 catch (std::bad_cast)
uint8_t m_aid
Least significant octet of AID:
keep track of time values and allow control of global simulation resolution
uint16_t GetBeaconInterval() const
NeighboursTimingUnitsList m_neighbours
uint16_t GetLastBeacon() const
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) ...
uint16_t m_lastBeacon
Last time we received a beacon in accordance with a local TSF measured in 256 microseconds unit...
NeighboursTimingUnitsList GetNeighboursTimingElementsList()
This methods are needed for beacon collision avoidance module:
bool operator==(const MeshHeader &a, const MeshHeader &b)
std::vector< Ptr< IeBeaconTimingUnit > > NeighboursTimingUnitsList
This type is a list of timing elements obtained from neighbours with their beacons: ...
uint32_t GetDistanceFrom(Iterator const &o) const
iterator in a Buffer instance
void SetBeaconInterval(uint16_t beaconInterval)
int64_t GetMicroSeconds(void) const
void ClearTimingElement()
static uint16_t BeaconIntervalToU16(Time x)
See 7.3.2.89 of 802.11s draft 2.07.
T * PeekPointer(const Ptr< T > &p)
uint16_t m_numOfUnits
Timing element parameters:
virtual void Print(std::ostream &os) const
In addition, a subclass may optionally override the following...
virtual uint8_t GetInformationFieldSize() const
Length of serialized information (i.e., the length of the body of the IE, not including the Element I...
void WriteHtolsbU16(uint16_t data)
static uint16_t TimestampToU16(Time x)
Converters:
void WriteU8(uint8_t data)
uint16_t m_beaconInterval
Beacon interval of remote mesh point.
virtual WifiInformationElementId ElementId() const
Own unique Element ID.
void DelNeighboursTimingElementUnit(uint16_t aid, Time last_beacon, Time beacon_interval)
uint16_t ReadLsbtohU16(void)
uint8_t WifiInformationElementId
This type is used to represent an Information Element ID.
void AddNeighboursTimingElementUnit(uint16_t aid, Time last_beacon, Time beacon_interval)
void SetLastBeacon(uint16_t lastBeacon)
std::ostream & operator<<(std::ostream &os, const IeBeaconTiming &a)
virtual void SerializeInformationField(Buffer::Iterator i) const
Serialize information (i.e., the body of the IE, not including the Element ID and length octets) ...
Describes one unit of beacon timing element.
static uint8_t AidToU8(uint16_t x)
bool operator==(WifiInformationElement const &a) const
Compare two IEs for equality by ID & Length, and then through memcmp of serialised version...