Peer link model for 802.11s Peer Management protocol. More...
#include <peer-link.h>
Public Types | |
enum | PeerState |
Peer Link state: | |
Public Member Functions | |
PeerLink () | |
C-tor create empty link. | |
void | DoDispose () |
void | SetBeaconInformation (Time lastBeacon, Time BeaconInterval) |
Process beacon received from peer. | |
void | SetLinkStatusCallback (Callback< void, uint32_t, Mac48Address, bool > cb) |
Method used to detect peer link changes. | |
void | Report (std::ostream &os) const |
Statistics. | |
Peer link getters/setters | |
void | SetPeerAddress (Mac48Address macaddr) |
void | SetPeerMeshPointAddress (Mac48Address macaddr) |
void | SetInterface (uint32_t interface) |
void | SetLocalLinkId (uint16_t id) |
void | SetLocalAid (uint16_t aid) |
void | SetBeaconTimingElement (IeBeaconTiming beaconTiming) |
Mac48Address | GetPeerAddress () const |
uint16_t | GetLocalAid () const |
Time | GetLastBeacon () const |
Time | GetBeaconInterval () const |
IeBeaconTiming | GetBeaconTimingElement () const |
Static Public Member Functions | |
static TypeId | GetTypeId () |
Support object system. | |
Private Types | |
enum | PeerEvent { CNCL, ACTOPN, CLS_ACPT, OPN_ACPT, OPN_RJCT, REQ_RJCT, CNF_ACPT, CNF_RJCT, TOR1, TOR2, TOC, TOH } |
Peer link events, see 802.11s draft 11B.3.3.2. More... | |
Private Member Functions | |
void | StateMachine (PeerEvent event, PmpReasonCode=REASON11S_RESERVED) |
State transition. | |
bool | LinkIsEstab () const |
True if link is established. | |
bool | LinkIsIdle () const |
True if link is idle. Link can be deleted in this state. | |
void | SetMacPlugin (Ptr< PeerManagementProtocolMac > plugin) |
void | BeaconLoss () |
Several successive beacons were lost, close link. | |
Link response to received management frames | |
void | Close (uint16_t localLinkID, uint16_t peerLinkID, PmpReasonCode reason) |
Close link. | |
void | OpenAccept (uint16_t localLinkId, IeConfiguration conf, Mac48Address peerMp) |
Accept open link. | |
void | OpenReject (uint16_t localLinkId, IeConfiguration conf, Mac48Address peerMp, PmpReasonCode reason) |
Reject open link. | |
void | ConfirmAccept (uint16_t localLinkId, uint16_t peerLinkId, uint16_t peerAid, IeConfiguration conf, Mac48Address peerMp) |
Confirm accept. | |
void | ConfirmReject (uint16_t localLinkId, uint16_t peerLinkId, IeConfiguration conf, Mac48Address peerMp, PmpReasonCode reason) |
Confirm reject. | |
Event handlers | |
void | ClearRetryTimer () |
void | ClearConfirmTimer () |
void | ClearHoldingTimer () |
void | SetHoldingTimer () |
void | SetRetryTimer () |
void | SetConfirmTimer () |
Work with management frames | |
void | SendPeerLinkClose (PmpReasonCode reasoncode) |
void | SendPeerLinkOpen () |
void | SendPeerLinkConfirm () |
Timeout handlers | |
void | HoldingTimeout () |
void | RetryTimeout () |
void | ConfirmTimeout () |
Private Attributes | |
uint32_t | m_interface |
The number of interface I am associated with. | |
Ptr< PeerManagementProtocolMac > | m_macPlugin |
pointer to MAC plugin, which is responsible for peer management | |
Mac48Address | m_peerAddress |
Peer address. | |
Mac48Address | m_peerMeshPointAddress |
Mesh point address, equal to peer address in case of single. | |
uint16_t | m_localLinkId |
My ID of this link. | |
uint16_t | m_peerLinkId |
Peer ID of this link. | |
uint16_t | m_assocId |
My association ID. | |
uint16_t | m_peerAssocId |
Assoc Id assigned to me by peer. | |
Time | m_lastBeacon |
When last beacon was received. | |
Time | m_beaconInterval |
Current beacon interval on corresponding interface. | |
uint16_t | m_packetFail |
How many successive packets were failed to transmit. | |
PeerState | m_state |
Current state. | |
IeConfiguration | m_configuration |
Mesh interface configuration. | |
IeBeaconTiming | m_beaconTiming |
Beacon timing element received from the peer. Needed by BCA. | |
SignalStatusCallback | m_linkStatusCallback |
How to report my status change. | |
Timers & counters used for internal state transitions | |
uint16_t | m_dot11MeshMaxRetries |
Time | m_dot11MeshRetryTimeout |
Time | m_dot11MeshHoldingTimeout |
Time | m_dot11MeshConfirmTimeout |
EventId | m_retryTimer |
EventId | m_holdingTimer |
EventId | m_confirmTimer |
uint16_t | m_retryCounter |
EventId | m_beaconLossTimer |
uint16_t | m_maxBeaconLoss |
uint16_t | m_maxPacketFail |
MLME | |
| |
typedef Callback< void, uint32_t, Mac48Address, Mac48Address, PeerLink::PeerState, PeerLink::PeerState > | SignalStatusCallback |
Callback type for MLME-SignalPeerLinkStatus event. | |
void | MLMECancelPeerLink (PmpReasonCode reason) |
MLME-CancelPeerLink.request. | |
void | MLMEActivePeerLinkOpen () |
MLME-ActivePeerLinkOpen.request. | |
void | MLMEPeeringRequestReject () |
MLME-PeeringRequestReject. | |
void | MLMESetSignalStatusCallback (SignalStatusCallback) |
Set callback. | |
void | TransmissionSuccess () |
Reports about transmission success/failure. | |
void | TransmissionFailure () |
Peer link model for 802.11s Peer Management protocol.
enum ns3::dot11s::PeerLink::PeerEvent [private] |
Peer link events, see 802.11s draft 11B.3.3.2.
void ns3::dot11s::PeerLink::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.
static TypeId ns3::dot11s::PeerLink::GetTypeId | ( | void | ) | [static] |
Support object system.
This method returns the TypeId associated to ns3::dot11s::PeerLink.
Attributes defined for this type:
No TraceSources defined for this type.
Reimplemented from ns3::Object.
void ns3::dot11s::PeerLink::SetLinkStatusCallback | ( | Callback< void, uint32_t, Mac48Address, bool > | cb | ) |
Method used to detect peer link changes.
cb | is a callback, which notifyes, that on interface (uint32_t), peer link with address (Mac48Address) was opened (bool is true) or closed (bool is false) |
void ns3::dot11s::PeerLink::SetMacPlugin | ( | Ptr< PeerManagementProtocolMac > | plugin | ) | [private] |
Set pointer to MAC-plugin, which is responsible for sending peer link management frames
Mesh interface configuration.