802.11s Peer Management Protocol model More...
#include "peer-management-protocol.h"
Classes | |
struct | BeaconInfo |
Keeps information about beacon of peer station: beacon interval, association ID, last time we have received a beacon. More... | |
struct | Statistics |
Statistics structure. More... | |
Public Types | |
typedef void(* | LinkOpenCloseTracedCallback) (Mac48Address src, const Mac48Address dst) |
TracedCallback signature for link open/close events. More... | |
Public Member Functions | |
PeerManagementProtocol () | |
PeerManagementProtocol (const PeerManagementProtocol &)=delete | |
~PeerManagementProtocol () override | |
int64_t | AssignStreams (int64_t stream) |
Assign a fixed random variable stream number to the random variables used by this model. More... | |
void | DoDispose () override |
Destructor implementation. More... | |
bool | Install (Ptr< MeshPointDevice > mp) |
Install PMP on given mesh point. More... | |
PeerManagementProtocol & | operator= (const PeerManagementProtocol &)=delete |
void | Report (std::ostream &os) const |
Report statistics. More... | |
void | ResetStats () |
Reset statistics function. More... | |
This methods interact with MAC_layer plug-in | |
Methods that handle beacon sending/receiving procedure. | |
Ptr< IeBeaconTiming > | GetBeaconTimingElement (uint32_t interface) |
When we are sending a beacon - we fill beacon timing element. More... | |
void | ReceiveBeacon (uint32_t interface, Mac48Address peerAddress, Time beaconInterval, Ptr< IeBeaconTiming > beaconTiming) |
To initiate peer link we must notify about received beacon. More... | |
Methods that handle Peer link management frames interaction: | |
void | ReceivePeerLinkFrame (uint32_t interface, Mac48Address peerAddress, Mac48Address peerMeshPointAddress, uint16_t aid, IePeerManagement peerManagementElement, IeConfiguration meshConfig) |
Deliver Peer link management information to the protocol-part. More... | |
void | ConfigurationMismatch (uint32_t interface, Mac48Address peerAddress) |
Cancels peer link due to broken configuration (Mesh ID or Supported rates) More... | |
void | TransmissionFailure (uint32_t interface, const Mac48Address peerAddress) |
Cancels peer link due to successive transmission failures. More... | |
void | TransmissionSuccess (uint32_t interface, const Mac48Address peerAddress) |
resets transmission failure statistics More... | |
bool | IsActiveLink (uint32_t interface, Mac48Address peerAddress) |
Checks if there is established link. More... | |
Interface to other protocols (MLME) | |
void | SetPeerLinkStatusCallback (Callback< void, Mac48Address, Mac48Address, uint32_t, bool > cb) |
Set peer link status change callback. More... | |
Ptr< PeerLink > | FindPeerLink (uint32_t interface, Mac48Address peerAddress) |
Find active peer link by my interface and peer interface MAC. More... | |
std::vector< Ptr< PeerLink > > | GetPeerLinks () const |
Get list of all active peer links. More... | |
std::vector< Mac48Address > | GetPeers (uint32_t interface) const |
Get list of active peers of my given interface. More... | |
Mac48Address | GetAddress () |
Get mesh point address. More... | |
uint8_t | GetNumberOfLinks () const |
Get number of links. More... | |
void | SetMeshId (std::string s) |
Set mesh ID to a string value. More... | |
Ptr< IeMeshId > | GetMeshId () const |
Get mesh ID information element. More... | |
void | SetBeaconCollisionAvoidance (bool enable) |
Enable or disable beacon collision avoidance. More... | |
bool | GetBeaconCollisionAvoidance () const |
Get beacon collision avoidance. More... | |
void | NotifyBeaconSent (uint32_t interface, Time beaconInterval) |
Notify about beacon send event, needed to schedule BCA. More... | |
Public Member Functions inherited from ns3::Object | |
Object () | |
Constructor. More... | |
~Object () override | |
Destructor. More... | |
void | AggregateObject (Ptr< Object > other) |
Aggregate two Objects together. More... | |
void | Dispose () |
Dispose of this Object. More... | |
AggregateIterator | GetAggregateIterator () const |
Get an iterator to the Objects aggregated to this one. More... | |
TypeId | GetInstanceTypeId () const override |
Get the most derived TypeId for this Object. More... | |
template<typename T > | |
Ptr< T > | GetObject () const |
Get a pointer to the requested aggregated Object. More... | |
template<> | |
Ptr< Object > | GetObject () const |
Specialization of () for objects of type ns3::Object. More... | |
template<typename T > | |
Ptr< T > | GetObject (TypeId tid) const |
Get a pointer to the requested aggregated Object by TypeId. More... | |
template<> | |
Ptr< Object > | GetObject (TypeId tid) const |
Specialization of (TypeId tid) for objects of type ns3::Object. More... | |
void | Initialize () |
Invoke DoInitialize on all Objects aggregated to this one. More... | |
bool | IsInitialized () const |
Check if the object has been initialized. More... | |
Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
SimpleRefCount () | |
Default constructor. More... | |
SimpleRefCount (const SimpleRefCount &o[[maybe_unused]]) | |
Copy constructor. More... | |
uint32_t | GetReferenceCount () const |
Get the reference count of the object. More... | |
SimpleRefCount & | operator= (const SimpleRefCount &o[[maybe_unused]]) |
Assignment operator. More... | |
void | Ref () const |
Increment the reference count. More... | |
void | Unref () const |
Decrement the reference count. More... | |
Public Member Functions inherited from ns3::ObjectBase | |
virtual | ~ObjectBase () |
Virtual destructor. More... | |
void | GetAttribute (std::string name, AttributeValue &value) const |
Get the value of an attribute, raising fatal errors if unsuccessful. More... | |
bool | GetAttributeFailSafe (std::string name, AttributeValue &value) const |
Get the value of an attribute without raising errors. More... | |
void | SetAttribute (std::string name, const AttributeValue &value) |
Set a single attribute, raising fatal errors if unsuccessful. More... | |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
Set a single attribute without raising errors. More... | |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
Connect a TraceSource to a Callback with a context. More... | |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
Connect a TraceSource to a Callback without a context. More... | |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected with a context. More... | |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected without a context. More... | |
Static Public Member Functions | |
static TypeId | GetTypeId () |
Get the type ID. More... | |
Static Public Member Functions inherited from ns3::Object | |
static TypeId | GetTypeId () |
Register this type. More... | |
Static Public Member Functions inherited from ns3::ObjectBase | |
static TypeId | GetTypeId () |
Get the type ID. More... | |
Private Types | |
typedef std::map< uint32_t, BeaconsOnInterface > | BeaconInfoMap |
This map keeps beacon information on all interfaces. More... | |
typedef std::map< Mac48Address, BeaconInfo > | BeaconsOnInterface |
This map keeps relationship between peer address and its beacon information. More... | |
typedef std::map< uint32_t, PeerLinksOnInterface > | PeerLinksMap |
This map keeps all peer links. More... | |
typedef std::vector< Ptr< PeerLink > > | PeerLinksOnInterface |
We keep a vector of pointers to PeerLink class. More... | |
typedef std::map< uint32_t, Ptr< PeerManagementProtocolMac > > | PeerManagementProtocolMacMap |
this vector keeps pointers to MAC-plugins More... | |
Private Member Functions | |
void | CheckBeaconCollisions (uint32_t interface) |
BCA. More... | |
void | DoInitialize () override |
Initialize() implementation. More... | |
Ptr< PeerLink > | InitiateLink (uint32_t interface, Mac48Address peerAddress, Mac48Address peerMeshPointAddress) |
Initiate link function. More... | |
void | NotifyLinkClose (Mac48Address peerMp, Mac48Address peerIface, Mac48Address myIface, uint32_t interface) |
Aux. More... | |
void | NotifyLinkOpen (Mac48Address peerMp, Mac48Address peerIface, Mac48Address myIface, uint32_t interface) |
Aux. More... | |
void | PeerLinkStatus (uint32_t interface, Mac48Address peerAddress, Mac48Address peerMeshPointAddress, PeerLink::PeerState ostate, PeerLink::PeerState nstate) |
Indicates changes in peer links. More... | |
void | ShiftOwnBeacon (uint32_t interface) |
Shift own beacon function. More... | |
bool | ShouldAcceptOpen (uint32_t interface, Mac48Address peerAddress, PmpReasonCode &reasonCode) const |
External peer-chooser. More... | |
bool | ShouldSendOpen (uint32_t interface, Mac48Address peerAddress) const |
External peer-chooser. More... | |
int | TimeToTu (Time x) |
Time<-->TU converters: More... | |
Time | TuToTime (int x) |
Time<-->TU converters: More... | |
Private Attributes | |
Mac48Address | m_address |
address More... | |
std::map< uint32_t, Time > | m_beaconInterval |
Beacon interval at each interface. More... | |
bool | m_enableBca |
Flag which enables BCA. More... | |
uint16_t | m_lastAssocId |
last associated ID More... | |
std::map< uint32_t, Time > | m_lastBeacon |
Last beacon at each interface. More... | |
uint16_t | m_lastLocalLinkId |
last local link ID More... | |
uint16_t | m_maxBeaconShift |
Beacon can be shifted at [-m_maxBeaconShift; +m_maxBeaconShift] TUs. More... | |
uint8_t | m_maxNumberOfPeerLinks |
maimum number of peer links More... | |
Ptr< IeMeshId > | m_meshId |
mesh ID More... | |
PeerManagementProtocolMacMap | m_plugins |
plugins More... | |
Peer Links | |
typedef TracedCallback< Mac48Address, Mac48Address > | LinkEventCallback |
Simple link open/close trace source type. Addresses are: src interface, dst interface. More... | |
PeerLinksMap | m_peerLinks |
Simple link open/close trace source type. Addresses are: src interface, dst interface. More... | |
Callback< void, Mac48Address, Mac48Address, uint32_t, bool > | m_peerStatusCallback |
Callback to notify about peer link changes: Mac48Address is peer address of mesh point, Mac48Address is peer address of interface, uint32_t - interface ID, bool is status - true when new link has appeared, false - when link was closed,. More... | |
LinkEventCallback | m_linkOpenTraceSrc |
LinkOpen trace source. More... | |
LinkEventCallback | m_linkCloseTraceSrc |
LinkClose trace source. More... | |
Statistics | m_stats |
statistics More... | |
Ptr< UniformRandomVariable > | m_beaconShift |
Add randomness to beacon shift. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from ns3::Object | |
Object (const Object &o) | |
Copy an Object. More... | |
virtual void | NotifyNewAggregate () |
Notify all Objects aggregated to this one of a new Object being aggregated. More... | |
Protected Member Functions inherited from ns3::ObjectBase | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
Complete construction of ObjectBase; invoked by derived classes. More... | |
virtual void | NotifyConstructionCompleted () |
Notifier called once the ObjectBase is fully constructed. More... | |
Related Functions inherited from ns3::ObjectBase | |
static TypeId | GetObjectIid () |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. More... | |
802.11s Peer Management Protocol model
Definition at line 54 of file peer-management-protocol.h.
|
private |
This map keeps beacon information on all interfaces.
Definition at line 267 of file peer-management-protocol.h.
|
private |
This map keeps relationship between peer address and its beacon information.
Definition at line 265 of file peer-management-protocol.h.
|
private |
Simple link open/close trace source type. Addresses are: src interface, dst interface.
Definition at line 389 of file peer-management-protocol.h.
typedef void(* ns3::dot11s::PeerManagementProtocol::LinkOpenCloseTracedCallback) (Mac48Address src, const Mac48Address dst) |
TracedCallback signature for link open/close events.
[in] | src | MAC address of source interface. |
[in] | dst | MAC address of destination interface. |
Definition at line 244 of file peer-management-protocol.h.
|
private |
This map keeps all peer links.
Definition at line 263 of file peer-management-protocol.h.
|
private |
We keep a vector of pointers to PeerLink class.
This vector keeps all peer links at a given interface.
Definition at line 261 of file peer-management-protocol.h.
|
private |
this vector keeps pointers to MAC-plugins
Definition at line 269 of file peer-management-protocol.h.
ns3::dot11s::PeerManagementProtocol::PeerManagementProtocol | ( | ) |
Definition at line 89 of file peer-management-protocol.cc.
References m_beaconShift.
|
override |
Definition at line 98 of file peer-management-protocol.cc.
References m_meshId.
|
delete |
int64_t ns3::dot11s::PeerManagementProtocol::AssignStreams | ( | int64_t | stream | ) |
Assign a fixed random variable stream number to the random variables used by this model.
Return the number of streams (possibly zero) that have been assigned.
stream | first stream index to use |
Definition at line 656 of file peer-management-protocol.cc.
References m_beaconShift, NS_LOG_FUNCTION, and ns3::RandomVariableStream::SetStream().
|
private |
BCA.
interface | interface |
Definition at line 418 of file peer-management-protocol.cc.
References GetBeaconCollisionAvoidance(), m_beaconInterval, m_lastBeacon, m_maxBeaconShift, m_peerLinks, m_plugins, NS_ASSERT, NS_ASSERT_MSG, ShiftOwnBeacon(), TimeToTu(), and TuToTime().
Referenced by NotifyBeaconSent().
void ns3::dot11s::PeerManagementProtocol::ConfigurationMismatch | ( | uint32_t | interface, |
Mac48Address | peerAddress | ||
) |
Cancels peer link due to broken configuration (Mesh ID or Supported rates)
interface | interface of the link to cancel |
peerAddress | peer address of the link to cancel |
Definition at line 262 of file peer-management-protocol.cc.
References FindPeerLink(), and ns3::dot11s::REASON11S_MESH_CAPABILITY_POLICY_VIOLATION.
|
overridevirtual |
Destructor implementation.
This method is called by Dispose() or by the Object's destructor, whichever comes first.
Subclasses are expected to implement their real destruction code in an overridden version of this method and chain up to their parent's implementation once they are done. i.e, for simplicity, the destructor of every subclass should be empty and its content should be moved to the associated DoDispose() method.
It is safe to call GetObject() from within this method.
Reimplemented from ns3::Object.
Definition at line 104 of file peer-management-protocol.cc.
References m_peerLinks, and m_plugins.
|
overrideprivatevirtual |
Initialize() implementation.
This method is called only once by Initialize(). If the user calls Initialize() multiple times, DoInitialize() is called only the first time.
Subclasses are expected to override this method and chain up to their parent's implementation once they are done. It is safe to call GetObject() and AggregateObject() from within this method.
Reimplemented from ns3::Object.
Definition at line 664 of file peer-management-protocol.cc.
References m_beaconShift, m_maxBeaconShift, and ns3::ObjectBase::SetAttribute().
Ptr< PeerLink > ns3::dot11s::PeerManagementProtocol::FindPeerLink | ( | uint32_t | interface, |
Mac48Address | peerAddress | ||
) |
Find active peer link by my interface and peer interface MAC.
interface | interface of the link to find |
peerAddress | peer address of the link to find |
Definition at line 323 of file peer-management-protocol.cc.
References m_peerLinks, and NS_ASSERT.
Referenced by ConfigurationMismatch(), InitiateLink(), IsActiveLink(), PeerLinkStatus(), ReceiveBeacon(), ReceivePeerLinkFrame(), TransmissionFailure(), and TransmissionSuccess().
Mac48Address ns3::dot11s::PeerManagementProtocol::GetAddress | ( | ) |
Get mesh point address.
Definition at line 588 of file peer-management-protocol.cc.
References m_address.
Referenced by TransmissionFailure(), and TransmissionSuccess().
bool ns3::dot11s::PeerManagementProtocol::GetBeaconCollisionAvoidance | ( | ) | const |
Get beacon collision avoidance.
Definition at line 680 of file peer-management-protocol.cc.
References m_enableBca.
Referenced by CheckBeaconCollisions(), GetBeaconTimingElement(), GetTypeId(), and ReceiveBeacon().
Ptr< IeBeaconTiming > ns3::dot11s::PeerManagementProtocol::GetBeaconTimingElement | ( | uint32_t | interface | ) |
When we are sending a beacon - we fill beacon timing element.
interface | is a interface sending a beacon |
Definition at line 150 of file peer-management-protocol.cc.
References GetBeaconCollisionAvoidance(), m_peerLinks, NS_ASSERT, and ns3::Seconds().
Get mesh ID information element.
Definition at line 575 of file peer-management-protocol.cc.
uint8_t ns3::dot11s::PeerManagementProtocol::GetNumberOfLinks | ( | ) | const |
Get number of links.
Definition at line 569 of file peer-management-protocol.cc.
References ns3::dot11s::PeerManagementProtocol::Statistics::linksTotal, and m_stats.
Get list of all active peer links.
Definition at line 370 of file peer-management-protocol.cc.
References m_peerLinks.
std::vector< Mac48Address > ns3::dot11s::PeerManagementProtocol::GetPeers | ( | uint32_t | interface | ) | const |
Get list of active peers of my given interface.
interface | the interface |
Definition at line 354 of file peer-management-protocol.cc.
References m_peerLinks, and NS_ASSERT.
Referenced by ns3::Dot11sStack::InstallStack().
|
static |
Get the type ID.
Definition at line 51 of file peer-management-protocol.cc.
References GetBeaconCollisionAvoidance(), m_linkCloseTraceSrc, m_linkOpenTraceSrc, m_maxBeaconShift, m_maxNumberOfPeerLinks, ns3::MakeBooleanAccessor(), ns3::MakeBooleanChecker(), ns3::MakeTraceSourceAccessor(), ns3::MakeUintegerAccessor(), SetBeaconCollisionAvoidance(), and ns3::TypeId::SetParent().
|
private |
Initiate link function.
interface | the interface to use |
peerAddress | the peer address |
peerMeshPointAddress | the peer mesh point address |
Definition at line 295 of file peer-management-protocol.cc.
References FindPeerLink(), m_lastAssocId, m_lastLocalLinkId, m_peerLinks, m_plugins, ns3::MakeCallback(), NS_ASSERT, NS_FATAL_ERROR, and PeerLinkStatus().
Referenced by ReceiveBeacon(), and ReceivePeerLinkFrame().
bool ns3::dot11s::PeerManagementProtocol::Install | ( | Ptr< MeshPointDevice > | mp | ) |
Install PMP on given mesh point.
mp | the MeshPointDevice to install onto |
Installing protocol causes installation of its interface MAC plugins.
Also MP aggregates all installed protocols, PMP protocol can be accessed via MeshPointDevice::GetObject<PeerManagementProtocol>();
Definition at line 121 of file peer-management-protocol.cc.
References ns3::Mac48Address::ConvertFrom(), ns3::WifiNetDevice::GetMac(), ns3::Object::GetObject(), first::interfaces, m_address, m_peerLinks, m_plugins, and third::mac.
bool ns3::dot11s::PeerManagementProtocol::IsActiveLink | ( | uint32_t | interface, |
Mac48Address | peerAddress | ||
) |
Checks if there is established link.
interface | interface of the link to check |
peerAddress | peer address of the link to check |
Definition at line 388 of file peer-management-protocol.cc.
References FindPeerLink().
void ns3::dot11s::PeerManagementProtocol::NotifyBeaconSent | ( | uint32_t | interface, |
Time | beaconInterval | ||
) |
Notify about beacon send event, needed to schedule BCA.
interface | the interface to use |
beaconInterval | the beacon interval |
Definition at line 594 of file peer-management-protocol.cc.
References CheckBeaconCollisions(), m_beaconInterval, m_lastBeacon, m_maxBeaconShift, ns3::Simulator::Now(), ns3::Simulator::Schedule(), and TuToTime().
|
private |
Aux.
method to register closed links
peerMp | peer mesh point address |
peerIface | peer address |
myIface | my address |
interface | interface |
Definition at line 523 of file peer-management-protocol.cc.
References ns3::dot11s::PeerManagementProtocol::Statistics::linksClosed, ns3::dot11s::PeerManagementProtocol::Statistics::linksTotal, m_linkCloseTraceSrc, m_peerStatusCallback, m_stats, and NS_LOG_LOGIC.
Referenced by PeerLinkStatus().
|
private |
Aux.
method to register open links
peerMp | peer mesh point address |
peerIface | peer address |
myIface | my address |
interface | interface |
Definition at line 507 of file peer-management-protocol.cc.
References ns3::dot11s::PeerManagementProtocol::Statistics::linksOpened, ns3::dot11s::PeerManagementProtocol::Statistics::linksTotal, m_linkOpenTraceSrc, m_peerStatusCallback, m_stats, and NS_LOG_LOGIC.
Referenced by PeerLinkStatus().
|
delete |
|
private |
Indicates changes in peer links.
interface | the interface |
peerAddress | the peer address |
peerMeshPointAddress | the peer mesh point address |
ostate | old state |
nstate | new state |
Definition at line 539 of file peer-management-protocol.cc.
References ns3::dot11s::PeerLink::ESTAB, FindPeerLink(), ns3::dot11s::PeerLink::IDLE, openflow-switch::link, m_address, m_plugins, NotifyLinkClose(), NotifyLinkOpen(), NS_ASSERT, NS_LOG_DEBUG, and ns3::dot11s::PeerLink::PeerStateNames.
Referenced by InitiateLink().
void ns3::dot11s::PeerManagementProtocol::ReceiveBeacon | ( | uint32_t | interface, |
Mac48Address | peerAddress, | ||
Time | beaconInterval, | ||
Ptr< IeBeaconTiming > | beaconTiming | ||
) |
To initiate peer link we must notify about received beacon.
interface | the interface where a beacon was received from |
peerAddress | address of station, which sent a beacon |
beaconInterval | beacon interval (needed by beacon loss counter) |
beaconTiming | beacon timing element (needed by BCA) |
Definition at line 176 of file peer-management-protocol.cc.
References FindPeerLink(), GetBeaconCollisionAvoidance(), ns3::Mac48Address::GetBroadcast(), InitiateLink(), m_plugins, ns3::Simulator::Now(), ns3::PeekPointer(), and ShouldSendOpen().
void ns3::dot11s::PeerManagementProtocol::ReceivePeerLinkFrame | ( | uint32_t | interface, |
Mac48Address | peerAddress, | ||
Mac48Address | peerMeshPointAddress, | ||
uint16_t | aid, | ||
IePeerManagement | peerManagementElement, | ||
IeConfiguration | meshConfig | ||
) |
Deliver Peer link management information to the protocol-part.
interface | is a interface ID of a given MAC (interfaceID rather than MAC address, because many interfaces may have the same MAC) |
peerAddress | is address of peer |
peerMeshPointAddress | is address of peer mesh point device (equal to peer address when only one interface) |
aid | is association ID, which peer has assigned to us |
peerManagementElement | is peer link management element |
meshConfig | is mesh configuration element taken from the peer management frame |
Definition at line 211 of file peer-management-protocol.cc.
References FindPeerLink(), ns3::dot11s::IePeerManagement::GetLocalLinkId(), ns3::dot11s::IePeerManagement::GetPeerLinkId(), ns3::dot11s::IePeerManagement::GetReasonCode(), InitiateLink(), ns3::dot11s::REASON11S_RESERVED, ShouldAcceptOpen(), ns3::dot11s::IePeerManagement::SubtypeIsClose(), ns3::dot11s::IePeerManagement::SubtypeIsConfirm(), and ns3::dot11s::IePeerManagement::SubtypeIsOpen().
void ns3::dot11s::PeerManagementProtocol::Report | ( | std::ostream & | os | ) | const |
Report statistics.
os | the output stream |
Definition at line 626 of file peer-management-protocol.cc.
References m_peerLinks, m_plugins, m_stats, NS_ASSERT, visualizer.base::plugins, and ns3::dot11s::PeerManagementProtocol::Statistics::Print().
void ns3::dot11s::PeerManagementProtocol::ResetStats | ( | ) |
Reset statistics function.
Definition at line 646 of file peer-management-protocol.cc.
References ns3::dot11s::PeerManagementProtocol::Statistics::linksTotal, m_plugins, m_stats, and visualizer.base::plugins.
void ns3::dot11s::PeerManagementProtocol::SetBeaconCollisionAvoidance | ( | bool | enable | ) |
Enable or disable beacon collision avoidance.
enable | true to enable beacon collision avoidance |
Definition at line 674 of file peer-management-protocol.cc.
References m_enableBca.
Referenced by GetTypeId().
void ns3::dot11s::PeerManagementProtocol::SetMeshId | ( | std::string | s | ) |
Set mesh ID to a string value.
s | the mesh ID string value |
Definition at line 582 of file peer-management-protocol.cc.
References m_meshId.
void ns3::dot11s::PeerManagementProtocol::SetPeerLinkStatusCallback | ( | Callback< void, Mac48Address, Mac48Address, uint32_t, bool > | cb | ) |
Set peer link status change callback.
cb | the callback |
Definition at line 347 of file peer-management-protocol.cc.
References m_peerStatusCallback.
|
private |
Shift own beacon function.
interface | interface |
Definition at line 481 of file peer-management-protocol.cc.
References ns3::UniformRandomVariable::GetValue(), m_beaconShift, m_plugins, NS_ASSERT, and TuToTime().
Referenced by CheckBeaconCollisions().
|
private |
External peer-chooser.
interface | the interface to use |
peerAddress | the peer address |
reasonCode | reason code |
Definition at line 405 of file peer-management-protocol.cc.
References ns3::dot11s::PeerManagementProtocol::Statistics::linksTotal, m_maxNumberOfPeerLinks, m_stats, and ns3::dot11s::REASON11S_MESH_MAX_PEERS.
Referenced by ReceivePeerLinkFrame().
|
private |
External peer-chooser.
interface | the interface to use |
peerAddress | the peer address |
Definition at line 399 of file peer-management-protocol.cc.
References ns3::dot11s::PeerManagementProtocol::Statistics::linksTotal, m_maxNumberOfPeerLinks, and m_stats.
Referenced by ReceiveBeacon().
|
private |
Time<-->TU converters:
x | Time |
Definition at line 501 of file peer-management-protocol.cc.
References two-ray-to-three-gpp-ch-calibration::x.
Referenced by CheckBeaconCollisions().
void ns3::dot11s::PeerManagementProtocol::TransmissionFailure | ( | uint32_t | interface, |
const Mac48Address | peerAddress | ||
) |
Cancels peer link due to successive transmission failures.
interface | interface of the link to cancel |
peerAddress | peer address of the link to cancel |
Definition at line 272 of file peer-management-protocol.cc.
References FindPeerLink(), GetAddress(), and NS_LOG_DEBUG.
void ns3::dot11s::PeerManagementProtocol::TransmissionSuccess | ( | uint32_t | interface, |
const Mac48Address | peerAddress | ||
) |
resets transmission failure statistics
interface | interface of the link to reset |
peerAddress | peer address of the link to reset |
Definition at line 284 of file peer-management-protocol.cc.
References FindPeerLink(), GetAddress(), and NS_LOG_DEBUG.
|
private |
Time<-->TU converters:
x | TU |
Definition at line 495 of file peer-management-protocol.cc.
References ns3::MicroSeconds(), and two-ray-to-three-gpp-ch-calibration::x.
Referenced by CheckBeaconCollisions(), NotifyBeaconSent(), and ShiftOwnBeacon().
|
private |
address
Definition at line 360 of file peer-management-protocol.h.
Referenced by GetAddress(), Install(), and PeerLinkStatus().
|
private |
Beacon interval at each interface.
Definition at line 373 of file peer-management-protocol.h.
Referenced by CheckBeaconCollisions(), and NotifyBeaconSent().
|
private |
Add randomness to beacon shift.
Definition at line 418 of file peer-management-protocol.h.
Referenced by PeerManagementProtocol(), AssignStreams(), DoInitialize(), and ShiftOwnBeacon().
|
private |
Flag which enables BCA.
Definition at line 367 of file peer-management-protocol.h.
Referenced by GetBeaconCollisionAvoidance(), and SetBeaconCollisionAvoidance().
|
private |
last associated ID
Definition at line 363 of file peer-management-protocol.h.
Referenced by InitiateLink().
|
private |
Last beacon at each interface.
Definition at line 371 of file peer-management-protocol.h.
Referenced by CheckBeaconCollisions(), and NotifyBeaconSent().
|
private |
last local link ID
Definition at line 364 of file peer-management-protocol.h.
Referenced by InitiateLink().
|
private |
LinkClose trace source.
Definition at line 393 of file peer-management-protocol.h.
Referenced by GetTypeId(), and NotifyLinkClose().
|
private |
LinkOpen trace source.
Definition at line 391 of file peer-management-protocol.h.
Referenced by GetTypeId(), and NotifyLinkOpen().
|
private |
Beacon can be shifted at [-m_maxBeaconShift; +m_maxBeaconShift] TUs.
Definition at line 369 of file peer-management-protocol.h.
Referenced by CheckBeaconCollisions(), DoInitialize(), GetTypeId(), and NotifyBeaconSent().
|
private |
maimum number of peer links
Definition at line 365 of file peer-management-protocol.h.
Referenced by GetTypeId(), ShouldAcceptOpen(), and ShouldSendOpen().
mesh ID
Definition at line 361 of file peer-management-protocol.h.
Referenced by ~PeerManagementProtocol(), GetMeshId(), and SetMeshId().
|
private |
Simple link open/close trace source type. Addresses are: src interface, dst interface.
Definition at line 378 of file peer-management-protocol.h.
Referenced by CheckBeaconCollisions(), DoDispose(), FindPeerLink(), GetBeaconTimingElement(), GetPeerLinks(), GetPeers(), InitiateLink(), Install(), and Report().
|
private |
Callback to notify about peer link changes: Mac48Address is peer address of mesh point, Mac48Address is peer address of interface, uint32_t - interface ID, bool is status - true when new link has appeared, false - when link was closed,.
Definition at line 386 of file peer-management-protocol.h.
Referenced by NotifyLinkClose(), NotifyLinkOpen(), and SetPeerLinkStatusCallback().
|
private |
plugins
Definition at line 359 of file peer-management-protocol.h.
Referenced by CheckBeaconCollisions(), DoDispose(), InitiateLink(), Install(), PeerLinkStatus(), ReceiveBeacon(), Report(), ResetStats(), and ShiftOwnBeacon().
|
private |
statistics
Definition at line 415 of file peer-management-protocol.h.
Referenced by GetNumberOfLinks(), NotifyLinkClose(), NotifyLinkOpen(), Report(), ResetStats(), ShouldAcceptOpen(), and ShouldSendOpen().