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: More... | |
Public Member Functions | |
PeerLink () | |
C-tor create empty link. More... | |
~PeerLink () | |
void | DoDispose () |
Destructor implementation. More... | |
void | Report (std::ostream &os) const |
Statistics. More... | |
void | SetBeaconInformation (Time lastBeacon, Time BeaconInterval) |
Process beacon received from peer. More... | |
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) |
Set the peer address. More... | |
void | SetPeerMeshPointAddress (Mac48Address macaddr) |
Set the peer mesh point address. More... | |
void | SetInterface (uint32_t interface) |
Set the interface. More... | |
void | SetLocalLinkId (uint16_t id) |
Set the local link ID. More... | |
void | SetLocalAid (uint16_t aid) |
Set the local association ID. More... | |
uint16_t | GetPeerAid () const |
Set the peer association ID. More... | |
void | SetBeaconTimingElement (IeBeaconTiming beaconTiming) |
Set the beacon timing element. More... | |
Mac48Address | GetPeerAddress () const |
Get the peer address. More... | |
uint16_t | GetLocalAid () const |
Get the local association ID. More... | |
Time | GetLastBeacon () const |
Get the time of the last received beacon. More... | |
Time | GetBeaconInterval () const |
Get the beacon interval. More... | |
IeBeaconTiming | GetBeaconTimingElement () const |
Get the beacon timing element. More... | |
Public Member Functions inherited from ns3::Object | |
Object () | |
Constructor. More... | |
virtual | ~Object () |
Destructor. More... | |
void | AggregateObject (Ptr< Object > other) |
Aggregate two Objects together. More... | |
void | Dispose (void) |
Dispose of this Object. More... | |
AggregateIterator | GetAggregateIterator (void) const |
Get an iterator to the Objects aggregated to this one. More... | |
virtual TypeId | GetInstanceTypeId (void) const |
Get the most derived TypeId for this Object. More... | |
template<> | |
Ptr< Object > | GetObject () const |
Specialization of () for objects of type ns3::Object. More... | |
template<typename T > | |
Ptr< T > | GetObject (TypeId tid) const |
Get a pointer to the requested aggregated Object by TypeId. More... | |
template<> | |
Ptr< Object > | GetObject (TypeId tid) const |
Specialization of (TypeId tid) for objects of type ns3::Object. More... | |
template<typename T > | |
Ptr< T > | GetObject (void) const |
Get a pointer to the requested aggregated Object. More... | |
void | Initialize (void) |
Invoke DoInitialize on all Objects aggregated to this one. More... | |
bool | IsInitialized (void) const |
Check if the object has been initialized. More... | |
Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
SimpleRefCount () | |
Default constructor. More... | |
SimpleRefCount (const SimpleRefCount &o[[maybe_unused]]) | |
Copy constructor. More... | |
uint32_t | GetReferenceCount (void) const |
Get the reference count of the object. More... | |
SimpleRefCount & | operator= ([[maybe_unused]] const SimpleRefCount &o) |
Assignment operator. More... | |
void | Ref (void) const |
Increment the reference count. More... | |
void | Unref (void) const |
Decrement the reference count. More... | |
Public Member Functions inherited from ns3::ObjectBase | |
virtual | ~ObjectBase () |
Virtual destructor. More... | |
void | GetAttribute (std::string name, AttributeValue &value) const |
Get the value of an attribute, raising fatal errors if unsuccessful. More... | |
bool | GetAttributeFailSafe (std::string name, AttributeValue &value) const |
Get the value of an attribute without raising erros. More... | |
void | SetAttribute (std::string name, const AttributeValue &value) |
Set a single attribute, raising fatal errors if unsuccessful. More... | |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
Set a single attribute without raising errors. More... | |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
Connect a TraceSource to a Callback with a context. More... | |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
Connect a TraceSource to a Callback without a context. More... | |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected with a context. More... | |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected without a context. More... | |
Static Public Member Functions | |
static TypeId | GetTypeId () |
Get the type ID. More... | |
Static Public Member Functions inherited from ns3::Object | |
static TypeId | GetTypeId (void) |
Register this type. More... | |
Static Public Member Functions inherited from ns3::ObjectBase | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
Static Public Attributes | |
static const char *const | PeerStateNames [6] = { "IDLE", "OPN_SNT", "CNF_RCVD", "OPN_RCVD", "ESTAB", "HOLDING" } |
Literal names of Mesh Peer Management states for use in log messages. More... | |
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 &o) | |
Copy constructor. More... | |
void | BeaconLoss () |
Several successive beacons were lost, close link. More... | |
bool | LinkIsEstab () const |
bool | LinkIsIdle () const |
PeerLink & | operator= (const PeerLink &link) |
assignment operator More... | |
void | SetMacPlugin (Ptr< PeerManagementProtocolMac > plugin) |
Set pointer to MAC-plugin, which is responsible for sending peer link management frames. More... | |
void | StateMachine (PeerEvent event, PmpReasonCode=REASON11S_RESERVED) |
State transition. More... | |
Link response to received management frames | |
| |
void | Close (uint16_t localLinkID, uint16_t peerLinkID, PmpReasonCode reason) |
Close link. More... | |
void | OpenAccept (uint16_t localLinkId, IeConfiguration conf, Mac48Address peerMp) |
Accept open link. More... | |
void | OpenReject (uint16_t localLinkId, IeConfiguration conf, Mac48Address peerMp, PmpReasonCode reason) |
Reject open link. More... | |
void | ConfirmAccept (uint16_t localLinkId, uint16_t peerLinkId, uint16_t peerAid, IeConfiguration conf, Mac48Address peerMp) |
Confirm accept. More... | |
void | ConfirmReject (uint16_t localLinkId, uint16_t peerLinkId, IeConfiguration conf, Mac48Address peerMp, PmpReasonCode reason) |
Confirm reject. More... | |
Event handlers | |
void | ClearRetryTimer () |
void | ClearConfirmTimer () |
Clear the confirm timer. More... | |
void | ClearHoldingTimer () |
Clear the holding timer. More... | |
void | SetHoldingTimer () |
Set the holding timer. More... | |
void | SetRetryTimer () |
Set the retry timer. More... | |
void | SetConfirmTimer () |
Set the confirm timer. More... | |
Work with management frames | |
void | SendPeerLinkClose (PmpReasonCode reasoncode) |
Send a peer link close. More... | |
void | SendPeerLinkOpen () |
Send a peer link open. More... | |
void | SendPeerLinkConfirm () |
Send a peer link confirm. More... | |
Timeout handlers | |
void | HoldingTimeout () |
void | RetryTimeout () |
Retry Timeout event handler. More... | |
void | ConfirmTimeout () |
Confirm Timeout event handler. More... | |
Private Attributes | |
uint16_t | m_assocId |
My association ID. More... | |
Time | m_beaconInterval |
Current beacon interval on corresponding interface. More... | |
IeBeaconTiming | m_beaconTiming |
Beacon timing element received from the peer. Needed by BCA. More... | |
IeConfiguration | m_configuration |
Mesh interface configuration. More... | |
uint32_t | m_interface |
The number of interface I am associated with. More... | |
Time | m_lastBeacon |
When last beacon was received. More... | |
SignalStatusCallback | m_linkStatusCallback |
How to report my status change. More... | |
uint16_t | m_localLinkId |
My ID of this link. More... | |
Ptr< PeerManagementProtocolMac > | m_macPlugin |
pointer to MAC plugin, which is responsible for peer management More... | |
uint16_t | m_packetFail |
How many successive packets were failed to transmit. More... | |
Mac48Address | m_peerAddress |
Peer address. More... | |
uint16_t | m_peerAssocId |
Assoc Id assigned to me by peer. More... | |
uint16_t | m_peerLinkId |
Peer ID of this link. More... | |
Mac48Address | m_peerMeshPointAddress |
Mesh point address, equal to peer address in case of single interface mesh point. More... | |
PeerState | m_state |
Current state. More... | |
Timers & counters used for internal state transitions | |
uint16_t | m_dot11MeshMaxRetries |
Maximum number of retries. More... | |
Time | m_dot11MeshRetryTimeout |
Retry timeout. More... | |
Time | m_dot11MeshHoldingTimeout |
Holding timeout. More... | |
Time | m_dot11MeshConfirmTimeout |
Confirm timeout. More... | |
EventId | m_retryTimer |
Retry timer. More... | |
EventId | m_holdingTimer |
Holding timer. More... | |
EventId | m_confirmTimer |
Confirm timer. More... | |
uint16_t | m_retryCounter |
Retry counter. More... | |
EventId | m_beaconLossTimer |
Beacon loss timer. More... | |
uint16_t | m_maxBeaconLoss |
Maximum number of lost beacons before link will be closed. More... | |
uint16_t | m_maxPacketFail |
Maximum number of failed packets before link will be closed. More... | |
Friends | |
class | PeerManagementProtocol |
allow PeerManagementProtocol class friend access More... | |
MLME | |
typedef Callback< void, uint32_t, Mac48Address, Mac48Address, PeerLink::PeerState, PeerLink::PeerState > | SignalStatusCallback |
Callback type for MLME-SignalPeerLinkStatus event. More... | |
void | MLMECancelPeerLink (PmpReasonCode reason) |
MLME-CancelPeerLink.request. More... | |
void | MLMEActivePeerLinkOpen () |
MLME-ActivePeerLinkOpen.request. More... | |
void | MLMEPeeringRequestReject () |
MLME-PeeringRequestReject. More... | |
void | MLMESetSignalStatusCallback (SignalStatusCallback cb) |
Set callback. More... | |
void | TransmissionSuccess () |
Reports about transmission success/failure. More... | |
void | TransmissionFailure () |
Callback type for MLME-SignalPeerLinkStatus event. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from ns3::Object | |
Object (const Object &o) | |
Copy an Object. More... | |
virtual void | DoInitialize (void) |
Initialize() implementation. More... | |
virtual void | NotifyNewAggregate (void) |
Notify all Objects aggregated to this one of a new Object being aggregated. More... | |
Protected Member Functions inherited from ns3::ObjectBase | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
Complete construction of ObjectBase; invoked by derived classes. More... | |
virtual void | NotifyConstructionCompleted (void) |
Notifier called once the ObjectBase is fully constructed. More... | |
Related Functions inherited from ns3::ObjectBase | |
static TypeId | GetObjectIid (void) |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. More... | |
Peer link model for 802.11s Peer Management protocol.
Introspection did not find any typical Config paths.
No TraceSources are defined for this type.
Size of this type is 328 bytes (on a 64-bit architecture).
Definition at line 43 of file peer-link.h.
typedef Callback<void, uint32_t, Mac48Address, Mac48Address, PeerLink::PeerState, PeerLink::PeerState> ns3::dot11s::PeerLink::SignalStatusCallback |
Callback type for MLME-SignalPeerLinkStatus event.
Definition at line 161 of file peer-link.h.
|
private |
Peer link events, see 802.11s draft 11B.3.3.2.
Definition at line 179 of file peer-link.h.
Peer Link state:
Enumerator | |
---|---|
IDLE | |
OPN_SNT | |
CNF_RCVD | |
OPN_RCVD | |
ESTAB | |
HOLDING |
Definition at line 58 of file peer-link.h.
ns3::dot11s::PeerLink::PeerLink | ( | ) |
ns3::dot11s::PeerLink::~PeerLink | ( | ) |
Definition at line 112 of file peer-link.cc.
|
private |
Copy constructor.
Intentionally unimplemented
o | object to copy |
|
private |
Several successive beacons were lost, close link.
Definition at line 166 of file peer-link.cc.
References CNCL, NS_LOG_FUNCTION, and StateMachine().
Referenced by SetBeaconInformation().
|
private |
Clear the confirm timer.
Definition at line 627 of file peer-link.cc.
References ns3::EventId::Cancel(), and m_confirmTimer.
Referenced by StateMachine().
|
private |
Clear the holding timer.
Definition at line 632 of file peer-link.cc.
References ns3::EventId::Cancel(), and m_holdingTimer.
Referenced by StateMachine().
|
private |
Clear the retry timer
Definition at line 622 of file peer-link.cc.
References ns3::EventId::Cancel(), and m_retryTimer.
Referenced by StateMachine().
|
private |
Close link.
localLinkID | the local link ID |
peerLinkID | the peer link ID |
reason | the reason to close |
Definition at line 241 of file peer-link.cc.
References CLS_ACPT, m_localLinkId, m_peerLinkId, NS_LOG_FUNCTION, and StateMachine().
|
private |
Confirm accept.
localLinkId | the local link ID |
peerLinkId | the peer link ID |
peerAid | the peer AID |
conf | the IE configuration |
peerMp | the peer MP |
Definition at line 297 of file peer-link.cc.
References CNF_ACPT, ns3::Mac48Address::GetBroadcast(), m_configuration, m_localLinkId, m_peerAssocId, m_peerLinkId, m_peerMeshPointAddress, NS_ASSERT, NS_LOG_FUNCTION, and StateMachine().
|
private |
Confirm reject.
localLinkId | the local link ID |
peerLinkId | the peer link ID |
conf | the IE configuration |
peerMp | the peer MP |
reason | the reason to close |
Definition at line 329 of file peer-link.cc.
References CNF_RJCT, ns3::Mac48Address::GetBroadcast(), m_configuration, m_localLinkId, m_peerLinkId, m_peerMeshPointAddress, NS_ASSERT, NS_LOG_FUNCTION, and StateMachine().
|
private |
Confirm Timeout event handler.
Definition at line 701 of file peer-link.cc.
References StateMachine(), and TOC.
Referenced by SetConfirmTimer().
|
virtual |
Destructor implementation.
This method is called by Dispose() or by the Object's destructor, whichever comes first.
Subclasses are expected to implement their real destruction code in an overridden 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 116 of file peer-link.cc.
References ns3::EventId::Cancel(), ns3::dot11s::IeBeaconTiming::ClearTimingElement(), m_beaconLossTimer, m_beaconTiming, m_confirmTimer, m_holdingTimer, m_retryTimer, and NS_LOG_FUNCTION.
Time ns3::dot11s::PeerLink::GetBeaconInterval | ( | ) | const |
Get the beacon interval.
Definition at line 216 of file peer-link.cc.
References m_beaconInterval.
IeBeaconTiming ns3::dot11s::PeerLink::GetBeaconTimingElement | ( | ) | const |
Get the beacon timing element.
Definition at line 221 of file peer-link.cc.
References m_beaconTiming.
Time ns3::dot11s::PeerLink::GetLastBeacon | ( | ) | const |
Get the time of the last received beacon.
Definition at line 211 of file peer-link.cc.
References m_lastBeacon.
uint16_t ns3::dot11s::PeerLink::GetLocalAid | ( | ) | const |
Get the local association ID.
Definition at line 200 of file peer-link.cc.
References m_assocId.
Mac48Address ns3::dot11s::PeerLink::GetPeerAddress | ( | void | ) | const |
Get the peer address.
Definition at line 195 of file peer-link.cc.
References m_peerAddress.
uint16_t ns3::dot11s::PeerLink::GetPeerAid | ( | ) | const |
Set the peer association ID.
Definition at line 205 of file peer-link.cc.
References m_peerAssocId.
|
static |
Get the type ID.
Definition at line 38 of file peer-link.cc.
References m_dot11MeshConfirmTimeout, m_dot11MeshHoldingTimeout, m_dot11MeshMaxRetries, m_dot11MeshRetryTimeout, m_maxBeaconLoss, m_maxPacketFail, ns3::MakeTimeAccessor(), ns3::MakeTimeChecker(), ns3::MakeUintegerAccessor(), ns3::MicroSeconds(), and ns3::TypeId::SetParent().
|
private |
Holding Timeout event handler
Definition at line 668 of file peer-link.cc.
References NS_LOG_FUNCTION, StateMachine(), and TOH.
Referenced by SetHoldingTimer().
|
private |
Definition at line 357 of file peer-link.cc.
|
private |
Definition at line 362 of file peer-link.cc.
void ns3::dot11s::PeerLink::MLMEActivePeerLinkOpen | ( | ) |
MLME-ActivePeerLinkOpen.request.
Definition at line 231 of file peer-link.cc.
References ACTOPN, and StateMachine().
void ns3::dot11s::PeerLink::MLMECancelPeerLink | ( | PmpReasonCode | reason | ) |
MLME-CancelPeerLink.request.
reason | the reason for the request |
Definition at line 226 of file peer-link.cc.
References CNCL, and StateMachine().
void ns3::dot11s::PeerLink::MLMEPeeringRequestReject | ( | ) |
MLME-PeeringRequestReject.
Definition at line 236 of file peer-link.cc.
References ns3::dot11s::REASON11S_PEERING_CANCELLED, REQ_RJCT, and StateMachine().
void ns3::dot11s::PeerLink::MLMESetSignalStatusCallback | ( | PeerLink::SignalStatusCallback | cb | ) |
Set callback.
cb | the callback function |
Definition at line 161 of file peer-link.cc.
References m_linkStatusCallback.
|
private |
Accept open link.
localLinkId | the local link ID |
conf | the IE configuration |
peerMp | the peer MP |
Definition at line 262 of file peer-link.cc.
References ns3::Mac48Address::GetBroadcast(), m_configuration, m_peerLinkId, m_peerMeshPointAddress, NS_ASSERT, NS_LOG_FUNCTION, OPN_ACPT, and StateMachine().
|
private |
Reject open link.
localLinkId | the local link ID |
conf | the IE configuration |
peerMp | the peer MP |
reason | the reason to close |
Definition at line 278 of file peer-link.cc.
References ns3::Mac48Address::GetBroadcast(), m_configuration, m_peerLinkId, m_peerMeshPointAddress, NS_ASSERT, NS_LOG_FUNCTION, OPN_RJCT, and StateMachine().
assignment operator
link | the peer link |
void ns3::dot11s::PeerLink::Report | ( | std::ostream & | os | ) | const |
Statistics.
os | the output stream |
Definition at line 706 of file peer-link.cc.
References ESTAB, ns3::dot11s::PeerManagementProtocolMac::GetAddress(), ns3::dot11s::PeerManagementProtocolMac::GetLinkMetric(), ns3::Time::GetSeconds(), m_assocId, m_lastBeacon, m_localLinkId, m_macPlugin, m_peerAddress, m_peerLinkId, m_peerMeshPointAddress, and m_state.
|
private |
Retry Timeout event handler.
Definition at line 680 of file peer-link.cc.
References m_dot11MeshMaxRetries, m_retryCounter, NS_LOG_FUNCTION, NS_LOG_LOGIC, StateMachine(), TOR1, and TOR2.
Referenced by SetRetryTimer().
|
private |
Send a peer link close.
reasoncode | reason for closing the line |
Definition at line 637 of file peer-link.cc.
References m_assocId, m_configuration, m_localLinkId, m_macPlugin, m_peerAddress, m_peerLinkId, m_peerMeshPointAddress, ns3::dot11s::PeerManagementProtocolMac::SendPeerLinkManagementFrame(), and ns3::dot11s::IePeerManagement::SetPeerClose().
Referenced by StateMachine().
|
private |
Send a peer link confirm.
Definition at line 654 of file peer-link.cc.
References m_assocId, m_configuration, m_localLinkId, m_macPlugin, m_peerAddress, m_peerLinkId, m_peerMeshPointAddress, ns3::dot11s::PeerManagementProtocolMac::SendPeerLinkManagementFrame(), and ns3::dot11s::IePeerManagement::SetPeerConfirm().
Referenced by StateMachine().
|
private |
Send a peer link open.
Definition at line 645 of file peer-link.cc.
References m_assocId, m_configuration, m_localLinkId, m_macPlugin, m_peerAddress, m_peerMeshPointAddress, NS_ASSERT, ns3::dot11s::PeerManagementProtocolMac::SendPeerLinkManagementFrame(), and ns3::dot11s::IePeerManagement::SetPeerOpen().
Referenced by StateMachine().
Process beacon received from peer.
lastBeacon | the last beacon |
BeaconInterval | the beacon interval |
Definition at line 151 of file peer-link.cc.
References BeaconLoss(), ns3::EventId::Cancel(), ns3::Time::GetMicroSeconds(), ns3::Time::GetSeconds(), m_beaconInterval, m_beaconLossTimer, m_lastBeacon, m_maxBeaconLoss, NS_ASSERT, ns3::Simulator::Schedule(), and ns3::Seconds().
void ns3::dot11s::PeerLink::SetBeaconTimingElement | ( | IeBeaconTiming | beaconTiming | ) |
Set the beacon timing element.
beaconTiming | the beacon timing element |
Definition at line 190 of file peer-link.cc.
References m_beaconTiming.
|
private |
Set the confirm timer.
Definition at line 695 of file peer-link.cc.
References ConfirmTimeout(), ns3::Time::GetMicroSeconds(), m_confirmTimer, m_dot11MeshConfirmTimeout, NS_ASSERT, and ns3::Simulator::Schedule().
Referenced by StateMachine().
|
private |
Set the holding timer.
Definition at line 662 of file peer-link.cc.
References ns3::Time::GetMicroSeconds(), HoldingTimeout(), m_dot11MeshHoldingTimeout, m_holdingTimer, NS_ASSERT, and ns3::Simulator::Schedule().
Referenced by StateMachine().
void ns3::dot11s::PeerLink::SetInterface | ( | uint32_t | interface | ) |
Set the interface.
interface | the interface |
Definition at line 136 of file peer-link.cc.
References m_interface.
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) |
void ns3::dot11s::PeerLink::SetLocalAid | ( | uint16_t | aid | ) |
Set the local association ID.
aid | the local association ID |
Definition at line 146 of file peer-link.cc.
References m_assocId.
void ns3::dot11s::PeerLink::SetLocalLinkId | ( | uint16_t | id | ) |
Set the local link ID.
id | the local link ID |
Definition at line 141 of file peer-link.cc.
References m_localLinkId.
|
private |
Set pointer to MAC-plugin, which is responsible for sending peer link management frames.
plugin | the peer management protocol MAC |
Definition at line 367 of file peer-link.cc.
References m_macPlugin.
void ns3::dot11s::PeerLink::SetPeerAddress | ( | Mac48Address | macaddr | ) |
Set the peer address.
macaddr | the peer mac address |
Definition at line 126 of file peer-link.cc.
References m_peerAddress.
void ns3::dot11s::PeerLink::SetPeerMeshPointAddress | ( | Mac48Address | macaddr | ) |
Set the peer mesh point address.
macaddr | the peer mesh point address |
Definition at line 131 of file peer-link.cc.
References m_peerMeshPointAddress.
|
private |
Set the retry timer.
Definition at line 674 of file peer-link.cc.
References ns3::Time::GetMicroSeconds(), m_dot11MeshRetryTimeout, m_retryTimer, NS_ASSERT, RetryTimeout(), and ns3::Simulator::Schedule().
Referenced by StateMachine().
|
private |
State transition.
event | the event to update the state machine |
reasoncode | the reason for the state transition |
Definition at line 375 of file peer-link.cc.
References ACTOPN, ClearConfirmTimer(), ClearHoldingTimer(), ClearRetryTimer(), CLS_ACPT, CNCL, CNF_ACPT, CNF_RCVD, CNF_RJCT, ESTAB, ns3::Mac48Address::GetBroadcast(), HOLDING, IDLE, m_interface, m_linkStatusCallback, m_peerAddress, m_peerMeshPointAddress, m_retryCounter, m_state, NS_ASSERT, OPN_ACPT, OPN_RCVD, OPN_RJCT, OPN_SNT, ns3::dot11s::REASON11S_MESH_CLOSE_RCVD, ns3::dot11s::REASON11S_MESH_CONFIRM_TIMEOUT, ns3::dot11s::REASON11S_MESH_MAX_RETRIES, ns3::dot11s::REASON11S_PEERING_CANCELLED, REQ_RJCT, SendPeerLinkClose(), SendPeerLinkConfirm(), SendPeerLinkOpen(), SetConfirmTimer(), SetHoldingTimer(), SetRetryTimer(), TOC, TOH, TOR1, and TOR2.
Referenced by BeaconLoss(), Close(), ConfirmAccept(), ConfirmReject(), ConfirmTimeout(), HoldingTimeout(), MLMEActivePeerLinkOpen(), MLMECancelPeerLink(), MLMEPeeringRequestReject(), OpenAccept(), OpenReject(), RetryTimeout(), and TransmissionFailure().
void ns3::dot11s::PeerLink::TransmissionFailure | ( | ) |
Callback type for MLME-SignalPeerLinkStatus event.
Definition at line 177 of file peer-link.cc.
References CNCL, m_maxPacketFail, m_packetFail, NS_LOG_DEBUG, NS_LOG_FUNCTION, and StateMachine().
void ns3::dot11s::PeerLink::TransmissionSuccess | ( | ) |
Reports about transmission success/failure.
Definition at line 172 of file peer-link.cc.
References m_packetFail.
|
friend |
allow PeerManagementProtocol class friend access
Definition at line 47 of file peer-link.h.
|
private |
My association ID.
Definition at line 357 of file peer-link.h.
Referenced by GetLocalAid(), Report(), SendPeerLinkClose(), SendPeerLinkConfirm(), SendPeerLinkOpen(), and SetLocalAid().
|
private |
Current beacon interval on corresponding interface.
Definition at line 364 of file peer-link.h.
Referenced by GetBeaconInterval(), and SetBeaconInformation().
|
private |
Beacon loss timer.
Definition at line 391 of file peer-link.h.
Referenced by DoDispose(), and SetBeaconInformation().
|
private |
Beacon timing element received from the peer. Needed by BCA.
Definition at line 376 of file peer-link.h.
Referenced by DoDispose(), GetBeaconTimingElement(), and SetBeaconTimingElement().
|
private |
Mesh interface configuration.
Definition at line 374 of file peer-link.h.
Referenced by ConfirmAccept(), ConfirmReject(), OpenAccept(), OpenReject(), SendPeerLinkClose(), SendPeerLinkConfirm(), and SendPeerLinkOpen().
|
private |
Confirm timer.
Definition at line 389 of file peer-link.h.
Referenced by ClearConfirmTimer(), DoDispose(), and SetConfirmTimer().
|
private |
Confirm timeout.
Definition at line 385 of file peer-link.h.
Referenced by GetTypeId(), and SetConfirmTimer().
|
private |
Holding timeout.
Definition at line 384 of file peer-link.h.
Referenced by GetTypeId(), and SetHoldingTimer().
|
private |
Maximum number of retries.
Definition at line 382 of file peer-link.h.
Referenced by GetTypeId(), and RetryTimeout().
|
private |
Retry timeout.
Definition at line 383 of file peer-link.h.
Referenced by GetTypeId(), and SetRetryTimer().
|
private |
Holding timer.
Definition at line 388 of file peer-link.h.
Referenced by ClearHoldingTimer(), DoDispose(), and SetHoldingTimer().
|
private |
The number of interface I am associated with.
Definition at line 344 of file peer-link.h.
Referenced by SetInterface(), and StateMachine().
|
private |
When last beacon was received.
Definition at line 362 of file peer-link.h.
Referenced by GetLastBeacon(), Report(), and SetBeaconInformation().
|
private |
How to report my status change.
Definition at line 397 of file peer-link.h.
Referenced by MLMESetSignalStatusCallback(), and StateMachine().
|
private |
My ID of this link.
Definition at line 353 of file peer-link.h.
Referenced by Close(), ConfirmAccept(), ConfirmReject(), Report(), SendPeerLinkClose(), SendPeerLinkConfirm(), SendPeerLinkOpen(), and SetLocalLinkId().
|
private |
pointer to MAC plugin, which is responsible for peer management
Definition at line 346 of file peer-link.h.
Referenced by Report(), SendPeerLinkClose(), SendPeerLinkConfirm(), SendPeerLinkOpen(), and SetMacPlugin().
|
private |
Maximum number of lost beacons before link will be closed.
Definition at line 392 of file peer-link.h.
Referenced by GetTypeId(), and SetBeaconInformation().
|
private |
Maximum number of failed packets before link will be closed.
Definition at line 393 of file peer-link.h.
Referenced by GetTypeId(), and TransmissionFailure().
|
private |
How many successive packets were failed to transmit.
Definition at line 366 of file peer-link.h.
Referenced by TransmissionFailure(), and TransmissionSuccess().
|
private |
Peer address.
Definition at line 348 of file peer-link.h.
Referenced by GetPeerAddress(), Report(), SendPeerLinkClose(), SendPeerLinkConfirm(), SendPeerLinkOpen(), SetPeerAddress(), and StateMachine().
|
private |
Assoc Id assigned to me by peer.
Definition at line 359 of file peer-link.h.
Referenced by ConfirmAccept(), and GetPeerAid().
|
private |
Peer ID of this link.
Definition at line 355 of file peer-link.h.
Referenced by Close(), ConfirmAccept(), ConfirmReject(), OpenAccept(), OpenReject(), Report(), SendPeerLinkClose(), and SendPeerLinkConfirm().
|
private |
Mesh point address, equal to peer address in case of single interface mesh point.
Definition at line 351 of file peer-link.h.
Referenced by ConfirmAccept(), ConfirmReject(), OpenAccept(), OpenReject(), Report(), SendPeerLinkClose(), SendPeerLinkConfirm(), SendPeerLinkOpen(), SetPeerMeshPointAddress(), and StateMachine().
|
private |
Retry counter.
Definition at line 390 of file peer-link.h.
Referenced by RetryTimeout(), and StateMachine().
|
private |
Retry timer.
Definition at line 387 of file peer-link.h.
Referenced by ClearRetryTimer(), DoDispose(), and SetRetryTimer().
|
private |
Current state.
Definition at line 369 of file peer-link.h.
Referenced by LinkIsEstab(), LinkIsIdle(), Report(), and StateMachine().
|
static |
Literal names of Mesh Peer Management states for use in log messages.
Definition at line 69 of file peer-link.h.
Referenced by ns3::dot11s::PeerManagementProtocol::PeerLinkStatus().