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... | |
Public Member Functions | |
void | DoDispose () |
bool | Install (Ptr< MeshPointDevice >) |
Install PMP on given mesh point. | |
Ptr< PeerLink > | FindPeerLink (uint32_t interface, Mac48Address peerAddress) |
Needed by external module to do MLME. | |
Mac48Address | GetAddress () |
needed by plugins to set global source address | |
uint8_t | GetNumberOfLinks () |
Needed to fill mesh configuration. | |
void | Report (std::ostream &) const |
: Report statistics | |
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 | UpdatePeerBeaconTiming (uint32_t interface, bool meshBeacon, IeBeaconTiming timingElement, Mac48Address peerAddress, Time receivingTime, Time beaconInterval) |
When we receive a beacon from peer-station, we remember its beacon timing element (needed for peer choosing mechanism), and remember beacon timers - last beacon and beacon interval to detect beacon loss and cancel links. | |
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. | |
Static Public Member Functions | |
static TypeId | GetTypeId () |
This method returns the TypeId associated to ns3::dot11s::PeerManagementProtocol. | |
Private Types | |
Private structures | |
typedef std::vector< Ptr < PeerLink > > | PeerLinksOnInterface |
typedef std::map< uint32_t, PeerLinksOnInterface > | PeerLinksMap |
This map keeps all peer links. | |
typedef std::map< Mac48Address, BeaconInfo > | BeaconsOnInterface |
This map keeps relationship between peer address and its beacon information. | |
typedef std::map< uint32_t, BeaconsOnInterface > | BeaconInfoMap |
This map keeps beacon information on all intefaces. | |
typedef std::map< uint32_t, Ptr< PeerManagementProtocolMac > > | PeerManagementProtocolMacMap |
this vector keeps pointers to MAC-plugins | |
Private Member Functions | |
void | FillBeaconInfo (uint32_t interface, Mac48Address peerAddress, Time receivingTime, Time beaconInterval) |
Fills information of received beacon. Needed to form own beacon timing element. | |
void | PeerLinkStatus (uint32_t interface, Mac48Address peerAddress, Mac48Address peerMeshPointAddres, PeerLink::PeerState ostate, PeerLink::PeerState nstate) |
Indicates changes in peer links. | |
Time | GetNextBeaconShift (uint32_t interface) |
BCA. | |
External peer-chooser | |
bool | ShouldSendOpen (uint32_t interface, Mac48Address peerAddress) |
bool | ShouldAcceptOpen (uint32_t interface, Mac48Address peerAddress, PmpReasonCode &reasonCode) |
Time<-->TU converters: | |
Time | TuToTime (uint32_t x) |
uint32_t | TimeToTu (Time x) |
Private Attributes | |
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,. | |
Information related to beacons: | |
BeaconInfoMap | m_neighbourBeacons |
Peer Links | |
PeerLinksMap | m_peerLinks |
Statistics: | |
struct Statistics | m_stats |
802.11s Peer Management Protocol model
typedef std::vector<Ptr<PeerLink> > ns3::dot11s::PeerManagementProtocol::PeerLinksOnInterface [private] |
We keep a vector of pointers to PeerLink class. This vector keeps all peer links at a given interface.
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.
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.
Attributes defined for this type:
No 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::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 |
void ns3::dot11s::PeerManagementProtocol::UpdatePeerBeaconTiming | ( | uint32_t | interface, | |
bool | meshBeacon, | |||
IeBeaconTiming | timingElement, | |||
Mac48Address | peerAddress, | |||
Time | receivingTime, | |||
Time | beaconInterval | |||
) |
When we receive a beacon from peer-station, we remember its beacon timing element (needed for peer choosing mechanism), and remember beacon timers - last beacon and beacon interval to detect beacon loss and cancel links.
interface | is a interface on which beacon was received | |
meshBeacon | indicates whether the beacon is mesh beacon or not. | |
timingElement | is a timing element of remote beacon | |
peerAddress | is an address where a beacon was received from | |
receivingTime | is a time when beacon was received | |
beaconInterval | is a beacon interval of received beacon |