A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ns3::dot11s::PeerLink Class Reference

Peer link model for 802.11s Peer Management protocol. More...

#include <peer-link.h>

+ Inheritance diagram for ns3::dot11s::PeerLink:

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
 
SimpleRefCountoperator= (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.
 
PeerLinkoperator= (const PeerLink &)
 
void SetMacPlugin (Ptr< PeerManagementProtocolMac > plugin)
 
void StateMachine (PeerEvent event, PmpReasonCode=REASON11S_RESERVED)
 State transition.
 
Link response to received management frames
Attention
In all this methods {local/peer}LinkID correspond to peer station, as written in received frame, e.g. I am peerLinkID and peer link is localLinkID .
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< PeerManagementProtocolMacm_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)
 

Detailed Description

Peer link model for 802.11s Peer Management protocol.

Doxygen introspection did not find any typical Config paths.

Attributes

  • RetryTimeout: Retry timeout
    • Set with class: TimeValue
    • Underlying type: Time
    • Initial value: +40960000.0ns
    • Flags: construct write read
  • HoldingTimeout: Holding timeout
    • Set with class: TimeValue
    • Underlying type: Time
    • Initial value: +40960000.0ns
    • Flags: construct write read
  • ConfirmTimeout: Confirm timeout
    • Set with class: TimeValue
    • Underlying type: Time
    • Initial value: +40960000.0ns
    • Flags: construct write read
  • MaxRetries: Maximum number of retries
  • MaxBeaconLoss: Maximum number of lost beacons before link will be closed
  • MaxPacketFailure: Maximum number of failed packets before link will be closed

No TraceSources are defined for this type.

Definition at line 43 of file peer-link.h.

Member Enumeration Documentation

Peer link events, see 802.11s draft 11B.3.3.2.

Enumerator
CNCL 

Cancel peer link.

ACTOPN 

Active peer link open.

CLS_ACPT 

PeerLinkClose_Accept.

OPN_ACPT 

PeerLinkOpen_Accept.

OPN_RJCT 

PeerLinkOpen_Reject.

REQ_RJCT 

PeerLinkOpenReject by internal reason.

CNF_ACPT 

PeerLinkConfirm_Accept.

CNF_RJCT 

PeerLinkConfirm_Reject.

TOR1 

Timeout of retry timer.

TOR2 

also timeout of retry timer

TOC 

Timeout of confirm timer.

TOH 

Timeout of holding (graceful closing) timer.

Definition at line 112 of file peer-link.h.

Member Function Documentation

void ns3::dot11s::PeerLink::DoDispose ( void  )
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.

Parameters
cbis a callback, which notifies, 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

Definition at line 353 of file peer-link.cc.

References m_macPlugin.

Member Data Documentation

IeConfiguration ns3::dot11s::PeerLink::m_configuration
private

Mesh interface configuration.

Attention
Is not used now, nothing to configure :)

Definition at line 236 of file peer-link.h.

Referenced by ConfirmAccept(), ConfirmReject(), OpenAccept(), and OpenReject().

Mac48Address ns3::dot11s::PeerLink::m_peerMeshPointAddress
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().


The documentation for this class was generated from the following files: