Peer link model for 802.11s Peer Management protocol. More...
#include <peer-link.h>
Public Types | |
enum | PeerState { IDLE, OPN_SNT, CNF_RCVD, OPN_RCVD, ESTAB, HOLDING } |
Peer Link state: | |
Public Member Functions | |
PeerLink () | |
C-tor create empty link. | |
void | DoDispose () |
void | Report (std::ostream &os) const |
Statistics. | |
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. More... | |
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) |
uint16_t | GetPeerAid () const |
void | SetBeaconTimingElement (IeBeaconTiming beaconTiming) |
Mac48Address | GetPeerAddress () const |
uint16_t | GetLocalAid () const |
Time | GetLastBeacon () const |
Time | GetBeaconInterval () const |
IeBeaconTiming | GetBeaconTimingElement () const |
Public Member Functions inherited from ns3::Object | |
void | AggregateObject (Ptr< Object > other) |
void | Dispose (void) |
AggregateIterator | GetAggregateIterator (void) const |
virtual TypeId | GetInstanceTypeId (void) const |
template<typename T > | |
Ptr< T > | GetObject (void) const |
template<typename T > | |
Ptr< T > | GetObject (TypeId tid) const |
void | Initialize (void) |
Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
SimpleRefCount (const SimpleRefCount &o) | |
uint32_t | GetReferenceCount (void) const |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
void | Ref (void) const |
void | Unref (void) const |
Public Member Functions inherited from ns3::ObjectBase | |
void | GetAttribute (std::string name, AttributeValue &value) const |
bool | GetAttributeFailSafe (std::string name, AttributeValue &attribute) const |
void | SetAttribute (std::string name, const AttributeValue &value) |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Static Public Member Functions | |
static TypeId | GetTypeId () |
Support object system. | |
Static Public Member Functions inherited from ns3::Object | |
static TypeId | GetTypeId (void) |
Static Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
static void | Cleanup (void) |
Static Public Member Functions inherited from ns3::ObjectBase | |
static TypeId | GetTypeId (void) |
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 | |
PeerLink (const PeerLink &) | |
void | BeaconLoss () |
Several successive beacons were lost, close link. | |
bool | LinkIsEstab () const |
True if link is established. | |
bool | LinkIsIdle () const |
True if link is idle. Link can be deleted in this state. | |
PeerLink & | operator= (const PeerLink &) |
void | SetMacPlugin (Ptr< PeerManagementProtocolMac > plugin) |
void | StateMachine (PeerEvent event, PmpReasonCode=REASON11S_RESERVED) |
State transition. | |
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 | |
uint16_t | m_assocId |
My association ID. | |
Time | m_beaconInterval |
Current beacon interval on corresponding interface. | |
IeBeaconTiming | m_beaconTiming |
Beacon timing element received from the peer. Needed by BCA. | |
IeConfiguration | m_configuration |
Mesh interface configuration. More... | |
uint32_t | m_interface |
The number of interface I am associated with. | |
Time | m_lastBeacon |
When last beacon was received. | |
SignalStatusCallback | m_linkStatusCallback |
How to report my status change. | |
uint16_t | m_localLinkId |
My ID of this link. | |
Ptr< PeerManagementProtocolMac > | m_macPlugin |
pointer to MAC plugin, which is responsible for peer management | |
uint16_t | m_packetFail |
How many successive packets were failed to transmit. | |
Mac48Address | m_peerAddress |
Peer address. | |
uint16_t | m_peerAssocId |
Assoc Id assigned to me by peer. | |
uint16_t | m_peerLinkId |
Peer ID of this link. | |
Mac48Address | m_peerMeshPointAddress |
PeerState | m_state |
Current state. | |
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 |
Friends | |
class | PeerManagementProtocol |
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 () |
Additional Inherited Members | |
Protected Member Functions inherited from ns3::Object | |
Object (const Object &o) | |
virtual void | DoInitialize (void) |
virtual void | NotifyNewAggregate (void) |
Protected Member Functions inherited from ns3::ObjectBase | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
virtual void | NotifyConstructionCompleted (void) |
Peer link model for 802.11s Peer Management protocol.
Doxygen introspection did not find any typical Config paths.
No TraceSources are defined for this type.
Definition at line 43 of file peer-link.h.
|
private |
Peer link events, see 802.11s draft 11B.3.3.2.
Definition at line 112 of file peer-link.h.
|
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.
Definition at line 111 of file peer-link.cc.
References ns3::EventId::Cancel(), and m_beaconTiming.
void ns3::dot11s::PeerLink::SetLinkStatusCallback | ( | Callback< void, uint32_t, Mac48Address, bool > | cb | ) |
Method used to detect peer link changes.
cb | is a callback, which notifies, that on interface (uint32_t), peer link with address (Mac48Address) was opened (bool is true) or closed (bool is false) |
|
private |
Set pointer to MAC-plugin, which is responsible for sending peer link management frames
Definition at line 353 of file peer-link.cc.
References m_macPlugin.
|
private |
Mesh interface configuration.
Definition at line 236 of file peer-link.h.
Referenced by ConfirmAccept(), ConfirmReject(), OpenAccept(), and OpenReject().
|
private |
Mesh point address, equal to peer address in case of single interface mesh point
Definition at line 213 of file peer-link.h.
Referenced by ConfirmAccept(), ConfirmReject(), OpenAccept(), OpenReject(), Report(), and StateMachine().