Fixes with comments
This commit is contained in:
@@ -71,10 +71,9 @@ IeDot11sBeaconTimingUnit::GetBeaconInterval()
|
||||
/*******************************************
|
||||
* IeDot11sBeaconTiming
|
||||
*******************************************/
|
||||
IeDot11sBeaconTiming::IeDot11sBeaconTiming()
|
||||
IeDot11sBeaconTiming::IeDot11sBeaconTiming():
|
||||
m_numOfUnits(0)
|
||||
{
|
||||
m_maxSize = DEFAULT_MAX_SIZE;
|
||||
m_numOfUnits = 0;
|
||||
}
|
||||
|
||||
IeDot11sBeaconTiming::NeighboursTimingUnitsList
|
||||
|
||||
@@ -44,12 +44,18 @@ public:
|
||||
uint16_t GetLastBeacon();
|
||||
uint16_t GetBeaconInterval();
|
||||
private:
|
||||
//Least significant octet of AID:
|
||||
/**
|
||||
* Least significant octet of AID:
|
||||
*/
|
||||
uint8_t AID;
|
||||
//Last time we received a beacon in accordance with a
|
||||
//local TSF measured in 256 microseconds unit:
|
||||
/**
|
||||
* Last time we received a beacon in accordance with a
|
||||
* local TSF measured in 256 microseconds unit:
|
||||
*/
|
||||
uint16_t LastBeacon;
|
||||
//Beacon interval of remote mesh point:
|
||||
/**
|
||||
* Beacon interval of remote mesh point:
|
||||
*/
|
||||
uint16_t BeaconInterval;
|
||||
};
|
||||
|
||||
@@ -66,30 +72,26 @@ public:
|
||||
typedef std::list< Ptr<IeDot11sBeaconTimingUnit> > NeighboursTimingUnitsList;
|
||||
|
||||
IeDot11sBeaconTiming();
|
||||
//This methods are needed for beacon collision
|
||||
//avoidance module:
|
||||
/**
|
||||
* This methods are needed for beacon collision
|
||||
* avoidance module:
|
||||
*/
|
||||
NeighboursTimingUnitsList GetNeighboursTimingElementsList();
|
||||
//The arguments of the following methods are different
|
||||
//from internalBeaconTimingElementUnint. This was made
|
||||
//for better communication with peer manager.
|
||||
//BeaconTimingElement class should convert it into
|
||||
//proper types:
|
||||
void AddNeighboursTimingElementUnit(
|
||||
uint16_t aid,
|
||||
Time last_beacon, //MicroSeconds!
|
||||
Time beacon_interval //MicroSeconds!
|
||||
Time last_beacon,
|
||||
Time beacon_interval
|
||||
);
|
||||
void DelNeighboursTimingElementUnit(
|
||||
uint16_t aid,
|
||||
Time last_beacon, //MicroSeconds!
|
||||
Time beacon_interval //MicroSeconds!
|
||||
Time last_beacon,
|
||||
Time beacon_interval
|
||||
);
|
||||
void ClearTimingElement();
|
||||
protected:
|
||||
WifiElementId ElementId() const {
|
||||
return IE11S_BEACON_TIMING;
|
||||
}
|
||||
//Serialize-deserialize methods:
|
||||
uint8_t GetInformationSize () const;
|
||||
void SerializeInformation (Buffer::Iterator i) const;
|
||||
uint8_t DeserializeInformation (Buffer::Iterator i, uint8_t length);
|
||||
@@ -99,8 +101,6 @@ private:
|
||||
static uint16_t BeaconIntervalToU16(Time x);
|
||||
static uint8_t AidToU8(uint16_t x);
|
||||
NeighboursTimingUnitsList m_neighbours;
|
||||
//The maximum size of this element:
|
||||
const static uint16_t DEFAULT_MAX_SIZE = 255*5 +2;
|
||||
uint16_t m_maxSize;
|
||||
uint16_t m_numOfUnits;
|
||||
};
|
||||
|
||||
@@ -62,9 +62,15 @@ protected:
|
||||
private:
|
||||
uint8_t m_length;
|
||||
uint8_t m_subtype;
|
||||
uint16_t m_localLinkId; //always is present
|
||||
uint16_t m_peerLinkId; //only in confirm and may be present in close frame
|
||||
dot11sReasonCode m_reasonCode; //only in close frame
|
||||
uint16_t m_localLinkId;
|
||||
/**
|
||||
* Present within confirm and may be present in close
|
||||
*/
|
||||
uint16_t m_peerLinkId;
|
||||
/**
|
||||
* Present only within close frame
|
||||
*/
|
||||
dot11sReasonCode m_reasonCode;
|
||||
};
|
||||
} //namespace NS3
|
||||
#endif
|
||||
|
||||
@@ -37,7 +37,6 @@ class DestinationAddressUnit : public RefCountBase
|
||||
public:
|
||||
DestinationAddressUnit();
|
||||
void SetFlags(bool doFlag, bool rfflag);
|
||||
//void SetPerDestFlags(uint8_t per_dest_flags);
|
||||
void SetDestinationAddress(Mac48Address dest_address);
|
||||
void SetDestSeqNumber(uint32_t dest_seq_number);
|
||||
bool IsDo();
|
||||
@@ -71,7 +70,6 @@ public:
|
||||
void DelDestinationAddressElement(Mac48Address dest_address);
|
||||
void ClearDestinationAddressElement();
|
||||
std::vector<Ptr<DestinationAddressUnit> > GetDestinationList ();
|
||||
//void SetFlags(uint8_t flags);
|
||||
void SetUnicastPreq();
|
||||
/*
|
||||
* \brief In proactive case: need we send PREP
|
||||
@@ -86,7 +84,6 @@ public:
|
||||
void SetMetric(uint32_t metric);
|
||||
void SetDestCount(uint8_t dest_count);
|
||||
|
||||
//uint8_t GetFlags() const ;
|
||||
bool IsUnicastPreq() const;
|
||||
bool IsNeedNotPrep() const;
|
||||
uint8_t GetHopCount() const;
|
||||
@@ -108,9 +105,13 @@ protected:
|
||||
uint8_t GetInformationSize() const;
|
||||
void PrintInformation(std::ostream& os) const;
|
||||
private:
|
||||
//how many destinations we support
|
||||
/**
|
||||
* how many destinations we support
|
||||
*/
|
||||
uint8_t m_maxSize; //TODO: make as an attrubute
|
||||
//Fields:
|
||||
/**
|
||||
* Fields of information element:
|
||||
*/
|
||||
uint8_t m_flags;
|
||||
uint8_t m_hopCount;
|
||||
uint8_t m_ttl;
|
||||
|
||||
Reference in New Issue
Block a user