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. | |
struct | Statistics |
Public Member Functions | |
void | DoDispose () |
bool | Install (Ptr< MeshPointDevice >) |
Install PMP on given mesh point. | |
This methods interact with MAC_layer plug-in | |
Ptr< IeBeaconTiming > | GetBeaconTimingElement (uint32_t interface) |
When we are sending a beacon - we fill beacon timing element. | |
void | ReceiveBeacon (uint32_t interface, Mac48Address peerAddress, Time beaconInterval, Ptr< IeBeaconTiming > beaconTiming) |
To initiate peer link we must notify about received beacon. | |
void | ReceivePeerLinkFrame (uint32_t interface, Mac48Address peerAddress, Mac48Address peerMeshPointAddress, uint16_t aid, IePeerManagement peerManagementElement, IeConfiguration meshConfig) |
Methods that handle Peer link management frames interaction: | |
void | ConfigurationMismatch (uint32_t interface, Mac48Address peerAddress) |
Cancels peer link due to broken configuration (Mesh ID or Supported rates). | |
void | TransmissionFailure (uint32_t interface, const Mac48Address peerAddress) |
Cancels peer link due to successive transmission failures. | |
void | TransmissionSuccess (uint32_t interface, const Mac48Address peerAddress) |
resets transmission failure statistics | |
bool | IsActiveLink (uint32_t interface, Mac48Address peerAddress) |
Checks if there is established link. | |
Interface to other protocols (MLME) | |
void | SetPeerLinkStatusCallback (Callback< void, Mac48Address, Mac48Address, uint32_t, bool > cb) |
Set peer link status change callback. | |
Ptr< PeerLink > | FindPeerLink (uint32_t interface, Mac48Address peerAddress) |
Find active peer link by my interface and peer interface MAC. | |
std::vector< Ptr< PeerLink > > | GetPeerLinks () const |
Get list of all active peer links. | |
std::vector< Mac48Address > | GetPeers (uint32_t interface) const |
Get list of active peers of my given interface. | |
Mac48Address | GetAddress () |
Get mesh point address. TODO this used by plugins only. Now MAC plugins can ask MP addrress directly from main MAC. | |
uint8_t | GetNumberOfLinks () |
void | SetMeshId (std::string s) |
Ptr< IeMeshId > | GetMeshId () const |
void | SetBeaconCollisionAvoidance (bool enable) |
Enable or disable beacon collision avoidance. | |
bool | GetBeaconCollisionAvoidance () const |
void | NotifyBeaconSent (uint32_t interface, Time beaconInterval) |
Notify about beacon send event, needed to schedule BCA. | |
void | Report (std::ostream &) const |
: Report statistics | |
void | ResetStats () |
Static Public Member Functions | |
static TypeId | GetTypeId () |
This method returns the TypeId associated to ns3::dot11s::PeerManagementProtocol. |
802.11s Peer Management Protocol model
void ns3::dot11s::PeerManagementProtocol::DoDispose | ( | ) | [virtual] |
This method is called by Object::Dispose or by the object's destructor, whichever comes first.
Subclasses are expected to implement their real destruction code in an overriden 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.
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 |
static TypeId ns3::dot11s::PeerManagementProtocol::GetTypeId | ( | void | ) | [static] |
This method returns the TypeId associated to ns3::dot11s::PeerManagementProtocol.
This object is accessible through the following paths with Config::Set and Config::Connect:
Attributes defined for this type:
TraceSources defined for this type:
Reimplemented from ns3::Object.
bool ns3::dot11s::PeerManagementProtocol::Install | ( | Ptr< MeshPointDevice > | ) |
Install PMP on given mesh point.
Installing protocol cause installing its interface MAC plugins.
Also MP aggregates all installed protocols, PMP protocol can be accessed via MeshPointDevice::GetObject<PeerManagementProtocol>();
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) |
void ns3::dot11s::PeerManagementProtocol::ReceivePeerLinkFrame | ( | uint32_t | interface, | |
Mac48Address | peerAddress, | |||
Mac48Address | peerMeshPointAddress, | |||
uint16_t | aid, | |||
IePeerManagement | peerManagementElement, | |||
IeConfiguration | meshConfig | |||
) |
Methods that handle Peer link management frames interaction:
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 |