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;
176 void Report (std::ostream & os)
const;
244 uint16_t localLinkId,
260 uint16_t localLinkId,
Simulation virtual time values and global simulation resolution.
void SetBeaconTimingElement(IeBeaconTiming beaconTiming)
Set the beacon timing element.
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)
Set the peer address.
void MLMESetSignalStatusCallback(SignalStatusCallback cb)
Set callback.
PeerLink & operator=(const PeerLink &link)
assignment operator
Time GetBeaconInterval() const
Get the beacon interval.
void ClearHoldingTimer()
Clear the holding timer.
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)
Set the local association ID.
IeBeaconTiming GetBeaconTimingElement() const
Get the beacon timing element.
void SetRetryTimer()
Set the retry timer.
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 SetConfirmTimer()
Set the confirm timer.
uint16_t m_maxBeaconLoss
Maximum number of lost beacons before link will be closed.
void SetLocalLinkId(uint16_t id)
Set the local link 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)
Send a peer link close.
void BeaconLoss()
Several successive beacons were lost, close link.
Mac48Address GetPeerAddress() const
Get the peer address.
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.
void ConfirmTimeout()
Confirm Timeout event handler.
uint16_t GetPeerAid() const
Set the peer association ID.
PeerLink()
C-tor create empty link.
also timeout of retry timer
See 7.3.2.89 of 802.11s draft 2.07.
EventId m_confirmTimer
Confirm timer.
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
Get the local association ID.
void Close(uint16_t localLinkID, uint16_t peerLinkID, PmpReasonCode reason)
Close link.
Time m_dot11MeshHoldingTimeout
Holding timeout.
void MLMEActivePeerLinkOpen()
MLME-ActivePeerLinkOpen.request.
Time m_dot11MeshConfirmTimeout
Confirm timeout.
PeerState m_state
Current state.
Mac48Address m_peerAddress
Peer address.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void SendPeerLinkOpen()
Send a peer link open.
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)
Set the peer mesh point address.
void SetInterface(uint32_t interface)
Set the interface.
void SetBeaconInformation(Time lastBeacon, Time BeaconInterval)
Process beacon received from peer.
Timeout of confirm timer.
uint16_t m_maxPacketFail
Maximum number of failed packets before link will be closed.
uint16_t m_peerAssocId
Assoc Id assigned to me by peer.
EventId m_beaconLossTimer
Beacon loss timer.
void SetHoldingTimer()
Set the holding timer.
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
Maximum number of retries.
Time m_beaconInterval
Current beacon interval on corresponding interface.
void ClearConfirmTimer()
Clear the confirm timer.
uint16_t m_localLinkId
My ID of this link.
EventId m_holdingTimer
Holding timer.
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
Get the time of the last received beacon.
EventId m_retryTimer
Retry timer.
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()
Send a peer link confirm.
uint32_t m_interface
The number of interface I am associated with.
Timeout of holding (graceful closing) timer.
uint16_t m_retryCounter
Retry counter.
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
Retry timeout.
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
void RetryTimeout()
Retry Timeout event handler.