25 #include "ns3/nstime.h" 26 #include "ns3/object.h" 27 #include "ns3/callback.h" 28 #include "ns3/mac48-address.h" 29 #include "ns3/event-id.h" 30 #include "ns3/ie-dot11s-beacon-timing.h" 31 #include "ns3/ie-dot11s-peer-management.h" 32 #include "ns3/ie-dot11s-configuration.h" 37 class PeerManagementProtocolMac;
131 void Report (std::ostream & os)
const;
199 uint16_t localLinkId,
215 uint16_t localLinkId,
Simulation virtual time values and global simulation resolution.
void SetBeaconTimingElement(IeBeaconTiming beaconTiming)
void TransmissionSuccess()
Reports about transmission success/failure.
Mac48Address m_peerMeshPointAddress
Mesh point address, equal to peer address in case of single interface mesh point. ...
void MLMECancelPeerLink(PmpReasonCode reason)
MLME-CancelPeerLink.request.
void SetPeerAddress(Mac48Address macaddr)
void MLMESetSignalStatusCallback(SignalStatusCallback cb)
Set callback.
PeerLink & operator=(const PeerLink &link)
assignment operator
Time GetBeaconInterval() const
SignalStatusCallback m_linkStatusCallback
How to report my status change.
IeConfiguration m_configuration
Mesh interface configuration.
void StateMachine(PeerEvent event, PmpReasonCode=REASON11S_RESERVED)
State transition.
void SetLocalAid(uint16_t aid)
IeBeaconTiming GetBeaconTimingElement() const
IeBeaconTiming m_beaconTiming
Beacon timing element received from the peer. Needed by BCA.
Ptr< PeerManagementProtocolMac > m_macPlugin
pointer to MAC plugin, which is responsible for peer management
void SetLocalLinkId(uint16_t id)
void OpenAccept(uint16_t localLinkId, IeConfiguration conf, Mac48Address peerMp)
Accept open link.
PeerState
Peer Link state:
uint16_t m_peerLinkId
Peer ID of this link.
void SendPeerLinkClose(PmpReasonCode reasoncode)
void BeaconLoss()
Several successive beacons were lost, close link.
Mac48Address GetPeerAddress() const
void SetLinkStatusCallback(Callback< void, uint32_t, Mac48Address, bool > cb)
Method used to detect peer link changes.
uint16_t m_packetFail
How many successive packets were failed to transmit.
uint16_t GetPeerAid() const
PeerLink()
C-tor create empty link.
also timeout of retry timer
See 7.3.2.89 of 802.11s draft 2.07.
uint16_t m_assocId
My association ID.
void SetMacPlugin(Ptr< PeerManagementProtocolMac > plugin)
Set pointer to MAC-plugin, which is responsible for sending peer link management frames.
void DoDispose()
Destructor implementation.
uint16_t GetLocalAid() const
void Close(uint16_t localLinkID, uint16_t peerLinkID, PmpReasonCode reason)
Close link.
Time m_dot11MeshHoldingTimeout
void MLMEActivePeerLinkOpen()
MLME-ActivePeerLinkOpen.request.
Time m_dot11MeshConfirmTimeout
PeerState m_state
Current state.
Mac48Address m_peerAddress
Peer address.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Callback< void, uint32_t, Mac48Address, Mac48Address, PeerLink::PeerState, PeerLink::PeerState > SignalStatusCallback
Callback type for MLME-SignalPeerLinkStatus event.
PeerLinkOpenReject by internal reason.
void SetPeerMeshPointAddress(Mac48Address macaddr)
void SetInterface(uint32_t interface)
void SetBeaconInformation(Time lastBeacon, Time BeaconInterval)
Process beacon received from peer.
Timeout of confirm timer.
uint16_t m_peerAssocId
Assoc Id assigned to me by peer.
EventId m_beaconLossTimer
An identifier for simulation events.
PeerEvent
Peer link events, see 802.11s draft 11B.3.3.2.
PmpReasonCode
Codes used by 802.11s Peer Management Protocol.
uint16_t m_dot11MeshMaxRetries
Time m_beaconInterval
Current beacon interval on corresponding interface.
uint16_t m_localLinkId
My ID of this link.
Describes Mesh Configuration Element see 7.3.2.86 of 802.11s draft 3.0.
Peer link model for 802.11s Peer Management protocol.
Time m_lastBeacon
When last beacon was received.
static TypeId GetTypeId()
Get the type ID.
Time GetLastBeacon() const
static const char *const PeerStateNames[6]
Literal names of Mesh Peer Management states for use in log messages.
void Report(std::ostream &os) const
Statistics.
A base class which provides memory management and object aggregation.
void TransmissionFailure()
Callback type for MLME-SignalPeerLinkStatus event.
void SendPeerLinkConfirm()
uint32_t m_interface
The number of interface I am associated with.
Timeout of holding (graceful closing) timer.
void ConfirmReject(uint16_t localLinkId, uint16_t peerLinkId, IeConfiguration conf, Mac48Address peerMp, PmpReasonCode reason)
Confirm reject.
a unique identifier for an interface.
Time m_dot11MeshRetryTimeout
void ConfirmAccept(uint16_t localLinkId, uint16_t peerLinkId, uint16_t peerAid, IeConfiguration conf, Mac48Address peerMp)
Confirm accept.
void MLMEPeeringRequestReject()
MLME-PeeringRequestReject.
void OpenReject(uint16_t localLinkId, IeConfiguration conf, Mac48Address peerMp, PmpReasonCode reason)
Reject open link.
802.11s Peer Management Protocol model