A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::lrwpan::LrWpanMac Class Reference

Class that implements the LR-WPAN MAC state machine. More...

#include "lr-wpan-mac.h"

+ Inheritance diagram for ns3::lrwpan::LrWpanMac:
+ Collaboration diagram for ns3::lrwpan::LrWpanMac:

Classes

struct  IndTxQueueElement
 Helper structure for managing pending transaction list elements (Indirect transmissions). More...
 
struct  TxQueueElement
 Helper structure for managing transmission queue elements. More...
 

Public Types

typedef void(* SentTracedCallback) (Ptr< const Packet > packet, uint8_t retries, uint8_t backoffs)
 TracedCallback signature for sent packets.
 
typedef void(* StateTracedCallback) (MacState oldState, MacState newState)
 TracedCallback signature for MacState change events.
 

Public Member Functions

 LrWpanMac ()
 Default constructor.
 
 ~LrWpanMac () override
 
int64_t AssignStreams (int64_t stream)
 Assign a fixed random variable stream number to the random variables used by this model.
 
Mac64Address GetCoordExtAddress () const
 Get the coordinator extended address currently associated to this device.
 
Mac16Address GetCoordShortAddress () const
 Get the coordinator short address currently associated to this device.
 
Mac64Address GetExtendedAddress () const
 Get the extended address of this MAC.
 
uint32_t GetIfsSize ()
 Get the size of the Interframe Space according to MPDU size (m_txPkt).
 
uint64_t GetMacAckWaitDuration () const
 Get the macAckWaitDuration attribute value.
 
uint8_t GetMacMaxFrameRetries () const
 Get the macMaxFrameRetries attribute value.
 
uint16_t GetPanId () const
 Get the PAN id used by this MAC.
 
Ptr< LrWpanPhyGetPhy ()
 Get the underlying PHY of the MAC.
 
bool GetRxOnWhenIdle () const
 Check if the receiver will be enabled when the MAC is idle.
 
Mac16Address GetShortAddress () const
 Get the short address of this MAC.
 
uint64_t GetTxPacketSymbols ()
 Obtain the number of symbols in the packet which is currently being sent by the MAC layer.
 
bool IsCoordDest ()
 Check if the packet destination is its coordinator.
 
bool IsTxAckReq ()
 Check if the packet to transmit requires acknowledgment.
 
void McpsDataRequest (McpsDataRequestParams params, Ptr< Packet > p) override
 IEEE 802.15.4-2006, section 7.1.1.1 MCPS-DATA.request Request to transfer a MSDU.
 
void MlmeAssociateRequest (MlmeAssociateRequestParams params) override
 IEEE 802.15.4-2011, section 6.2.2.1 MLME-ASSOCIATE.request Request primitive used by a device to request an association with a coordinator.
 
void MlmeAssociateResponse (MlmeAssociateResponseParams params) override
 IEEE 802.15.4-2011, section 6.2.2.3 MLME-ASSOCIATE.response Primitive used to initiate a response to an MLME-ASSOCIATE.indication primitive.
 
void MlmeGetRequest (MacPibAttributeIdentifier id) override
 IEEE 802.15.4-2006, section 7.1.6.1 MLME-GET.request Request information about a given PIB attribute.
 
void MlmeOrphanResponse (MlmeOrphanResponseParams params) override
 IEEE 802.15.4-2011, section 6.2.7.2 MLME-ORPHAN.response Primitive used to initiatte a response to an MLME-ORPHAN.indication primitive.
 
void MlmePollRequest (MlmePollRequestParams params) override
 IEEE 802.15.4-2011, section 6.2.14.2 MLME-POLL.request Prompts the device to request data from the coordinator.
 
void MlmeScanRequest (MlmeScanRequestParams params) override
 IEEE 802.15.4-2011, section 6.2.10.1 MLME-SCAN.request Request primitive used to initiate a channel scan over a given list of channels.
 
void MlmeSetRequest (MacPibAttributeIdentifier id, Ptr< MacPibAttributes > attribute) override
 IEEE 802.15.4-2011, section 6.2.11.1 MLME-SET.request Attempts to write the given value to the indicated PIB attribute.
 
void MlmeStartRequest (MlmeStartRequestParams params) override
 IEEE 802.15.4-2006, section 7.1.14.1 MLME-START.request Request to allow a PAN coordinator to initiate a new PAN or beginning a new superframe configuration.
 
void MlmeSyncRequest (MlmeSyncRequestParams params) override
 IEEE 802.15.4-2011, section 6.2.13.1 MLME-SYNC.request Request to synchronize with the coordinator by acquiring and, if specified, tracking beacons.
 
void PdDataConfirm (PhyEnumeration status)
 IEEE 802.15.4-2006 section 6.2.1.2 Confirm the end of transmission of an MPDU to MAC.
 
void PdDataIndication (uint32_t psduLength, Ptr< Packet > p, uint8_t lqi)
 IEEE 802.15.4-2006 section 6.2.1.3 PD-DATA.indication Indicates the transfer of an MPDU from PHY to MAC (receiving)
 
void PlmeCcaConfirm (PhyEnumeration status)
 IEEE 802.15.4-2006 section 6.2.2.2 PLME-CCA.confirm status.
 
void PlmeEdConfirm (PhyEnumeration status, uint8_t energyLevel)
 IEEE 802.15.4-2006 section 6.2.2.4 PLME-ED.confirm status and energy level.
 
void PlmeGetAttributeConfirm (PhyEnumeration status, PhyPibAttributeIdentifier id, Ptr< PhyPibAttributes > attribute)
 IEEE 802.15.4-2006 section 6.2.2.6 PLME-GET.confirm Get attributes per definition from Table 23 in section 6.4.2.
 
void PlmeSetAttributeConfirm (PhyEnumeration status, PhyPibAttributeIdentifier id)
 IEEE 802.15.4-2006 section 6.2.2.10 PLME-SET.confirm Set attributes per definition from Table 23 in section 6.4.2.
 
void PlmeSetTRXStateConfirm (PhyEnumeration status)
 IEEE 802.15.4-2006 section 6.2.2.8 PLME-SET-TRX-STATE.confirm Set PHY state.
 
void PrintPendingTxQueue (std::ostream &os) const
 Print the Pending transaction list.
 
void PrintTransmitQueueSize ()
 Print the number of elements in the packet transmit queue.
 
void PrintTxQueue (std::ostream &os) const
 Print the Transmit Queue.
 
void SetAssociatedCoor (Mac16Address mac)
 Check if the packet destination is its coordinator.
 
void SetAssociatedCoor (Mac64Address mac)
 Check if the packet destination is its coordinator.
 
void SetCsmaCa (Ptr< LrWpanCsmaCa > csmaCa)
 Set the CSMA/CA implementation to be used by the MAC.
 
void SetExtendedAddress (Mac64Address address)
 Set the extended address of this MAC.
 
void SetIndTxQMaxSize (uint32_t queueSize)
 Set the max size of the indirect transmit queue (Pending Transaction list)
 
void SetLrWpanMacState (MacState macState)
 CSMA-CA algorithm calls back the MAC after executing channel assessment.
 
void SetMacMaxFrameRetries (uint8_t retries)
 Set the macMaxFrameRetries attribute value.
 
void SetPanId (uint16_t panId)
 Set the PAN id used by this MAC.
 
void SetPhy (Ptr< LrWpanPhy > phy)
 Set the underlying PHY for the MAC.
 
void SetRxOnWhenIdle (bool rxOnWhenIdle)
 Set if the receiver should be enabled when the MAC is idle.
 
void SetShortAddress (Mac16Address address)
 Set the short address of this MAC.
 
void SetTxQMaxSize (uint32_t queueSize)
 Set the max size of the transmit queue.
 
- Public Member Functions inherited from ns3::lrwpan::LrWpanMacBase
 ~LrWpanMacBase () override
 
void SetMcpsDataConfirmCallback (McpsDataConfirmCallback c)
 Set the callback for the confirmation of a data transmission request.
 
void SetMcpsDataIndicationCallback (McpsDataIndicationCallback c)
 Set the callback for the indication of an incoming data packet.
 
void SetMlmeAssociateConfirmCallback (MlmeAssociateConfirmCallback c)
 Set the callback for the confirmation of a data transmission request.
 
void SetMlmeAssociateIndicationCallback (MlmeAssociateIndicationCallback c)
 Set the callback for the indication of an incoming associate request command.
 
void SetMlmeBeaconNotifyIndicationCallback (MlmeBeaconNotifyIndicationCallback c)
 Set the callback for the indication of an incoming beacon packet.
 
void SetMlmeCommStatusIndicationCallback (MlmeCommStatusIndicationCallback c)
 Set the callback for the indication to a response primitive.
 
void SetMlmeGetConfirmCallback (MlmeGetConfirmCallback c)
 Set the callback for the confirmation of an attempt to read an attribute.
 
void SetMlmeOrphanIndicationCallback (MlmeOrphanIndicationCallback c)
 Set the callback for the indication to the reception of an orphan notification.
 
void SetMlmePollConfirmCallback (MlmePollConfirmCallback c)
 Set the callback for the confirmation of a data transmission request.
 
void SetMlmeScanConfirmCallback (MlmeScanConfirmCallback c)
 Set the callback for the confirmation of a data transmission request.
 
void SetMlmeSetConfirmCallback (MlmeSetConfirmCallback c)
 Set the callback for the confirmation of an attempt to write an attribute.
 
void SetMlmeStartConfirmCallback (MlmeStartConfirmCallback c)
 Set the callback for the confirmation of a data transmission request.
 
void SetMlmeSyncLossIndicationCallback (MlmeSyncLossIndicationCallback c)
 Set the callback for the loss of synchronization with a coordinator.
 
- Public Member Functions inherited from ns3::Object
 Object ()
 Constructor.
 
 ~Object () override
 Destructor.
 
void AggregateObject (Ptr< Object > other)
 Aggregate two Objects together.
 
void Dispose ()
 Dispose of this Object.
 
AggregateIterator GetAggregateIterator () const
 Get an iterator to the Objects aggregated to this one.
 
TypeId GetInstanceTypeId () const override
 Get the most derived TypeId for this Object.
 
template<typename T >
Ptr< T > GetObject () const
 Get a pointer to the requested aggregated Object.
 
template<>
Ptr< ObjectGetObject () const
 Specialization of () for objects of type ns3::Object.
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 Get a pointer to the requested aggregated Object by TypeId.
 
template<>
Ptr< ObjectGetObject (TypeId tid) const
 Specialization of (TypeId tid) for objects of type ns3::Object.
 
void Initialize ()
 Invoke DoInitialize on all Objects aggregated to this one.
 
bool IsInitialized () const
 Check if the object has been initialized.
 
void UnidirectionalAggregateObject (Ptr< Object > other)
 Aggregate an Object to another Object.
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 Default constructor.
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor.
 
uint32_t GetReferenceCount () const
 Get the reference count of the object.
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment operator.
 
void Ref () const
 Increment the reference count.
 
void Unref () const
 Decrement the reference count.
 
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
 Virtual destructor.
 
void GetAttribute (std::string name, AttributeValue &value, bool permissive=false) const
 Get the value of an attribute, raising fatal errors if unsuccessful.
 
bool GetAttributeFailSafe (std::string name, AttributeValue &value) const
 Get the value of an attribute without raising errors.
 
void SetAttribute (std::string name, const AttributeValue &value)
 Set a single attribute, raising fatal errors if unsuccessful.
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 Set a single attribute without raising errors.
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 Connect a TraceSource to a Callback with a context.
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 Connect a TraceSource to a Callback without a context.
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected with a context.
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected without a context.
 

Static Public Member Functions

static TypeId GetTypeId ()
 Get the type ID.
 
- Static Public Member Functions inherited from ns3::lrwpan::LrWpanMacBase
static TypeId GetTypeId ()
 Get the type ID.
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId ()
 Register this type.
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId ()
 Get the type ID.
 

Public Attributes

uint64_t m_assocRespCmdWaitTime
 The maximum wait time for an association response command after the reception of data request command ACK during the association process.
 
uint32_t m_beaconInterval
 Indication of the Interval used by the coordinator to transmit beacon frames expressed in symbols.
 
bool m_beaconTrackingOn
 Indication of whether the current device is tracking incoming beacons.
 
bool m_coor
 Indicates if the current device is a coordinator type.
 
uint8_t m_deviceCapability
 Indication of current device capability (FFD or RFD)
 
uint8_t m_fnlCapSlot
 Indication of the Slot where the CAP portion of the OUTGOING Superframe ends.
 
uint32_t m_ifs
 The value of the necessary InterFrame Space after the transmission of a packet.
 
uint32_t m_incomingBeaconInterval
 Indication of the interval a node should receive a superframe expressed in symbols.
 
uint8_t m_incomingBeaconOrder
 The beaconOrder value of the INCOMING frame.
 
uint8_t m_incomingFnlCapSlot
 Indication of the Slot where the CAP portion of the INCOMING Superframe ends.
 
uint32_t m_incomingSuperframeDuration
 Indication of the superframe duration in symbols (e.g.
 
uint8_t m_incomingSuperframeOrder
 Used by all devices that have a parent.
 
bool m_macAssociationPermit
 Indication of whether a coordinator is currently allowing association.
 
bool m_macAutoRequest
 Indication of whether a device automatically sends data request command if its address is listed in the beacon frame.
 
uint8_t m_macBeaconOrder
 Used by a PAN coordinator or coordinator.
 
std::vector< uint8_t > m_macBeaconPayload
 The set with the contents of the beacon payload.
 
uint32_t m_macBeaconPayloadLength
 The length, in octets, of the beacon payload.
 
Time m_macBeaconRxTime
 The time that the device received its last bit of the beacon frame.
 
Time m_macBeaconTxTime
 The time that the device transmitted its last beacon frame.
 
SequenceNumber8 m_macBsn
 Sequence number added to transmitted beacon frame, 00-ff.
 
Mac64Address m_macCoordExtendedAddress
 The extended address of the coordinator through which the device is associated.
 
Mac16Address m_macCoordShortAddress
 The short address of the coordinator through which the device is associated.
 
SequenceNumber8 m_macDsn
 Sequence number added to transmitted data or MAC command frame, 00-ff.
 
uint32_t m_macLIFSPeriod
 The minimum time forming a Long InterFrame Spacing (LIFS) period.
 
uint8_t m_macMaxFrameRetries
 The maximum number of retries allowed after a transmission failure.
 
uint16_t m_macPanId
 16 bits id of PAN on which this device is operating.
 
uint16_t m_macPanIdScan
 Temporally stores the value of the current m_macPanId when a MLME-SCAN.request is performed.
 
bool m_macPromiscuousMode
 Indicates if MAC sublayer is in receive all mode.
 
uint64_t m_macResponseWaitTime
 The maximum time, in multiples of aBaseSuperframeDuration, a device shall wait for a response command frame to be available following a request command frame.
 
bool m_macRxOnWhenIdle
 Indication of whether the MAC sublayer is to enable its receiver during idle periods.
 
uint32_t m_macSIFSPeriod
 The minimum time forming a Short InterFrame Spacing (SIFS) period.
 
uint8_t m_macSuperframeOrder
 Used by a PAN coordinator or coordinator.
 
uint64_t m_macSyncSymbolOffset
 Symbol boundary is same as m_macBeaconTxTime.
 
uint16_t m_macTransactionPersistenceTime
 The maximum time (in UNIT periods) that a transaction is stored by a coordinator and indicated in its beacon.
 
uint8_t m_maxEnergyLevel
 The maximum energy level detected during ED scan on the current channel.
 
uint8_t m_numLostBeacons
 The number of consecutive loss beacons in a beacon tracking operation.
 
bool m_panCoor
 Indication of whether the current device is the PAN coordinator.
 
uint64_t m_rxBeaconSymbols
 The total size of the received beacon in symbols.
 
uint32_t m_superframeDuration
 Indication of the superframe duration in symbols.
 

Protected Member Functions

void DoDispose () override
 Destructor implementation.
 
void DoInitialize () override
 Initialize() implementation.
 
- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object.
 
virtual void NotifyNewAggregate ()
 Notify all Objects aggregated to this one of a new Object being aggregated.
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 Complete construction of ObjectBase; invoked by derived classes.
 
virtual void NotifyConstructionCompleted ()
 Notifier called once the ObjectBase is fully constructed.
 

Private Member Functions

void AckWaitTimeout ()
 Handle an ACK timeout with a packet retransmission, if there are retransmission left, or a packet drop.
 
void AwaitBeacon ()
 Called after the end of an INCOMING superframe to start the moment a device waits for a new incoming beacon.
 
void BeaconSearchTimeout ()
 Called if the device is unable to locate a beacon in the time set by MLME-SYNC.request.
 
void ChangeMacState (MacState newState)
 Change the current MAC state to the given new state.
 
void CheckQueue ()
 Check the transmission queue.
 
bool DequeueInd (Mac64Address dst, Ptr< IndTxQueueElement > entry)
 Extracts a packet from pending transactions list (Indirect transmissions).
 
void EndAssociateRequest ()
 Called to end an MLME-ASSOCIATE.request after changing the page and channel number.
 
void EndChannelEnergyScan ()
 Called at the end of one ED channel scan.
 
void EndChannelScan ()
 Called at the end of the current channel scan (Active or Passive) for a given duration.
 
void EndStartRequest ()
 Called to end a MLME-START.request after changing the page and channel number.
 
void EnqueueInd (Ptr< Packet > p)
 Adds a packet to the pending transactions list (Indirect transmissions).
 
void EnqueueTxQElement (Ptr< TxQueueElement > txQElement)
 Add an element to the transmission queue.
 
GtsFields GetGtsFields ()
 Constructs the Guaranteed Time Slots (GTS) Fields from local information.
 
PendingAddrFields GetPendingAddrFields ()
 Constructs Pending Address Fields from the local information, the Pending Address Fields are part of the beacon frame.
 
uint16_t GetSuperframeField ()
 Constructs a Superframe specification field from the local information, the superframe Specification field is necessary to create a beacon frame.
 
void IfsWaitTimeout (Time ifsTime)
 After a successful transmission of a frame (beacon, data) or an ack frame reception, the mac layer wait an Interframe Space (IFS) time and triggers this function to continue with the MAC flow.
 
void LostAssocRespCommand ()
 Called after m_assocRespCmdWaitTime timeout while waiting for an association response command.
 
bool PrepareRetransmission ()
 Check for remaining retransmissions for the packet currently being sent.
 
void PurgeInd ()
 Purge expired transactions from the pending transactions list.
 
void ReceiveBeacon (uint8_t lqi, Ptr< Packet > p)
 Used to process the reception of a beacon packet.
 
void RemoveFirstTxQElement ()
 Remove the tip of the transmission queue, including clean up related to the last packet transmission.
 
void RemovePendTxQElement (Ptr< Packet > p)
 Remove an element from the pending transaction list.
 
void SendAck (uint8_t seqno)
 Send an acknowledgment packet for the given sequence number.
 
void SendAssocRequestCommand ()
 Called to send an associate request command.
 
void SendAssocResponseCommand (Ptr< Packet > rxDataReqPkt)
 Called to send an associate response command.
 
void SendBeaconRequestCommand ()
 Called to send a beacon request command.
 
void SendDataRequestCommand ()
 Used to send a data request command (i.e.
 
void SendOneBeacon ()
 Called to send a single beacon frame.
 
void SendOrphanNotificationCommand ()
 Called to send a orphan notification command.
 
void StartCAP (SuperframeType superframeType)
 Called to begin the Contention Access Period (CAP) in a beacon-enabled mode.
 
void StartCFP (SuperframeType superframeType)
 Called to begin the Contention Free Period (CFP) in a beacon-enabled mode.
 
void StartInactivePeriod (SuperframeType superframeType)
 Start the Inactive Period in a beacon-enabled mode.
 

Private Attributes

EventId m_ackWaitTimeout
 Scheduler event for the ACK timeout of the currently transmitted data packet.
 
MlmeAssociateRequestParams m_associateParams
 The parameters used during a MLME-ASSOCIATE.request.
 
EventId m_assocResCmdWaitTimeout
 Scheduler event for the lost of a association response command frame.
 
EventId m_beaconEvent
 Scheduler event for generation of one beacon.
 
EventId m_capEvent
 Scheduler event for the end of the outgoing superframe CAP.
 
EventId m_cfpEvent
 Scheduler event for the end of the outgoing superframe CFP.
 
uint16_t m_channelScanIndex
 The channel list index used to obtain the current scanned channel.
 
Ptr< LrWpanCsmaCam_csmaCa
 The CSMA/CA implementation used by this MAC.
 
std::vector< uint8_t > m_energyDetectList
 The list of energy measurements, one for each channel searched during an ED scan.
 
EventId m_ifsEvent
 Scheduler event for Interframe spacing wait time.
 
EventId m_incCapEvent
 Scheduler event for the end of the incoming superframe CAP.
 
EventId m_incCfpEvent
 Scheduler event for the end of the incoming superframe CFP.
 
TracedValue< SuperframeStatusm_incSuperframeStatus
 The current period of the incoming superframe.
 
std::deque< Ptr< IndTxQueueElement > > m_indTxQueue
 The indirect transmit queue used by the MAC pending messages (The pending transaction list).
 
uint8_t m_lastRxFrameLqi
 Keep track of the last received frame Link Quality Indicator.
 
Mac64Address m_macExtendedAddress
 The extended 64 address (IEEE EUI-64) used by this MAC.
 
TracedCallback< Timem_macIfsEndTrace
 The trace source is fired at the end of any Interframe Space (IFS).
 
TracedCallback< Ptr< const Packet > > m_macIndTxDequeueTrace
 The trace source fired when packets are dequeued from the L3/l2 indirect transmission queue (Pending transaction list).
 
TracedCallback< Ptr< const Packet > > m_macIndTxDropTrace
 The trace source fired when packets are dropped due to indirect Tx queue overflows or expiration.
 
TracedCallback< Ptr< const Packet > > m_macIndTxEnqueueTrace
 The trace source fired when packets come into the "top" of the device at the L3/L2 transition, when being queued for indirect transmission (pending transaction list).
 
TracedCallback< Ptr< const Packet > > m_macPromiscRxTrace
 The trace source fired for packets successfully received by the device immediately before being forwarded up to higher layers (at the L2/L3 transition).
 
TracedCallback< Ptr< const Packet > > m_macRxDropTrace
 The trace source fired for packets successfully received by the device but dropped before being forwarded up to higher layers (at the L2/L3 transition).
 
TracedCallback< Ptr< const Packet > > m_macRxTrace
 The trace source fired for packets successfully received by the device immediately before being forwarded up to higher layers (at the L2/L3 transition).
 
TracedValue< MacStatem_macState
 The current state of the MAC layer.
 
TracedCallback< MacState, MacStatem_macStateLogger
 A trace source that fires when the MAC changes states.
 
TracedCallback< Ptr< const Packet > > m_macTxDequeueTrace
 The trace source fired when packets are dequeued from the L3/l2 transmission queue.
 
TracedCallback< Ptr< const Packet > > m_macTxDropTrace
 The trace source fired when packets are dropped due to missing ACKs or because of transmission failures in L1.
 
TracedCallback< Ptr< const Packet > > m_macTxEnqueueTrace
 The trace source fired when packets come into the "top" of the device at the L3/L2 transition, when being queued for transmission.
 
TracedCallback< Ptr< const Packet > > m_macTxOkTrace
 The trace source fired when packets where successfully transmitted, that is an acknowledgment was received, if requested, or the packet was successfully sent by L1, if no ACK was requested.
 
TracedCallback< Ptr< const Packet > > m_macTxTrace
 The trace source fired when packets are being sent down to L1.
 
uint32_t m_maxIndTxQueueSize
 The maximum size of the indirect transmit queue (The pending transaction list).
 
uint32_t m_maxTxQueueSize
 The maximum size of the transmit queue.
 
uint8_t m_numCsmacaRetry
 The number of CSMA/CA retries used for sending the current packet.
 
TracedValue< SuperframeStatusm_outSuperframeStatus
 The current period of the outgoing superframe.
 
std::vector< PanDescriptorm_panDescriptorList
 The list of PAN descriptors accumulated during channel scans, used to select a PAN to associate.
 
PendingPrimitiveStatus m_pendPrimitive
 Indicates the pending primitive when PLME.SET operation (page or channel switch) is called from within another MLME primitive (e.g.
 
Ptr< LrWpanPhym_phy
 The PHY associated with this MAC.
 
TracedCallback< Ptr< const Packet > > m_promiscSnifferTrace
 A trace source that emulates a promiscuous mode protocol sniffer connected to the device.
 
EventId m_respWaitTimeout
 Scheduler event for a response to a request command frame.
 
uint8_t m_retransmission
 The number of already used retransmission for the currently transmitted packet.
 
Ptr< Packetm_rxPkt
 The command request packet received.
 
EventId m_scanEnergyEvent
 Scheduler event for the end of a ED channel scan.
 
EventId m_scanEvent
 Scheduler event for the end of an ACTIVE or PASSIVE channel scan.
 
EventId m_scanOrphanEvent
 Scheduler event for the end of an ORPHAN channel scan.
 
MlmeScanRequestParams m_scanParams
 The parameters used during a MLME-SCAN.request.
 
TracedCallback< Ptr< const Packet >, uint8_t, uint8_t > m_sentPktTrace
 The trace source fired when packets are considered as successfully sent or the transmission has been given up.
 
EventId m_setMacState
 Scheduler event for a deferred MAC state change.
 
Mac16Address m_shortAddress
 The short address (16 bit address) used by this MAC.
 
TracedCallback< Ptr< const Packet > > m_snifferTrace
 A trace source that emulates a non-promiscuous protocol sniffer connected to the device.
 
MlmeStartRequestParams m_startParams
 The parameters used during a MLME-START.request.
 
EventId m_trackingEvent
 Scheduler event to track the incoming beacons.
 
Ptr< Packetm_txPkt
 The packet which is currently being sent by the MAC layer.
 
std::deque< Ptr< TxQueueElement > > m_txQueue
 The transmit queue used by the MAC.
 
Ptr< UniformRandomVariablem_uniformVar
 The uniform random variable used in this mac layer.
 
std::vector< uint8_t > m_unscannedChannels
 The list of unscanned channels during a scan operation.
 

Additional Inherited Members

- Protected Attributes inherited from ns3::lrwpan::LrWpanMacBase
McpsDataConfirmCallback m_mcpsDataConfirmCallback
 This callback is used to report data transmission request status to the upper layers.
 
McpsDataIndicationCallback m_mcpsDataIndicationCallback
 This callback is used to notify incoming packets to the upper layers.
 
MlmeAssociateConfirmCallback m_mlmeAssociateConfirmCallback
 This callback is used to report the status after a device request an association with a coordinator.
 
MlmeAssociateIndicationCallback m_mlmeAssociateIndicationCallback
 This callback is used to indicate the reception of an association request command.
 
MlmeBeaconNotifyIndicationCallback m_mlmeBeaconNotifyIndicationCallback
 This callback is used to notify incoming beacon packets to the upper layers.
 
MlmeCommStatusIndicationCallback m_mlmeCommStatusIndicationCallback
 This callback is instigated through a response primitive.
 
MlmeGetConfirmCallback m_mlmeGetConfirmCallback
 This callback is used to report the result of an attribute read request to the upper layers.
 
MlmeOrphanIndicationCallback m_mlmeOrphanIndicationCallback
 This callback is used to indicate the reception of a orphan notification command.
 
MlmePollConfirmCallback m_mlmePollConfirmCallback
 This callback is used to report the status after a device send data command request to the coordinator to transmit data.
 
MlmeScanConfirmCallback m_mlmeScanConfirmCallback
 This callback is used to report the result of a scan on a group of channels for the selected channel page.
 
MlmeSetConfirmCallback m_mlmeSetConfirmCallback
 This callback is used to report the result of an attribute writing request to the upper layers.
 
MlmeStartConfirmCallback m_mlmeStartConfirmCallback
 This callback is used to report the start of a new PAN or the begin of a new superframe configuration.
 
MlmeSyncLossIndicationCallback m_mlmeSyncLossIndicationCallback
 This callback is used to indicate the loss of synchronization with a coordinator.
 

Detailed Description

Class that implements the LR-WPAN MAC state machine.

Definition at line 152 of file lr-wpan-mac.h.

Member Typedef Documentation

◆ SentTracedCallback

typedef void(* ns3::lrwpan::LrWpanMac::SentTracedCallback) (Ptr< const Packet > packet, uint8_t retries, uint8_t backoffs)

TracedCallback signature for sent packets.

Parameters
[in]packetThe packet.
[in]retriesThe number of retries.
[in]backoffsThe number of CSMA backoffs.

Definition at line 720 of file lr-wpan-mac.h.

◆ StateTracedCallback

typedef void(* ns3::lrwpan::LrWpanMac::StateTracedCallback) (MacState oldState, MacState newState)

TracedCallback signature for MacState change events.

Parameters
[in]oldValueThe original state value.
[in]newValueThe new state value.
Deprecated
The MacState is now accessible as the TracedValue MacStateValue. The MacState TracedCallback will be removed in a future release.

Definition at line 732 of file lr-wpan-mac.h.

Constructor & Destructor Documentation

◆ LrWpanMac()

◆ ~LrWpanMac()

ns3::lrwpan::LrWpanMac::~LrWpanMac ( )
override

Definition at line 253 of file lr-wpan-mac.cc.

Member Function Documentation

◆ AckWaitTimeout()

void ns3::lrwpan::LrWpanMac::AckWaitTimeout ( )
private

Handle an ACK timeout with a packet retransmission, if there are retransmission left, or a packet drop.

Definition at line 2673 of file lr-wpan-mac.cc.

References ns3::lrwpan::MAC_CSMA, ns3::lrwpan::MAC_IDLE, NS_LOG_FUNCTION, PrepareRetransmission(), and SetLrWpanMacState().

Referenced by PdDataConfirm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AssignStreams()

int64_t ns3::lrwpan::LrWpanMac::AssignStreams ( int64_t stream)

Assign a fixed random variable stream number to the random variables used by this model.

Return the number of streams that have been assigned.

Parameters
streamfirst stream index to use
Returns
the number of stream indices assigned by this model

Definition at line 3033 of file lr-wpan-mac.cc.

References m_csmaCa, m_uniformVar, and NS_LOG_FUNCTION.

◆ AwaitBeacon()

void ns3::lrwpan::LrWpanMac::AwaitBeacon ( )
private

Called after the end of an INCOMING superframe to start the moment a device waits for a new incoming beacon.

Definition at line 1706 of file lr-wpan-mac.cc.

References ns3::lrwpan::BEACON, and m_incSuperframeStatus.

Referenced by StartInactivePeriod().

+ Here is the caller graph for this function:

◆ BeaconSearchTimeout()

void ns3::lrwpan::LrWpanMac::BeaconSearchTimeout ( )
private

Called if the device is unable to locate a beacon in the time set by MLME-SYNC.request.

Definition at line 1718 of file lr-wpan-mac.cc.

References ns3::lrwpan::aBaseSuperframeDuration, ns3::lrwpan::aMaxLostBeacons, ns3::lrwpan::BEACON_LOSS, BeaconSearchTimeout(), m_beaconTrackingOn, m_incomingBeaconOrder, ns3::lrwpan::MlmeSyncLossIndicationParams::m_lossReason, m_macPanId, ns3::lrwpan::LrWpanMacBase::m_mlmeSyncLossIndicationCallback, m_numLostBeacons, ns3::lrwpan::MlmeSyncLossIndicationParams::m_panId, m_phy, m_trackingEvent, ns3::Simulator::Schedule(), and ns3::Seconds().

Referenced by BeaconSearchTimeout(), MlmeSyncRequest(), and ReceiveBeacon().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ChangeMacState()

void ns3::lrwpan::LrWpanMac::ChangeMacState ( MacState newState)
private

Change the current MAC state to the given new state.

Parameters
newStatethe new state

Definition at line 3875 of file lr-wpan-mac.cc.

References m_macState, m_macStateLogger, and NS_LOG_LOGIC.

Referenced by LrWpanMac(), PdDataIndication(), SendAck(), SendOneBeacon(), and SetLrWpanMacState().

+ Here is the caller graph for this function:

◆ CheckQueue()

void ns3::lrwpan::LrWpanMac::CheckQueue ( )
private

Check the transmission queue.

If there are packets in the transmission queue and the MAC is idle, pick the first one and initiate a packet transmission.

Definition at line 1953 of file lr-wpan-mac.cc.

References ns3::lrwpan::CAP, ns3::EventId::IsPending(), m_coor, m_csmaCa, m_ifsEvent, m_incSuperframeStatus, m_macState, m_outSuperframeStatus, m_setMacState, m_txPkt, m_txQueue, ns3::lrwpan::MAC_CSMA, ns3::lrwpan::MAC_IDLE, NS_LOG_FUNCTION, ns3::Simulator::ScheduleNow(), and SetLrWpanMacState().

Referenced by IfsWaitTimeout(), McpsDataRequest(), MlmeOrphanResponse(), PlmeSetTRXStateConfirm(), SendAssocRequestCommand(), SendBeaconRequestCommand(), SendDataRequestCommand(), SendOneBeacon(), SendOrphanNotificationCommand(), and StartCAP().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DequeueInd()

bool ns3::lrwpan::LrWpanMac::DequeueInd ( Mac64Address dst,
Ptr< IndTxQueueElement > entry )
private

Extracts a packet from pending transactions list (Indirect transmissions).

Parameters
dstThe extended address used an index to obtain an element from the pending transaction list.
entryThe dequeued element from the pending transaction list.
Returns
The status of the dequeue

Definition at line 2895 of file lr-wpan-mac.cc.

References m_indTxQueue, m_macIndTxDequeueTrace, and PurgeInd().

Referenced by SendAssocResponseCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DoDispose()

void ns3::lrwpan::LrWpanMac::DoDispose ( )
overrideprotectedvirtual

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 273 of file lr-wpan-mac.cc.

References ns3::EventId::Cancel(), ns3::Object::DoDispose(), m_beaconEvent, m_csmaCa, m_energyDetectList, m_indTxQueue, ns3::lrwpan::LrWpanMacBase::m_mcpsDataConfirmCallback, ns3::lrwpan::LrWpanMacBase::m_mcpsDataIndicationCallback, ns3::lrwpan::LrWpanMacBase::m_mlmeAssociateConfirmCallback, ns3::lrwpan::LrWpanMacBase::m_mlmeAssociateIndicationCallback, ns3::lrwpan::LrWpanMacBase::m_mlmeBeaconNotifyIndicationCallback, ns3::lrwpan::LrWpanMacBase::m_mlmeCommStatusIndicationCallback, ns3::lrwpan::LrWpanMacBase::m_mlmeOrphanIndicationCallback, ns3::lrwpan::LrWpanMacBase::m_mlmePollConfirmCallback, ns3::lrwpan::LrWpanMacBase::m_mlmeScanConfirmCallback, ns3::lrwpan::LrWpanMacBase::m_mlmeStartConfirmCallback, ns3::lrwpan::LrWpanMacBase::m_mlmeSyncLossIndicationCallback, m_panDescriptorList, m_phy, m_scanEnergyEvent, m_scanEvent, m_scanOrphanEvent, m_txPkt, m_txQueue, m_unscannedChannels, and ns3::MakeNullCallback().

+ Here is the call graph for this function:

◆ DoInitialize()

void ns3::lrwpan::LrWpanMac::DoInitialize ( )
overrideprotectedvirtual

Initialize() implementation.

This method is called only once by Initialize(). If the user calls Initialize() multiple times, DoInitialize() is called only the first time.

Subclasses are expected to override this method and chain up to their parent's implementation once they are done. It is safe to call GetObject() and AggregateObject() from within this method.

Reimplemented from ns3::Object.

Definition at line 258 of file lr-wpan-mac.cc.

References ns3::Object::DoInitialize(), ns3::lrwpan::IEEE_802_15_4_PHY_RX_ON, ns3::lrwpan::IEEE_802_15_4_PHY_TRX_OFF, m_macRxOnWhenIdle, and m_phy.

+ Here is the call graph for this function:

◆ EndAssociateRequest()

void ns3::lrwpan::LrWpanMac::EndAssociateRequest ( )
private

Called to end an MLME-ASSOCIATE.request after changing the page and channel number.

Definition at line 724 of file lr-wpan-mac.cc.

References m_associateParams, ns3::lrwpan::MlmeAssociateRequestParams::m_coordAddrMode, ns3::lrwpan::MlmeAssociateRequestParams::m_coordExtAddr, ns3::lrwpan::MlmeAssociateRequestParams::m_coordPanId, ns3::lrwpan::MlmeAssociateRequestParams::m_coordShortAddr, m_macCoordExtendedAddress, m_macCoordShortAddress, m_macPanId, m_pendPrimitive, ns3::lrwpan::MLME_NONE, SendAssocRequestCommand(), and ns3::lrwpan::SHORT_ADDR.

Referenced by PlmeSetAttributeConfirm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EndChannelEnergyScan()

void ns3::lrwpan::LrWpanMac::EndChannelEnergyScan ( )
private

◆ EndChannelScan()

void ns3::lrwpan::LrWpanMac::EndChannelScan ( )
private

Called at the end of the current channel scan (Active or Passive) for a given duration.

Definition at line 1419 of file lr-wpan-mac.cc.

References ns3::Create(), ns3::Callback< R, UArgs >::IsNull(), m_channelScanIndex, ns3::lrwpan::MlmeScanConfirmParams::m_chPage, ns3::lrwpan::MlmeScanRequestParams::m_chPage, ns3::lrwpan::MlmeScanConfirmParams::m_energyDetList, m_macAutoRequest, m_macCoordExtendedAddress, m_macCoordShortAddress, m_macPanId, m_macPanIdScan, ns3::lrwpan::LrWpanMacBase::m_mlmeScanConfirmCallback, ns3::lrwpan::MlmeScanConfirmParams::m_panDescList, m_panDescriptorList, m_pendPrimitive, m_phy, ns3::lrwpan::MlmeScanConfirmParams::m_resultListSize, ns3::lrwpan::MlmeScanRequestParams::m_scanChannels, m_scanParams, ns3::lrwpan::MlmeScanConfirmParams::m_scanType, ns3::lrwpan::MlmeScanRequestParams::m_scanType, m_shortAddress, ns3::lrwpan::MlmeScanConfirmParams::m_status, ns3::lrwpan::MlmeScanConfirmParams::m_unscannedCh, m_unscannedChannels, ns3::lrwpan::MLME_NONE, ns3::lrwpan::MLMESCAN_ACTIVE, ns3::lrwpan::MLMESCAN_ORPHAN, ns3::lrwpan::MLMESCAN_PASSIVE, ns3::lrwpan::NO_BEACON, NS_LOG_ERROR, NS_LOG_FUNCTION, ns3::lrwpan::phyCurrentChannel, and ns3::lrwpan::SUCCESS.

Referenced by PlmeSetAttributeConfirm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EndStartRequest()

void ns3::lrwpan::LrWpanMac::EndStartRequest ( )
private

◆ EnqueueInd()

void ns3::lrwpan::LrWpanMac::EnqueueInd ( Ptr< Packet > p)
private

Adds a packet to the pending transactions list (Indirect transmissions).

Parameters
pThe packet added to pending transaction list.

Definition at line 2829 of file lr-wpan-mac.cc.

References ns3::lrwpan::aBaseSuperframeDuration, ns3::Create(), ns3::lrwpan::EXT_ADDR, ns3::lrwpan::LrWpanMacHeader::EXTADDR, ns3::lrwpan::LrWpanMacHeader::GetDstAddrMode(), ns3::lrwpan::LrWpanMacHeader::GetExtDstAddr(), ns3::lrwpan::LrWpanMacHeader::GetExtSrcAddr(), ns3::lrwpan::LrWpanMacHeader::GetSeqNum(), ns3::lrwpan::LrWpanMacHeader::GetShortDstAddr(), ns3::Callback< R, UArgs >::IsNull(), ns3::lrwpan::MlmeCommStatusIndicationParams::m_dstAddrMode, ns3::lrwpan::MlmeCommStatusIndicationParams::m_dstExtAddr, m_indTxQueue, m_macBeaconOrder, m_macIndTxDropTrace, m_macIndTxEnqueueTrace, m_macPanId, m_macTransactionPersistenceTime, m_maxIndTxQueueSize, ns3::lrwpan::LrWpanMacBase::m_mlmeCommStatusIndicationCallback, ns3::lrwpan::MlmeCommStatusIndicationParams::m_panId, m_phy, ns3::lrwpan::MlmeCommStatusIndicationParams::m_srcAddrMode, ns3::lrwpan::MlmeCommStatusIndicationParams::m_srcExtAddr, ns3::lrwpan::MlmeCommStatusIndicationParams::m_status, ns3::Simulator::Now(), NS_ASSERT, PurgeInd(), ns3::Seconds(), ns3::lrwpan::SHORT_ADDR, and ns3::lrwpan::TRANSACTION_OVERFLOW.

Referenced by MlmeAssociateResponse().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EnqueueTxQElement()

void ns3::lrwpan::LrWpanMac::EnqueueTxQElement ( Ptr< TxQueueElement > txQElement)
private

Add an element to the transmission queue.

Parameters
txQElementThe element added to the Tx Queue.

Definition at line 2627 of file lr-wpan-mac.cc.

References ns3::Callback< R, UArgs >::IsNull(), m_macTxDropTrace, m_macTxEnqueueTrace, m_maxTxQueueSize, ns3::lrwpan::LrWpanMacBase::m_mcpsDataConfirmCallback, ns3::lrwpan::McpsDataConfirmParams::m_msduHandle, ns3::lrwpan::McpsDataConfirmParams::m_status, m_txQueue, NS_LOG_DEBUG, and ns3::lrwpan::TRANSACTION_OVERFLOW.

Referenced by McpsDataRequest(), MlmeOrphanResponse(), SendAssocRequestCommand(), SendBeaconRequestCommand(), SendDataRequestCommand(), SendOneBeacon(), and SendOrphanNotificationCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetCoordExtAddress()

Mac64Address ns3::lrwpan::LrWpanMac::GetCoordExtAddress ( ) const

Get the coordinator extended address currently associated to this device.

Returns
The coordinator extended address

Definition at line 3863 of file lr-wpan-mac.cc.

References m_macCoordExtendedAddress.

◆ GetCoordShortAddress()

Mac16Address ns3::lrwpan::LrWpanMac::GetCoordShortAddress ( ) const

Get the coordinator short address currently associated to this device.

Returns
The coordinator short address

Definition at line 3857 of file lr-wpan-mac.cc.

References m_macCoordShortAddress.

◆ GetExtendedAddress()

Mac64Address ns3::lrwpan::LrWpanMac::GetExtendedAddress ( ) const

Get the extended address of this MAC.

Returns
the extended address

Definition at line 364 of file lr-wpan-mac.cc.

References m_macExtendedAddress.

Referenced by McpsDataRequest(), MlmeAssociateResponse(), MlmeOrphanResponse(), PrintPendingTxQueue(), PrintTxQueue(), SendAssocRequestCommand(), SendOneBeacon(), and SendOrphanNotificationCommand().

+ Here is the caller graph for this function:

◆ GetGtsFields()

GtsFields ns3::lrwpan::LrWpanMac::GetGtsFields ( )
private

Constructs the Guaranteed Time Slots (GTS) Fields from local information.

The GTS Fields are part of the beacon frame.

Returns
the Guaranteed Time Slots (GTS) Fields

Definition at line 2004 of file lr-wpan-mac.cc.

Referenced by SendOneBeacon().

+ Here is the caller graph for this function:

◆ GetIfsSize()

uint32_t ns3::lrwpan::LrWpanMac::GetIfsSize ( )

Get the size of the Interframe Space according to MPDU size (m_txPkt).

Returns
the IFS size in symbols

Definition at line 3932 of file lr-wpan-mac.cc.

References ns3::lrwpan::aMaxSIFSFrameSize, ns3::Packet::GetSize(), m_macLIFSPeriod, m_macSIFSPeriod, m_txPkt, and NS_ASSERT.

Referenced by PdDataConfirm(), and PdDataIndication().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetMacAckWaitDuration()

uint64_t ns3::lrwpan::LrWpanMac::GetMacAckWaitDuration ( ) const

Get the macAckWaitDuration attribute value.

Returns
the maximum number symbols to wait for an acknowledgment frame

Definition at line 3883 of file lr-wpan-mac.cc.

References ns3::lrwpan::aTurnaroundTime, ns3::lrwpan::aUnitBackoffPeriod, and m_phy.

Referenced by PdDataConfirm().

+ Here is the caller graph for this function:

◆ GetMacMaxFrameRetries()

uint8_t ns3::lrwpan::LrWpanMac::GetMacMaxFrameRetries ( ) const

Get the macMaxFrameRetries attribute value.

Returns
the maximum number of retries

Definition at line 3890 of file lr-wpan-mac.cc.

References m_macMaxFrameRetries.

◆ GetPanId()

uint16_t ns3::lrwpan::LrWpanMac::GetPanId ( ) const

Get the PAN id used by this MAC.

Returns
the PAN id.

Definition at line 3851 of file lr-wpan-mac.cc.

References m_macPanId.

Referenced by McpsDataRequest(), and SendOneBeacon().

+ Here is the caller graph for this function:

◆ GetPendingAddrFields()

PendingAddrFields ns3::lrwpan::LrWpanMac::GetPendingAddrFields ( )
private

Constructs Pending Address Fields from the local information, the Pending Address Fields are part of the beacon frame.

Returns
the Pending Address Fields

Definition at line 2014 of file lr-wpan-mac.cc.

Referenced by SendOneBeacon().

+ Here is the caller graph for this function:

◆ GetPhy()

Ptr< LrWpanPhy > ns3::lrwpan::LrWpanMac::GetPhy ( )

Get the underlying PHY of the MAC.

Returns
the PHY

Definition at line 2035 of file lr-wpan-mac.cc.

References m_phy.

◆ GetRxOnWhenIdle()

bool ns3::lrwpan::LrWpanMac::GetRxOnWhenIdle ( ) const

Check if the receiver will be enabled when the MAC is idle.

Returns
true, if the receiver is enabled during idle periods, false otherwise

Definition at line 321 of file lr-wpan-mac.cc.

References m_macRxOnWhenIdle.

◆ GetShortAddress()

Mac16Address ns3::lrwpan::LrWpanMac::GetShortAddress ( ) const

Get the short address of this MAC.

Returns
the short address

Definition at line 358 of file lr-wpan-mac.cc.

References m_shortAddress.

Referenced by McpsDataRequest(), MlmeOrphanResponse(), MlmeStartRequest(), PdDataConfirm(), PrintPendingTxQueue(), PrintTxQueue(), and SendOneBeacon().

+ Here is the caller graph for this function:

◆ GetSuperframeField()

uint16_t ns3::lrwpan::LrWpanMac::GetSuperframeField ( )
private

Constructs a Superframe specification field from the local information, the superframe Specification field is necessary to create a beacon frame.

Returns
the Superframe specification field (bitmap)

Definition at line 1976 of file lr-wpan-mac.cc.

References ns3::lrwpan::SuperframeField::GetSuperframe(), m_csmaCa, m_fnlCapSlot, m_macAssociationPermit, m_macBeaconOrder, m_macSuperframeOrder, m_panCoor, ns3::lrwpan::SuperframeField::SetAssocPermit(), ns3::lrwpan::SuperframeField::SetBattLifeExt(), ns3::lrwpan::SuperframeField::SetBeaconOrder(), ns3::lrwpan::SuperframeField::SetFinalCapSlot(), ns3::lrwpan::SuperframeField::SetPanCoor(), and ns3::lrwpan::SuperframeField::SetSuperframeOrder().

Referenced by SendOneBeacon().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetTxPacketSymbols()

uint64_t ns3::lrwpan::LrWpanMac::GetTxPacketSymbols ( )

Obtain the number of symbols in the packet which is currently being sent by the MAC layer.

Returns
packet number of symbols

Definition at line 3959 of file lr-wpan-mac.cc.

References ns3::Packet::GetSize(), m_phy, m_txPkt, and NS_ASSERT.

+ Here is the call graph for this function:

◆ GetTypeId()

◆ IfsWaitTimeout()

void ns3::lrwpan::LrWpanMac::IfsWaitTimeout ( Time ifsTime)
private

After a successful transmission of a frame (beacon, data) or an ack frame reception, the mac layer wait an Interframe Space (IFS) time and triggers this function to continue with the MAC flow.

Parameters
ifsTimeIFS time

Definition at line 2691 of file lr-wpan-mac.cc.

References ns3::Time::As(), CheckQueue(), m_macIfsEndTrace, m_macLIFSPeriod, m_macSIFSPeriod, m_phy, NS_LOG_DEBUG, ns3::Time::S, and ns3::Seconds().

Referenced by PdDataConfirm(), and PdDataIndication().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsCoordDest()

bool ns3::lrwpan::LrWpanMac::IsCoordDest ( )

Check if the packet destination is its coordinator.

Returns
True if m_txPkt (packet awaiting to be sent) destination is its coordinator

Definition at line 3908 of file lr-wpan-mac.cc.

References ns3::lrwpan::LrWpanMacHeader::GetExtDstAddr(), ns3::lrwpan::LrWpanMacHeader::GetShortDstAddr(), m_coor, m_macCoordExtendedAddress, m_macCoordShortAddress, m_txPkt, NS_ASSERT, NS_LOG_DEBUG, and ns3::Packet::PeekHeader().

+ Here is the call graph for this function:

◆ IsTxAckReq()

bool ns3::lrwpan::LrWpanMac::IsTxAckReq ( )

Check if the packet to transmit requires acknowledgment.

Returns
True if the Tx packet requires acknowledgment

Definition at line 3968 of file lr-wpan-mac.cc.

References ns3::lrwpan::LrWpanMacHeader::IsAckReq(), m_txPkt, NS_ASSERT, and ns3::Packet::PeekHeader().

+ Here is the call graph for this function:

◆ LostAssocRespCommand()

void ns3::lrwpan::LrWpanMac::LostAssocRespCommand ( )
private

Called after m_assocRespCmdWaitTime timeout while waiting for an association response command.

Definition at line 1321 of file lr-wpan-mac.cc.

References ns3::Callback< R, UArgs >::IsNull(), ns3::lrwpan::MlmeAssociateConfirmParams::m_assocShortAddr, m_macCoordExtendedAddress, m_macCoordShortAddress, m_macPanId, ns3::lrwpan::LrWpanMacBase::m_mlmeAssociateConfirmCallback, ns3::lrwpan::MlmeAssociateConfirmParams::m_status, and ns3::lrwpan::NO_DATA.

Referenced by PdDataIndication().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ McpsDataRequest()

void ns3::lrwpan::LrWpanMac::McpsDataRequest ( McpsDataRequestParams params,
Ptr< Packet > p )
overridevirtual

IEEE 802.15.4-2006, section 7.1.1.1 MCPS-DATA.request Request to transfer a MSDU.

Parameters
paramsthe request parameters
pthe packet to be transmitted

Implements ns3::lrwpan::LrWpanMacBase.

Definition at line 370 of file lr-wpan-mac.cc.

References ns3::lrwpan::ADDR_MODE_RESERVED, ns3::lrwpan::aMaxPhyPacketSize, ns3::lrwpan::aMinMPDUOverhead, CheckQueue(), ns3::Node::ChecksumEnabled(), ns3::Create(), ns3::lrwpan::LrWpanMacTrailer::EnableFcs(), EnqueueTxQElement(), ns3::lrwpan::EXT_ADDR, ns3::lrwpan::FRAME_TOO_LONG, ns3::lrwpan::LrWpanMacHeader::GetDstAddrMode(), ns3::lrwpan::LrWpanMacHeader::GetDstPanId(), GetExtendedAddress(), GetPanId(), GetShortAddress(), ns3::lrwpan::LrWpanMacHeader::GetShortDstAddr(), ns3::lrwpan::LrWpanMacHeader::GetSrcPanId(), ns3::SequenceNumber< NUMERIC_TYPE, SIGNED_TYPE >::GetValue(), ns3::lrwpan::INVALID_ADDRESS, ns3::Mac16Address::IsBroadcast(), ns3::Mac16Address::IsMulticast(), ns3::Callback< R, UArgs >::IsNull(), ns3::lrwpan::LrWpanMacHeader::LRWPAN_MAC_DATA, m_coor, m_macDsn, ns3::lrwpan::LrWpanMacBase::m_mcpsDataConfirmCallback, ns3::lrwpan::McpsDataConfirmParams::m_msduHandle, ns3::lrwpan::McpsDataConfirmParams::m_status, ns3::lrwpan::NO_PANID_ADDR, NS_ABORT_MSG, NS_ASSERT, NS_LOG_ERROR, NS_LOG_FUNCTION, NS_LOG_LOGIC, ns3::lrwpan::LrWpanMacHeader::SetAckReq(), ns3::lrwpan::LrWpanMacHeader::SetDstAddrFields(), ns3::lrwpan::LrWpanMacHeader::SetDstAddrMode(), ns3::lrwpan::LrWpanMacTrailer::SetFcs(), ns3::lrwpan::LrWpanMacHeader::SetNoAckReq(), ns3::lrwpan::LrWpanMacHeader::SetNoPanIdComp(), ns3::lrwpan::LrWpanMacHeader::SetPanIdComp(), ns3::lrwpan::LrWpanMacHeader::SetSecDisable(), ns3::lrwpan::LrWpanMacHeader::SetSrcAddrFields(), ns3::lrwpan::LrWpanMacHeader::SetSrcAddrMode(), ns3::lrwpan::SHORT_ADDR, ns3::lrwpan::TX_OPTION_ACK, ns3::lrwpan::TX_OPTION_GTS, and ns3::lrwpan::TX_OPTION_INDIRECT.

Referenced by LrWpanDataIfsTestCase::DataReceivedDev1(), CCAVulnerableWindowTest::DoRun(), LrWpanAckTestCase::DoRun(), LrWpanCcaTestCase::DoRun(), LrWpanCollisionTestCase::DoRun(), LrWpanDataIfsTestCase::DoRun(), LrWpanEdTestCase::DoRun(), LrWpanErrorDistanceTestCase::DoRun(), LrWpanSlottedCsmacaTestCase::DoRun(), and TestRxOffWhenIdleAfterCsmaFailure::DoRun().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MlmeAssociateRequest()

void ns3::lrwpan::LrWpanMac::MlmeAssociateRequest ( MlmeAssociateRequestParams params)
overridevirtual

IEEE 802.15.4-2011, section 6.2.2.1 MLME-ASSOCIATE.request Request primitive used by a device to request an association with a coordinator.

Parameters
paramsthe request parameters

Implements ns3::lrwpan::LrWpanMacBase.

Definition at line 669 of file lr-wpan-mac.cc.

References ns3::Create(), ns3::lrwpan::EXT_ADDR, ns3::lrwpan::INVALID_PARAMETER, ns3::Callback< R, UArgs >::IsNull(), m_associateParams, ns3::lrwpan::MlmeAssociateConfirmParams::m_assocShortAddr, ns3::lrwpan::LrWpanMacBase::m_mlmeAssociateConfirmCallback, m_pendPrimitive, m_phy, ns3::lrwpan::MlmeAssociateConfirmParams::m_status, ns3::lrwpan::MLME_ASSOC_REQ, ns3::lrwpan::MLME_NONE, NS_LOG_ERROR, NS_LOG_FUNCTION, ns3::lrwpan::phyCurrentPage, and ns3::lrwpan::SHORT_ADDR.

Referenced by ScanConfirm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MlmeAssociateResponse()

void ns3::lrwpan::LrWpanMac::MlmeAssociateResponse ( MlmeAssociateResponseParams params)
overridevirtual

IEEE 802.15.4-2011, section 6.2.2.3 MLME-ASSOCIATE.response Primitive used to initiate a response to an MLME-ASSOCIATE.indication primitive.

Parameters
paramsthe associate response parameters

Implements ns3::lrwpan::LrWpanMacBase.

Definition at line 744 of file lr-wpan-mac.cc.

References ns3::lrwpan::CommandPayloadHeader::ASSOCIATION_RESP, ns3::Node::ChecksumEnabled(), ns3::Create(), ns3::lrwpan::LrWpanMacTrailer::EnableFcs(), EnqueueInd(), ns3::lrwpan::LrWpanMacHeader::EXTADDR, GetExtendedAddress(), ns3::SequenceNumber< NUMERIC_TYPE, SIGNED_TYPE >::GetValue(), ns3::lrwpan::LrWpanMacHeader::LRWPAN_MAC_COMMAND, m_macDsn, m_macPanId, NS_LOG_FUNCTION, ns3::lrwpan::LrWpanMacHeader::SetAckReq(), ns3::lrwpan::CommandPayloadHeader::SetAssociationStatus(), ns3::lrwpan::LrWpanMacHeader::SetDstAddrFields(), ns3::lrwpan::LrWpanMacHeader::SetDstAddrMode(), ns3::lrwpan::LrWpanMacTrailer::SetFcs(), ns3::lrwpan::LrWpanMacHeader::SetPanIdComp(), ns3::lrwpan::LrWpanMacHeader::SetSecDisable(), ns3::lrwpan::CommandPayloadHeader::SetShortAddr(), ns3::lrwpan::LrWpanMacHeader::SetSrcAddrFields(), and ns3::lrwpan::LrWpanMacHeader::SetSrcAddrMode().

Referenced by AssociateIndication().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MlmeGetRequest()

void ns3::lrwpan::LrWpanMac::MlmeGetRequest ( MacPibAttributeIdentifier id)
overridevirtual

IEEE 802.15.4-2006, section 7.1.6.1 MLME-GET.request Request information about a given PIB attribute.

Note: The PibAttributeIndex parameter is not included because attributes that represent tables are not supported.

Parameters
idthe attribute identifier

Implements ns3::lrwpan::LrWpanMacBase.

Definition at line 975 of file lr-wpan-mac.cc.

References ns3::Create(), ns3::Callback< R, UArgs >::IsNull(), m_macAssociationPermit, m_macBeaconPayload, m_macBeaconPayloadLength, m_macExtendedAddress, m_macPanId, m_macPromiscuousMode, m_macRxOnWhenIdle, ns3::lrwpan::LrWpanMacBase::m_mlmeGetConfirmCallback, m_phy, m_shortAddress, ns3::lrwpan::macAssociationPermit, ns3::lrwpan::macBeaconPayload, ns3::lrwpan::macBeaconPayloadLength, ns3::lrwpan::macExtendedAddress, ns3::lrwpan::macPanId, ns3::lrwpan::macPromiscuousMode, ns3::lrwpan::macRxOnWhenIdle, ns3::lrwpan::macShortAddress, ns3::lrwpan::pCurrentChannel, ns3::lrwpan::pCurrentPage, ns3::lrwpan::SUCCESS, and ns3::lrwpan::UNSUPPORTED_ATTRIBUTE.

+ Here is the call graph for this function:

◆ MlmeOrphanResponse()

void ns3::lrwpan::LrWpanMac::MlmeOrphanResponse ( MlmeOrphanResponseParams params)
overridevirtual

IEEE 802.15.4-2011, section 6.2.7.2 MLME-ORPHAN.response Primitive used to initiatte a response to an MLME-ORPHAN.indication primitive.

Parameters
paramsthe orphan response parameters

Implements ns3::lrwpan::LrWpanMacBase.

Definition at line 789 of file lr-wpan-mac.cc.

References CheckQueue(), ns3::Node::ChecksumEnabled(), ns3::lrwpan::CommandPayloadHeader::COOR_REALIGN, ns3::Create(), ns3::lrwpan::LrWpanMacTrailer::EnableFcs(), EnqueueTxQElement(), ns3::lrwpan::LrWpanMacHeader::EXTADDR, GetExtendedAddress(), GetShortAddress(), ns3::SequenceNumber< NUMERIC_TYPE, SIGNED_TYPE >::GetValue(), ns3::lrwpan::LrWpanMacHeader::LRWPAN_MAC_COMMAND, m_macDsn, m_macPanId, m_phy, NS_LOG_FUNCTION, ns3::lrwpan::LrWpanMacHeader::SetAckReq(), ns3::lrwpan::CommandPayloadHeader::SetChannel(), ns3::lrwpan::CommandPayloadHeader::SetCoordShortAddr(), ns3::lrwpan::LrWpanMacHeader::SetDstAddrFields(), ns3::lrwpan::LrWpanMacHeader::SetDstAddrMode(), ns3::lrwpan::LrWpanMacTrailer::SetFcs(), ns3::lrwpan::LrWpanMacHeader::SetFrameVer(), ns3::lrwpan::CommandPayloadHeader::SetPage(), ns3::lrwpan::CommandPayloadHeader::SetPanId(), ns3::lrwpan::LrWpanMacHeader::SetPanIdComp(), ns3::lrwpan::LrWpanMacHeader::SetSecDisable(), ns3::lrwpan::CommandPayloadHeader::SetShortAddr(), ns3::lrwpan::LrWpanMacHeader::SetSrcAddrFields(), and ns3::lrwpan::LrWpanMacHeader::SetSrcAddrMode().

Referenced by OrphanIndication(), and TestOrphanScan::OrphanIndicationCoord().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MlmePollRequest()

void ns3::lrwpan::LrWpanMac::MlmePollRequest ( MlmePollRequestParams params)
overridevirtual

IEEE 802.15.4-2011, section 6.2.14.2 MLME-POLL.request Prompts the device to request data from the coordinator.

Parameters
paramsthe request parameters

Implements ns3::lrwpan::LrWpanMacBase.

Definition at line 889 of file lr-wpan-mac.cc.

References ns3::Create(), ns3::lrwpan::CommandPayloadHeader::DATA_REQ, ns3::SequenceNumber< NUMERIC_TYPE, SIGNED_TYPE >::GetValue(), ns3::lrwpan::LrWpanMacHeader::LRWPAN_MAC_COMMAND, m_macBsn, NS_FATAL_ERROR, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ MlmeScanRequest()

void ns3::lrwpan::LrWpanMac::MlmeScanRequest ( MlmeScanRequestParams params)
overridevirtual

IEEE 802.15.4-2011, section 6.2.10.1 MLME-SCAN.request Request primitive used to initiate a channel scan over a given list of channels.

Parameters
paramsthe scan request parameters

Implements ns3::lrwpan::LrWpanMacBase.

Definition at line 609 of file lr-wpan-mac.cc.

References ns3::EventId::Cancel(), ns3::Create(), ns3::lrwpan::INVALID_PARAMETER, ns3::Callback< R, UArgs >::IsNull(), ns3::EventId::IsPending(), m_capEvent, m_cfpEvent, m_channelScanIndex, ns3::lrwpan::MlmeScanConfirmParams::m_chPage, m_csmaCa, m_energyDetectList, m_incCapEvent, m_incCfpEvent, m_macPanId, m_macPanIdScan, ns3::lrwpan::LrWpanMacBase::m_mlmeScanConfirmCallback, m_panDescriptorList, m_pendPrimitive, m_phy, m_scanEnergyEvent, m_scanEvent, m_scanOrphanEvent, m_scanParams, ns3::lrwpan::MlmeScanConfirmParams::m_scanType, ns3::lrwpan::MlmeScanConfirmParams::m_status, m_trackingEvent, m_unscannedChannels, ns3::lrwpan::MLME_SCAN_REQ, ns3::lrwpan::MLMESCAN_ORPHAN, NS_LOG_ERROR, NS_LOG_FUNCTION, ns3::lrwpan::phyCurrentPage, and ns3::lrwpan::SCAN_IN_PROGRESS.

Referenced by TestActiveScanPanDescriptors::DoRun(), and TestOrphanScan::DoRun().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MlmeSetRequest()

◆ MlmeStartRequest()

void ns3::lrwpan::LrWpanMac::MlmeStartRequest ( MlmeStartRequestParams params)
overridevirtual

IEEE 802.15.4-2006, section 7.1.14.1 MLME-START.request Request to allow a PAN coordinator to initiate a new PAN or beginning a new superframe configuration.

Parameters
paramsthe request parameters

Implements ns3::lrwpan::LrWpanMacBase.

Definition at line 570 of file lr-wpan-mac.cc.

References ns3::Create(), ns3::lrwpan::FFD, GetShortAddress(), ns3::lrwpan::INVALID_PARAMETER, ns3::Callback< R, UArgs >::IsNull(), m_deviceCapability, ns3::lrwpan::MlmeStartRequestParams::m_logChPage, ns3::lrwpan::LrWpanMacBase::m_mlmeStartConfirmCallback, m_pendPrimitive, m_phy, m_startParams, ns3::lrwpan::MlmeStartConfirmParams::m_status, ns3::lrwpan::MLME_START_REQ, ns3::lrwpan::NO_SHORT_ADDRESS, NS_ASSERT, NS_LOG_ERROR, NS_LOG_FUNCTION, and ns3::lrwpan::phyCurrentPage.

Referenced by LrWpanSlottedCsmacaTestCase::DoRun(), TestActiveScanPanDescriptors::DoRun(), and TestOrphanScan::DoRun().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MlmeSyncRequest()

void ns3::lrwpan::LrWpanMac::MlmeSyncRequest ( MlmeSyncRequestParams params)
overridevirtual

IEEE 802.15.4-2011, section 6.2.13.1 MLME-SYNC.request Request to synchronize with the coordinator by acquiring and, if specified, tracking beacons.

Parameters
paramsthe request parameters

Implements ns3::lrwpan::LrWpanMacBase.

Definition at line 849 of file lr-wpan-mac.cc.

References ns3::lrwpan::aBaseSuperframeDuration, BeaconSearchTimeout(), ns3::EventId::Cancel(), ns3::Create(), ns3::lrwpan::IEEE_802_15_4_PHY_RX_ON, ns3::EventId::IsPending(), m_beaconTrackingOn, m_incomingBeaconOrder, m_macPanId, m_numLostBeacons, m_phy, m_trackingEvent, NS_ASSERT, NS_LOG_FUNCTION, ns3::lrwpan::phyCurrentChannel, ns3::Simulator::Schedule(), and ns3::Seconds().

+ Here is the call graph for this function:

◆ PdDataConfirm()

void ns3::lrwpan::LrWpanMac::PdDataConfirm ( PhyEnumeration status)

IEEE 802.15.4-2006 section 6.2.1.2 Confirm the end of transmission of an MPDU to MAC.

Parameters
statusto report to MAC PHY PD-DATA.confirm status

Definition at line 3075 of file lr-wpan-mac.cc.

References ns3::lrwpan::ACCESS_DENIED, AckWaitTimeout(), ns3::Time::As(), ns3::lrwpan::CommandPayloadHeader::ASSOCIATION_REQ, ns3::lrwpan::CommandPayloadHeader::ASSOCIATION_RESP, ns3::EventId::Cancel(), ns3::lrwpan::MlmeAssociateIndicationParams::capabilityInfo, ns3::lrwpan::CommandPayloadHeader::COOR_REALIGN, ns3::Packet::Copy(), ns3::lrwpan::CommandPayloadHeader::DATA_REQ, ns3::lrwpan::FRAME_TOO_LONG, ns3::lrwpan::FULL_CAPACITY, ns3::lrwpan::CommandPayloadHeader::GetAssociationStatus(), ns3::lrwpan::CommandPayloadHeader::GetCapabilityField(), ns3::lrwpan::CommandPayloadHeader::GetCommandFrameType(), ns3::lrwpan::LrWpanMacHeader::GetDstAddrMode(), ns3::lrwpan::LrWpanMacHeader::GetExtDstAddr(), ns3::lrwpan::LrWpanMacHeader::GetExtSrcAddr(), GetIfsSize(), GetMacAckWaitDuration(), ns3::lrwpan::CommandPayloadHeader::GetShortAddr(), GetShortAddress(), ns3::lrwpan::LrWpanMacHeader::GetShortDstAddr(), ns3::lrwpan::LrWpanMacHeader::GetShortSrcAddr(), ns3::Packet::GetSize(), ns3::lrwpan::LrWpanMacHeader::GetSrcAddrMode(), ns3::lrwpan::LrWpanMacHeader::GetSrcPanId(), ns3::lrwpan::IEEE_802_15_4_PHY_SUCCESS, ns3::lrwpan::IEEE_802_15_4_PHY_UNSPECIFIED, IfsWaitTimeout(), ns3::lrwpan::LrWpanMacHeader::IsAcknowledgment(), ns3::lrwpan::LrWpanMacHeader::IsAckReq(), ns3::lrwpan::LrWpanMacHeader::IsBeacon(), ns3::lrwpan::LrWpanMacHeader::IsCommand(), ns3::EventId::IsExpired(), ns3::Callback< R, UArgs >::IsNull(), ns3::Time::IsZero(), ns3::lrwpan::MlmeAssociateIndicationParams::lqi, m_ackWaitTimeout, ns3::lrwpan::MlmeAssociateConfirmParams::m_assocShortAddr, m_capEvent, m_csmaCa, ns3::lrwpan::MlmeCommStatusIndicationParams::m_dstAddrMode, ns3::lrwpan::MlmeCommStatusIndicationParams::m_dstExtAddr, ns3::lrwpan::MlmeCommStatusIndicationParams::m_dstShortAddr, ns3::lrwpan::MlmeAssociateIndicationParams::m_extDevAddr, m_ifsEvent, m_incCapEvent, m_incCfpEvent, m_incomingBeaconOrder, m_incomingSuperframeOrder, m_lastRxFrameLqi, m_macBeaconTxTime, m_macCoordExtendedAddress, m_macCoordShortAddress, m_macPanId, m_macState, m_macTxDropTrace, m_macTxOkTrace, ns3::lrwpan::LrWpanMacBase::m_mcpsDataConfirmCallback, ns3::lrwpan::LrWpanMacBase::m_mlmeAssociateConfirmCallback, ns3::lrwpan::LrWpanMacBase::m_mlmeAssociateIndicationCallback, ns3::lrwpan::LrWpanMacBase::m_mlmeCommStatusIndicationCallback, ns3::lrwpan::LrWpanMacBase::m_mlmeStartConfirmCallback, ns3::lrwpan::McpsDataConfirmParams::m_msduHandle, ns3::lrwpan::MlmeCommStatusIndicationParams::m_panId, m_phy, m_rxPkt, m_setMacState, ns3::lrwpan::MlmeCommStatusIndicationParams::m_srcAddrMode, ns3::lrwpan::MlmeCommStatusIndicationParams::m_srcExtAddr, ns3::lrwpan::MlmeCommStatusIndicationParams::m_srcShortAddr, ns3::lrwpan::McpsDataConfirmParams::m_status, ns3::lrwpan::MlmeAssociateConfirmParams::m_status, ns3::lrwpan::MlmeCommStatusIndicationParams::m_status, ns3::lrwpan::MlmeStartConfirmParams::m_status, m_txPkt, m_txQueue, ns3::lrwpan::MAC_ACK_PENDING, ns3::lrwpan::MAC_IDLE, ns3::lrwpan::MAC_SENDING, ns3::Simulator::Now(), NS_ASSERT, NS_ASSERT_MSG, NS_FATAL_ERROR, NS_LOG_DEBUG, NS_LOG_ERROR, NS_LOG_FUNCTION, ns3::lrwpan::OUTGOING, ns3::Packet::PeekHeader(), RemoveFirstTxQElement(), ns3::Time::S, ns3::Simulator::Schedule(), ns3::Simulator::ScheduleNow(), ns3::Seconds(), SendAssocResponseCommand(), SetLrWpanMacState(), SetShortAddress(), StartCAP(), and ns3::lrwpan::SUCCESS.

Referenced by ns3::lrwpan::LrWpanNetDevice::CompleteConfig().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PdDataIndication()

void ns3::lrwpan::LrWpanMac::PdDataIndication ( uint32_t psduLength,
Ptr< Packet > p,
uint8_t lqi )

IEEE 802.15.4-2006 section 6.2.1.3 PD-DATA.indication Indicates the transfer of an MPDU from PHY to MAC (receiving)

Parameters
psduLengthnumber of bytes in the PSDU
pthe packet to be transmitted
lqiLink quality (LQI) value measured during reception of the PPDU

Definition at line 2041 of file lr-wpan-mac.cc.

References ns3::lrwpan::CommandPayloadHeader::ASSOCIATION_REQ, ns3::lrwpan::CommandPayloadHeader::ASSOCIATION_RESP, ns3::lrwpan::aTurnaroundTime, ns3::lrwpan::aUnitBackoffPeriod, ns3::lrwpan::CommandPayloadHeader::BEACON_REQ, ns3::EventId::Cancel(), ChangeMacState(), ns3::lrwpan::LrWpanMacTrailer::CheckFcs(), ns3::Node::ChecksumEnabled(), ns3::lrwpan::CommandPayloadHeader::COOR_REALIGN, ns3::Packet::Copy(), ns3::lrwpan::CommandPayloadHeader::DATA_REQ, ns3::lrwpan::LrWpanMacTrailer::EnableFcs(), ns3::lrwpan::EXT_ADDR, ns3::lrwpan::LrWpanMacHeader::EXTADDR, ns3::lrwpan::CommandPayloadHeader::GetCommandFrameType(), ns3::lrwpan::CommandPayloadHeader::GetCoordShortAddr(), ns3::Simulator::GetDelayLeft(), ns3::lrwpan::LrWpanMacHeader::GetDstAddrMode(), ns3::lrwpan::LrWpanMacHeader::GetDstPanId(), ns3::lrwpan::LrWpanMacHeader::GetExtDstAddr(), ns3::lrwpan::LrWpanMacHeader::GetExtSrcAddr(), ns3::lrwpan::LrWpanMacHeader::GetFrameVer(), GetIfsSize(), ns3::lrwpan::CommandPayloadHeader::GetPanId(), ns3::lrwpan::LrWpanMacHeader::GetSeqNum(), ns3::lrwpan::CommandPayloadHeader::GetShortAddr(), ns3::lrwpan::LrWpanMacHeader::GetShortDstAddr(), ns3::lrwpan::LrWpanMacHeader::GetShortSrcAddr(), ns3::lrwpan::LrWpanMacHeader::GetSrcAddrMode(), ns3::lrwpan::LrWpanMacHeader::GetSrcPanId(), ns3::lrwpan::LrWpanMacHeader::GetType(), IfsWaitTimeout(), ns3::lrwpan::LrWpanMacHeader::IsAcknowledgment(), ns3::lrwpan::LrWpanMacHeader::IsAckReq(), ns3::lrwpan::LrWpanMacHeader::IsBeacon(), ns3::Mac16Address::IsBroadcast(), ns3::lrwpan::LrWpanMacHeader::IsCommand(), ns3::lrwpan::LrWpanMacHeader::IsData(), ns3::Mac16Address::IsMulticast(), ns3::Callback< R, UArgs >::IsNull(), ns3::EventId::IsPending(), LostAssocRespCommand(), ns3::lrwpan::LrWpanMacHeader::LRWPAN_MAC_RESERVED, m_ackWaitTimeout, m_assocResCmdWaitTimeout, m_assocRespCmdWaitTime, m_beaconTrackingOn, m_capEvent, m_channelScanIndex, ns3::lrwpan::MlmeScanConfirmParams::m_chPage, ns3::lrwpan::MlmeScanRequestParams::m_chPage, m_coor, m_csmaCa, ns3::lrwpan::MlmeCommStatusIndicationParams::m_dstAddrMode, ns3::lrwpan::MlmeCommStatusIndicationParams::m_dstExtAddr, m_ifsEvent, m_lastRxFrameLqi, m_macAssociationPermit, m_macCoordExtendedAddress, m_macCoordShortAddress, m_macExtendedAddress, m_macPanId, m_macPanIdScan, m_macPromiscRxTrace, m_macPromiscuousMode, m_macResponseWaitTime, m_macRxDropTrace, m_macRxTrace, m_macState, m_macTxOkTrace, ns3::lrwpan::LrWpanMacBase::m_mcpsDataConfirmCallback, ns3::lrwpan::LrWpanMacBase::m_mcpsDataIndicationCallback, ns3::lrwpan::LrWpanMacBase::m_mlmeCommStatusIndicationCallback, ns3::lrwpan::LrWpanMacBase::m_mlmeOrphanIndicationCallback, ns3::lrwpan::LrWpanMacBase::m_mlmePollConfirmCallback, ns3::lrwpan::LrWpanMacBase::m_mlmeScanConfirmCallback, ns3::lrwpan::McpsDataConfirmParams::m_msduHandle, ns3::lrwpan::MlmeOrphanIndicationParams::m_orphanAddr, ns3::lrwpan::MlmeCommStatusIndicationParams::m_panId, m_pendPrimitive, m_phy, m_promiscSnifferTrace, m_respWaitTimeout, m_rxPkt, m_scanEnergyEvent, m_scanEvent, m_scanOrphanEvent, m_scanParams, ns3::lrwpan::MlmeScanConfirmParams::m_scanType, ns3::lrwpan::MlmeScanRequestParams::m_scanType, m_setMacState, m_shortAddress, ns3::lrwpan::MlmeCommStatusIndicationParams::m_srcAddrMode, ns3::lrwpan::MlmeCommStatusIndicationParams::m_srcExtAddr, ns3::lrwpan::McpsDataConfirmParams::m_status, ns3::lrwpan::MlmeCommStatusIndicationParams::m_status, ns3::lrwpan::MlmePollConfirmParams::m_status, ns3::lrwpan::MlmeScanConfirmParams::m_status, m_txPkt, m_txQueue, m_uniformVar, ns3::lrwpan::MAC_ACK_PENDING, ns3::lrwpan::MAC_CSMA, ns3::lrwpan::MAC_IDLE, ns3::lrwpan::MLME_NONE, NS_ASSERT, NS_LOG_DEBUG, NS_LOG_ERROR, NS_LOG_FUNCTION, ns3::lrwpan::CommandPayloadHeader::ORPHAN_NOTIF, ns3::Packet::PeekHeader(), PrepareRetransmission(), ReceiveBeacon(), RemoveFirstTxQElement(), RemovePendTxQElement(), ns3::Simulator::Schedule(), ns3::Simulator::ScheduleNow(), ns3::Seconds(), SendAck(), SendDataRequestCommand(), SendOneBeacon(), SetLrWpanMacState(), ns3::lrwpan::SHORT_ADDR, and ns3::lrwpan::SUCCESS.

Referenced by ns3::lrwpan::LrWpanNetDevice::CompleteConfig().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PlmeCcaConfirm()

void ns3::lrwpan::LrWpanMac::PlmeCcaConfirm ( PhyEnumeration status)

IEEE 802.15.4-2006 section 6.2.2.2 PLME-CCA.confirm status.

Parameters
statusTRX_OFF, BUSY or IDLE

Definition at line 3333 of file lr-wpan-mac.cc.

References m_csmaCa, and NS_LOG_FUNCTION.

◆ PlmeEdConfirm()

void ns3::lrwpan::LrWpanMac::PlmeEdConfirm ( PhyEnumeration status,
uint8_t energyLevel )

IEEE 802.15.4-2006 section 6.2.2.4 PLME-ED.confirm status and energy level.

Parameters
statusSUCCESS, TRX_OFF or TX_ON
energyLevel0x00-0xff ED level for the channel

Definition at line 3341 of file lr-wpan-mac.cc.

References ns3::Simulator::GetDelayLeft(), m_maxEnergyLevel, m_phy, m_scanEnergyEvent, NS_LOG_FUNCTION, and ns3::Seconds().

Referenced by ns3::lrwpan::LrWpanNetDevice::CompleteConfig().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PlmeGetAttributeConfirm()

void ns3::lrwpan::LrWpanMac::PlmeGetAttributeConfirm ( PhyEnumeration status,
PhyPibAttributeIdentifier id,
Ptr< PhyPibAttributes > attribute )

IEEE 802.15.4-2006 section 6.2.2.6 PLME-GET.confirm Get attributes per definition from Table 23 in section 6.4.2.

Parameters
statusSUCCESS or UNSUPPORTED_ATTRIBUTE
idthe attributed identifier
attributethe attribute value

Definition at line 3358 of file lr-wpan-mac.cc.

References NS_LOG_FUNCTION.

Referenced by ns3::lrwpan::LrWpanNetDevice::CompleteConfig().

+ Here is the caller graph for this function:

◆ PlmeSetAttributeConfirm()

void ns3::lrwpan::LrWpanMac::PlmeSetAttributeConfirm ( PhyEnumeration status,
PhyPibAttributeIdentifier id )

IEEE 802.15.4-2006 section 6.2.2.10 PLME-SET.confirm Set attributes per definition from Table 23 in section 6.4.2.

Parameters
statusSUCCESS, UNSUPPORTED_ATTRIBUTE, INVALID_PARAMETER, or READ_ONLY
idthe attributed identifier

Definition at line 3417 of file lr-wpan-mac.cc.

References ns3::lrwpan::aBaseSuperframeDuration, ns3::EventId::Cancel(), ns3::Create(), EndAssociateRequest(), EndChannelEnergyScan(), EndChannelScan(), EndStartRequest(), ns3::lrwpan::MlmeSetConfirmParams::id, ns3::lrwpan::IEEE_802_15_4_PHY_RX_ON, ns3::lrwpan::IEEE_802_15_4_PHY_SUCCESS, ns3::lrwpan::INVALID_PARAMETER, ns3::Callback< R, UArgs >::IsNull(), m_associateParams, ns3::lrwpan::MlmeAssociateConfirmParams::m_assocShortAddr, m_channelScanIndex, ns3::lrwpan::MlmeAssociateRequestParams::m_chNum, ns3::lrwpan::MlmeScanConfirmParams::m_chPage, ns3::lrwpan::MlmeScanRequestParams::m_chPage, m_csmaCa, m_incCapEvent, m_incCfpEvent, m_incomingBeaconOrder, m_incomingSuperframeOrder, ns3::lrwpan::MlmeStartRequestParams::m_logCh, m_macCoordExtendedAddress, m_macCoordShortAddress, m_macPanId, m_macResponseWaitTime, m_maxEnergyLevel, ns3::lrwpan::LrWpanMacBase::m_mlmeAssociateConfirmCallback, ns3::lrwpan::LrWpanMacBase::m_mlmeScanConfirmCallback, ns3::lrwpan::LrWpanMacBase::m_mlmeSetConfirmCallback, ns3::lrwpan::LrWpanMacBase::m_mlmeStartConfirmCallback, m_pendPrimitive, m_phy, ns3::lrwpan::MlmeScanRequestParams::m_scanChannels, ns3::lrwpan::MlmeScanRequestParams::m_scanDuration, m_scanEnergyEvent, m_scanEvent, m_scanOrphanEvent, m_scanParams, ns3::lrwpan::MlmeScanConfirmParams::m_scanType, ns3::lrwpan::MlmeScanRequestParams::m_scanType, m_startParams, ns3::lrwpan::MlmeAssociateConfirmParams::m_status, ns3::lrwpan::MlmeScanConfirmParams::m_status, ns3::lrwpan::MlmeSetConfirmParams::m_status, ns3::lrwpan::MlmeStartConfirmParams::m_status, ns3::lrwpan::MLME_ASSOC_REQ, ns3::lrwpan::MLME_SCAN_REQ, ns3::lrwpan::MLME_START_REQ, ns3::lrwpan::MLMESCAN_ACTIVE, ns3::lrwpan::MLMESCAN_ED, ns3::lrwpan::MLMESCAN_ORPHAN, ns3::lrwpan::MLMESCAN_PASSIVE, NS_LOG_ERROR, NS_LOG_FUNCTION, ns3::lrwpan::pCurrentChannel, ns3::lrwpan::pCurrentPage, ns3::lrwpan::phyCurrentChannel, ns3::lrwpan::phyCurrentPage, ns3::Simulator::Schedule(), ns3::Seconds(), SendBeaconRequestCommand(), SendOrphanNotificationCommand(), ns3::lrwpan::SUCCESS, and ns3::lrwpan::UNSUPPORTED_ATTRIBUTE.

Referenced by ns3::lrwpan::LrWpanNetDevice::CompleteConfig().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PlmeSetTRXStateConfirm()

void ns3::lrwpan::LrWpanMac::PlmeSetTRXStateConfirm ( PhyEnumeration status)

IEEE 802.15.4-2006 section 6.2.2.8 PLME-SET-TRX-STATE.confirm Set PHY state.

Parameters
statusin RX_ON,TRX_OFF,FORCE_TRX_OFF,TX_ON

Definition at line 3366 of file lr-wpan-mac.cc.

References CheckQueue(), ns3::Packet::GetSize(), ns3::lrwpan::IEEE_802_15_4_PHY_RX_ON, ns3::lrwpan::IEEE_802_15_4_PHY_SUCCESS, ns3::lrwpan::IEEE_802_15_4_PHY_TRX_OFF, ns3::lrwpan::IEEE_802_15_4_PHY_TX_ON, ns3::EventId::IsPending(), m_csmaCa, m_macState, m_macTxTrace, m_phy, m_promiscSnifferTrace, m_scanEnergyEvent, m_snifferTrace, m_txPkt, ns3::lrwpan::MAC_ACK_PENDING, ns3::lrwpan::MAC_CSMA, ns3::lrwpan::MAC_IDLE, ns3::lrwpan::MAC_SENDING, NS_ASSERT, NS_FATAL_ERROR, and NS_LOG_FUNCTION.

Referenced by ns3::lrwpan::LrWpanNetDevice::CompleteConfig().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PrepareRetransmission()

bool ns3::lrwpan::LrWpanMac::PrepareRetransmission ( )
private

Check for remaining retransmissions for the packet currently being sent.

Drop the packet, if there are no retransmissions left.

Returns
true, if the packet should be retransmitted, false otherwise.

Definition at line 2717 of file lr-wpan-mac.cc.

References ns3::lrwpan::CommandPayloadHeader::ASSOCIATION_REQ, ns3::lrwpan::CommandPayloadHeader::ASSOCIATION_RESP, ns3::EventId::Cancel(), ns3::Packet::Copy(), ns3::lrwpan::CommandPayloadHeader::DATA_REQ, ns3::lrwpan::LrWpanMacHeader::EXTADDR, ns3::lrwpan::CommandPayloadHeader::GetCommandFrameType(), ns3::lrwpan::LrWpanMacHeader::GetExtDstAddr(), ns3::lrwpan::LrWpanMacHeader::GetExtSrcAddr(), ns3::lrwpan::LrWpanMacHeader::IsCommand(), ns3::Callback< R, UArgs >::IsNull(), ns3::lrwpan::MlmeAssociateConfirmParams::m_assocShortAddr, m_csmaCa, ns3::lrwpan::MlmeCommStatusIndicationParams::m_dstAddrMode, ns3::lrwpan::MlmeCommStatusIndicationParams::m_dstExtAddr, m_incCapEvent, m_incCfpEvent, m_incomingBeaconOrder, m_incomingSuperframeOrder, m_macCoordExtendedAddress, m_macCoordShortAddress, m_macMaxFrameRetries, m_macPanId, m_macTxDropTrace, ns3::lrwpan::LrWpanMacBase::m_mcpsDataConfirmCallback, ns3::lrwpan::LrWpanMacBase::m_mlmeAssociateConfirmCallback, ns3::lrwpan::LrWpanMacBase::m_mlmeCommStatusIndicationCallback, ns3::lrwpan::LrWpanMacBase::m_mlmePollConfirmCallback, ns3::lrwpan::McpsDataConfirmParams::m_msduHandle, m_numCsmacaRetry, ns3::lrwpan::MlmeCommStatusIndicationParams::m_panId, m_retransmission, ns3::lrwpan::MlmeCommStatusIndicationParams::m_srcAddrMode, ns3::lrwpan::MlmeCommStatusIndicationParams::m_srcExtAddr, ns3::lrwpan::McpsDataConfirmParams::m_status, ns3::lrwpan::MlmeAssociateConfirmParams::m_status, ns3::lrwpan::MlmeCommStatusIndicationParams::m_status, ns3::lrwpan::MlmePollConfirmParams::m_status, m_txPkt, m_txQueue, ns3::lrwpan::NO_ACK, NS_LOG_FUNCTION, ns3::Packet::PeekHeader(), RemoveFirstTxQElement(), and RemovePendTxQElement().

Referenced by AckWaitTimeout(), and PdDataIndication().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PrintPendingTxQueue()

void ns3::lrwpan::LrWpanMac::PrintPendingTxQueue ( std::ostream & os) const

Print the Pending transaction list.

Parameters
osThe reference to the output stream used by this print function.

Definition at line 2959 of file lr-wpan-mac.cc.

References ns3::Time::As(), GetExtendedAddress(), GetShortAddress(), ns3::lrwpan::LrWpanMacHeader::IsCommand(), ns3::lrwpan::LrWpanMacHeader::IsData(), m_indTxQueue, ns3::Simulator::Now(), and ns3::Time::S.

+ Here is the call graph for this function:

◆ PrintTransmitQueueSize()

void ns3::lrwpan::LrWpanMac::PrintTransmitQueueSize ( )

Print the number of elements in the packet transmit queue.

Definition at line 3896 of file lr-wpan-mac.cc.

References m_txQueue, and NS_LOG_DEBUG.

◆ PrintTxQueue()

void ns3::lrwpan::LrWpanMac::PrintTxQueue ( std::ostream & os) const

Print the Transmit Queue.

Parameters
osThe reference to the output stream used by this print function.

Definition at line 2994 of file lr-wpan-mac.cc.

References ns3::Time::As(), ns3::lrwpan::LrWpanMacHeader::GetDstPanId(), ns3::lrwpan::LrWpanMacHeader::GetExtDstAddr(), GetExtendedAddress(), ns3::lrwpan::LrWpanMacHeader::GetSeqNum(), GetShortAddress(), ns3::lrwpan::LrWpanMacHeader::GetShortDstAddr(), ns3::lrwpan::LrWpanMacHeader::IsCommand(), ns3::lrwpan::LrWpanMacHeader::IsData(), m_txQueue, ns3::Simulator::Now(), and ns3::Time::S.

+ Here is the call graph for this function:

◆ PurgeInd()

◆ ReceiveBeacon()

void ns3::lrwpan::LrWpanMac::ReceiveBeacon ( uint8_t lqi,
Ptr< Packet > p )
private

Used to process the reception of a beacon packet.

Parameters
lqiThe value of the link quality indicator (LQI) of the received packet
pThe packet containing the MAC header and the beacon payload information

Definition at line 1749 of file lr-wpan-mac.cc.

References ns3::lrwpan::aBaseSuperframeDuration, ns3::Time::As(), BeaconSearchTimeout(), ns3::EventId::Cancel(), ns3::lrwpan::EXT_ADDR, ns3::lrwpan::SuperframeField::GetBeaconOrder(), ns3::lrwpan::LrWpanMacHeader::GetDstPanId(), ns3::lrwpan::LrWpanMacHeader::GetExtSrcAddr(), ns3::lrwpan::SuperframeField::GetFinalCapSlot(), ns3::lrwpan::SuperframeField::GetFrameOrder(), ns3::lrwpan::BeaconPayloadHeader::GetGtsFields(), ns3::lrwpan::GtsFields::GetGtsPermit(), ns3::lrwpan::BeaconPayloadHeader::GetPndAddrFields(), ns3::lrwpan::LrWpanMacHeader::GetSeqNum(), ns3::lrwpan::LrWpanMacHeader::GetShortSrcAddr(), ns3::lrwpan::LrWpanMacHeader::GetSrcAddrMode(), ns3::lrwpan::LrWpanMacHeader::GetSrcPanId(), ns3::lrwpan::BeaconPayloadHeader::GetSuperframeSpecField(), ns3::lrwpan::INCOMING, ns3::lrwpan::SuperframeField::IsBattLifeExt(), ns3::Callback< R, UArgs >::IsNull(), ns3::EventId::IsPending(), m_beaconTrackingOn, ns3::lrwpan::MlmeBeaconNotifyIndicationParams::m_bsn, ns3::lrwpan::PanDescriptor::m_coorAddrMode, ns3::lrwpan::PanDescriptor::m_coorExtAddr, ns3::lrwpan::PanDescriptor::m_coorPanId, ns3::lrwpan::PanDescriptor::m_coorShortAddr, m_csmaCa, ns3::lrwpan::PanDescriptor::m_gtsPermit, m_incCapEvent, m_incomingBeaconInterval, m_incomingBeaconOrder, m_incomingFnlCapSlot, m_incomingSuperframeDuration, m_incomingSuperframeOrder, ns3::lrwpan::PanDescriptor::m_linkQuality, ns3::lrwpan::PanDescriptor::m_logCh, ns3::lrwpan::PanDescriptor::m_logChPage, m_macAutoRequest, m_macBeaconRxTime, m_macPanId, ns3::lrwpan::LrWpanMacBase::m_mlmeBeaconNotifyIndicationCallback, m_numLostBeacons, ns3::lrwpan::MlmeBeaconNotifyIndicationParams::m_panDescriptor, m_panDescriptorList, m_phy, m_rxBeaconSymbols, m_scanEvent, ns3::lrwpan::MlmeBeaconNotifyIndicationParams::m_sdu, ns3::lrwpan::MlmeBeaconNotifyIndicationParams::m_sduLength, m_setMacState, ns3::lrwpan::PanDescriptor::m_superframeSpec, ns3::lrwpan::PanDescriptor::m_timeStamp, m_trackingEvent, ns3::lrwpan::MAC_IDLE, ns3::Simulator::Now(), NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::Time::S, ns3::Simulator::Schedule(), ns3::Simulator::ScheduleNow(), ns3::Seconds(), SetLrWpanMacState(), ns3::lrwpan::SHORT_ADDR, and StartCAP().

Referenced by PdDataIndication().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RemoveFirstTxQElement()

void ns3::lrwpan::LrWpanMac::RemoveFirstTxQElement ( )
private

Remove the tip of the transmission queue, including clean up related to the last packet transmission.

Definition at line 2649 of file lr-wpan-mac.cc.

References ns3::lrwpan::LrWpanMacHeader::GetShortDstAddr(), ns3::Mac16Address::IsBroadcast(), ns3::Mac16Address::IsMulticast(), m_csmaCa, m_macTxDequeueTrace, m_numCsmacaRetry, m_retransmission, m_sentPktTrace, m_txPkt, and m_txQueue.

Referenced by PdDataConfirm(), PdDataIndication(), PrepareRetransmission(), and SetLrWpanMacState().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RemovePendTxQElement()

void ns3::lrwpan::LrWpanMac::RemovePendTxQElement ( Ptr< Packet > p)
private

Remove an element from the pending transaction list.

Parameters
pThe packet to be removed from the pending transaction list.

Definition at line 3042 of file lr-wpan-mac.cc.

References ns3::lrwpan::EXT_ADDR, ns3::lrwpan::LrWpanMacHeader::GetDstAddrMode(), ns3::lrwpan::LrWpanMacHeader::GetExtDstAddr(), ns3::lrwpan::LrWpanMacHeader::GetSeqNum(), ns3::lrwpan::LrWpanMacHeader::GetShortDstAddr(), m_indTxQueue, m_macIndTxDequeueTrace, and ns3::lrwpan::SHORT_ADDR.

Referenced by PdDataIndication(), PrepareRetransmission(), and SetLrWpanMacState().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendAck()

void ns3::lrwpan::LrWpanMac::SendAck ( uint8_t seqno)
private

Send an acknowledgment packet for the given sequence number.

Parameters
seqnothe sequence number for the ACK

Definition at line 2598 of file lr-wpan-mac.cc.

References ChangeMacState(), ns3::Node::ChecksumEnabled(), ns3::Create(), ns3::lrwpan::LrWpanMacTrailer::EnableFcs(), ns3::lrwpan::IEEE_802_15_4_PHY_TX_ON, ns3::lrwpan::LrWpanMacHeader::LRWPAN_MAC_ACKNOWLEDGMENT, m_macState, m_phy, m_txPkt, ns3::lrwpan::MAC_IDLE, ns3::lrwpan::MAC_SENDING, NS_ASSERT, NS_LOG_FUNCTION, and ns3::lrwpan::LrWpanMacTrailer::SetFcs().

Referenced by PdDataIndication().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendAssocRequestCommand()

void ns3::lrwpan::LrWpanMac::SendAssocRequestCommand ( )
private

Called to send an associate request command.

Definition at line 1188 of file lr-wpan-mac.cc.

References ns3::lrwpan::CommandPayloadHeader::ASSOCIATION_REQ, CheckQueue(), ns3::Node::ChecksumEnabled(), ns3::Create(), ns3::lrwpan::LrWpanMacTrailer::EnableFcs(), EnqueueTxQElement(), ns3::lrwpan::LrWpanMacHeader::EXTADDR, GetExtendedAddress(), ns3::SequenceNumber< NUMERIC_TYPE, SIGNED_TYPE >::GetValue(), ns3::lrwpan::LrWpanMacHeader::LRWPAN_MAC_COMMAND, m_associateParams, ns3::lrwpan::MlmeAssociateRequestParams::m_capabilityInfo, ns3::lrwpan::MlmeAssociateRequestParams::m_coordAddrMode, ns3::lrwpan::MlmeAssociateRequestParams::m_coordExtAddr, ns3::lrwpan::MlmeAssociateRequestParams::m_coordPanId, ns3::lrwpan::MlmeAssociateRequestParams::m_coordShortAddr, m_macDsn, NS_LOG_FUNCTION, ns3::lrwpan::LrWpanMacHeader::SetAckReq(), ns3::lrwpan::CommandPayloadHeader::SetCapabilityField(), ns3::lrwpan::LrWpanMacHeader::SetDstAddrFields(), ns3::lrwpan::LrWpanMacHeader::SetDstAddrMode(), ns3::lrwpan::LrWpanMacTrailer::SetFcs(), ns3::lrwpan::LrWpanMacHeader::SetSecDisable(), ns3::lrwpan::LrWpanMacHeader::SetSrcAddrFields(), ns3::lrwpan::LrWpanMacHeader::SetSrcAddrMode(), ns3::lrwpan::SHORT_ADDR, and ns3::lrwpan::LrWpanMacHeader::SHORTADDR.

Referenced by EndAssociateRequest().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendAssocResponseCommand()

void ns3::lrwpan::LrWpanMac::SendAssocResponseCommand ( Ptr< Packet > rxDataReqPkt)
private

Called to send an associate response command.

Parameters
rxDataReqPktThe received data request pkt that instigated the Association response command.

Definition at line 1296 of file lr-wpan-mac.cc.

References ns3::Create(), ns3::lrwpan::CommandPayloadHeader::DATA_REQ, DequeueInd(), ns3::lrwpan::CommandPayloadHeader::GetCommandFrameType(), ns3::lrwpan::LrWpanMacHeader::GetExtSrcAddr(), m_txQueue, NS_ASSERT, and NS_LOG_DEBUG.

Referenced by PdDataConfirm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendBeaconRequestCommand()

◆ SendDataRequestCommand()

void ns3::lrwpan::LrWpanMac::SendDataRequestCommand ( )
private

◆ SendOneBeacon()

void ns3::lrwpan::LrWpanMac::SendOneBeacon ( )
private

Called to send a single beacon frame.

Definition at line 1024 of file lr-wpan-mac.cc.

References ns3::lrwpan::BEACON, ChangeMacState(), CheckQueue(), ns3::Node::ChecksumEnabled(), ns3::Create(), ns3::lrwpan::LrWpanMacTrailer::EnableFcs(), EnqueueTxQElement(), ns3::lrwpan::LrWpanMacHeader::EXTADDR, GetExtendedAddress(), GetGtsFields(), GetPanId(), GetPendingAddrFields(), GetShortAddress(), GetSuperframeField(), ns3::SequenceNumber< NUMERIC_TYPE, SIGNED_TYPE >::GetValue(), ns3::lrwpan::IEEE_802_15_4_PHY_TX_ON, ns3::lrwpan::LrWpanMacHeader::LRWPAN_MAC_BEACON, m_csmaCa, m_macBeaconPayload, m_macBsn, m_macState, m_outSuperframeStatus, m_phy, m_superframeDuration, m_txPkt, ns3::lrwpan::MAC_IDLE, ns3::lrwpan::MAC_SENDING, NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::lrwpan::LrWpanMacHeader::SetDstAddrFields(), ns3::lrwpan::LrWpanMacHeader::SetDstAddrMode(), ns3::lrwpan::LrWpanMacTrailer::SetFcs(), ns3::lrwpan::BeaconPayloadHeader::SetGtsFields(), ns3::lrwpan::LrWpanMacHeader::SetNoAckReq(), ns3::lrwpan::BeaconPayloadHeader::SetPndAddrFields(), ns3::lrwpan::LrWpanMacHeader::SetSecDisable(), ns3::lrwpan::LrWpanMacHeader::SetSrcAddrFields(), ns3::lrwpan::LrWpanMacHeader::SetSrcAddrMode(), ns3::lrwpan::BeaconPayloadHeader::SetSuperframeSpecField(), and ns3::lrwpan::LrWpanMacHeader::SHORTADDR.

Referenced by EndStartRequest(), PdDataIndication(), and StartInactivePeriod().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendOrphanNotificationCommand()

void ns3::lrwpan::LrWpanMac::SendOrphanNotificationCommand ( )
private

Called to send a orphan notification command.

This is used by an associated device that has lost synchronization with its coordinator. As described in IEEE 802.15.4-2011 (Section 5.3.6)

Definition at line 1147 of file lr-wpan-mac.cc.

References CheckQueue(), ns3::Node::ChecksumEnabled(), ns3::Create(), ns3::lrwpan::LrWpanMacTrailer::EnableFcs(), EnqueueTxQElement(), ns3::lrwpan::LrWpanMacHeader::EXTADDR, GetExtendedAddress(), ns3::SequenceNumber< NUMERIC_TYPE, SIGNED_TYPE >::GetValue(), ns3::lrwpan::LrWpanMacHeader::LRWPAN_MAC_COMMAND, m_macDsn, ns3::lrwpan::CommandPayloadHeader::ORPHAN_NOTIF, ns3::lrwpan::CommandPayloadHeader::SetCommandFrameType(), ns3::lrwpan::LrWpanMacHeader::SetDstAddrFields(), ns3::lrwpan::LrWpanMacHeader::SetDstAddrMode(), ns3::lrwpan::LrWpanMacTrailer::SetFcs(), ns3::lrwpan::LrWpanMacHeader::SetNoAckReq(), ns3::lrwpan::LrWpanMacHeader::SetPanIdComp(), ns3::lrwpan::LrWpanMacHeader::SetSecDisable(), ns3::lrwpan::LrWpanMacHeader::SetSrcAddrFields(), ns3::lrwpan::LrWpanMacHeader::SetSrcAddrMode(), and ns3::lrwpan::LrWpanMacHeader::SHORTADDR.

Referenced by PlmeSetAttributeConfirm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetAssociatedCoor() [1/2]

void ns3::lrwpan::LrWpanMac::SetAssociatedCoor ( Mac16Address mac)

Check if the packet destination is its coordinator.

Parameters
macThe coordinator short MAC Address

Definition at line 3947 of file lr-wpan-mac.cc.

References m_macCoordShortAddress.

◆ SetAssociatedCoor() [2/2]

void ns3::lrwpan::LrWpanMac::SetAssociatedCoor ( Mac64Address mac)

Check if the packet destination is its coordinator.

Parameters
macThe coordinator extended MAC Address

Definition at line 3953 of file lr-wpan-mac.cc.

References m_macCoordExtendedAddress.

◆ SetCsmaCa()

void ns3::lrwpan::LrWpanMac::SetCsmaCa ( Ptr< LrWpanCsmaCa > csmaCa)

Set the CSMA/CA implementation to be used by the MAC.

Parameters
csmaCathe CSMA/CA implementation

Definition at line 2023 of file lr-wpan-mac.cc.

References m_csmaCa.

◆ SetExtendedAddress()

void ns3::lrwpan::LrWpanMac::SetExtendedAddress ( Mac64Address address)

Set the extended address of this MAC.

Parameters
addressthe new address

Definition at line 352 of file lr-wpan-mac.cc.

References m_macExtendedAddress.

◆ SetIndTxQMaxSize()

void ns3::lrwpan::LrWpanMac::SetIndTxQMaxSize ( uint32_t queueSize)

Set the max size of the indirect transmit queue (Pending Transaction list)

Parameters
queueSizeThe indirect transmit queue size.

Definition at line 3845 of file lr-wpan-mac.cc.

References m_maxIndTxQueueSize, and queueSize.

◆ SetLrWpanMacState()

void ns3::lrwpan::LrWpanMac::SetLrWpanMacState ( MacState macState)

CSMA-CA algorithm calls back the MAC after executing channel assessment.

Parameters
macStateindicate BUSY or IDLE channel condition

Definition at line 3650 of file lr-wpan-mac.cc.

References ns3::lrwpan::CommandPayloadHeader::ASSOCIATION_REQ, ns3::lrwpan::CommandPayloadHeader::ASSOCIATION_RESP, ns3::lrwpan::CommandPayloadHeader::BEACON_REQ, ns3::EventId::Cancel(), ChangeMacState(), ns3::lrwpan::CHANNEL_ACCESS_FAILURE, ns3::lrwpan::CHANNEL_IDLE, ns3::lrwpan::CommandPayloadHeader::COOR_REALIGN, ns3::Packet::Copy(), ns3::lrwpan::CommandPayloadHeader::DATA_REQ, ns3::lrwpan::LrWpanMacHeader::EXTADDR, ns3::lrwpan::CommandPayloadHeader::GetCommandFrameType(), ns3::lrwpan::LrWpanMacHeader::GetExtDstAddr(), ns3::lrwpan::LrWpanMacHeader::GetExtSrcAddr(), ns3::lrwpan::IEEE_802_15_4_PHY_RX_ON, ns3::lrwpan::IEEE_802_15_4_PHY_TRX_OFF, ns3::lrwpan::IEEE_802_15_4_PHY_TX_ON, ns3::lrwpan::LrWpanMacHeader::IsCommand(), ns3::lrwpan::LrWpanMacHeader::IsData(), ns3::Callback< R, UArgs >::IsNull(), ns3::EventId::IsPending(), ns3::lrwpan::MlmeAssociateConfirmParams::m_assocShortAddr, m_csmaCa, ns3::lrwpan::MlmeCommStatusIndicationParams::m_dstAddrMode, ns3::lrwpan::MlmeCommStatusIndicationParams::m_dstExtAddr, m_incCapEvent, m_incCfpEvent, m_incomingBeaconOrder, m_incomingSuperframeOrder, m_macCoordExtendedAddress, m_macCoordShortAddress, m_macPanId, m_macRxOnWhenIdle, m_macState, m_macTxDropTrace, ns3::lrwpan::LrWpanMacBase::m_mcpsDataConfirmCallback, ns3::lrwpan::LrWpanMacBase::m_mlmeAssociateConfirmCallback, ns3::lrwpan::LrWpanMacBase::m_mlmeCommStatusIndicationCallback, ns3::lrwpan::LrWpanMacBase::m_mlmePollConfirmCallback, ns3::lrwpan::McpsDataConfirmParams::m_msduHandle, m_numCsmacaRetry, ns3::lrwpan::MlmeCommStatusIndicationParams::m_panId, m_phy, m_retransmission, m_scanEvent, m_scanOrphanEvent, ns3::lrwpan::MlmeCommStatusIndicationParams::m_srcAddrMode, ns3::lrwpan::MlmeCommStatusIndicationParams::m_srcExtAddr, ns3::lrwpan::McpsDataConfirmParams::m_status, ns3::lrwpan::MlmeAssociateConfirmParams::m_status, ns3::lrwpan::MlmeCommStatusIndicationParams::m_status, ns3::lrwpan::MlmePollConfirmParams::m_status, m_txPkt, m_txQueue, m_unscannedChannels, ns3::lrwpan::MAC_ACK_PENDING, ns3::lrwpan::MAC_CSMA, ns3::lrwpan::MAC_CSMA_DEFERRED, ns3::lrwpan::MAC_IDLE, ns3::lrwpan::MAC_SENDING, NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::lrwpan::CommandPayloadHeader::ORPHAN_NOTIF, RemoveFirstTxQElement(), and RemovePendTxQElement().

Referenced by AckWaitTimeout(), CheckQueue(), ns3::lrwpan::LrWpanNetDevice::CompleteConfig(), PdDataConfirm(), PdDataIndication(), and ReceiveBeacon().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetMacMaxFrameRetries()

void ns3::lrwpan::LrWpanMac::SetMacMaxFrameRetries ( uint8_t retries)

Set the macMaxFrameRetries attribute value.

Parameters
retriesthe maximum number of retries

Definition at line 3902 of file lr-wpan-mac.cc.

References m_macMaxFrameRetries.

◆ SetPanId()

void ns3::lrwpan::LrWpanMac::SetPanId ( uint16_t panId)

Set the PAN id used by this MAC.

Parameters
panIdthe new PAN id.

Definition at line 3869 of file lr-wpan-mac.cc.

References m_macPanId.

◆ SetPhy()

void ns3::lrwpan::LrWpanMac::SetPhy ( Ptr< LrWpanPhy > phy)

Set the underlying PHY for the MAC.

Parameters
phythe PHY

Definition at line 2029 of file lr-wpan-mac.cc.

References m_phy.

◆ SetRxOnWhenIdle()

void ns3::lrwpan::LrWpanMac::SetRxOnWhenIdle ( bool rxOnWhenIdle)

Set if the receiver should be enabled when the MAC is idle.

Parameters
rxOnWhenIdleset to true to enable the receiver during idle periods

Definition at line 327 of file lr-wpan-mac.cc.

References ns3::lrwpan::IEEE_802_15_4_PHY_RX_ON, ns3::lrwpan::IEEE_802_15_4_PHY_TRX_OFF, m_macRxOnWhenIdle, m_macState, m_phy, ns3::lrwpan::MAC_IDLE, and NS_LOG_FUNCTION.

◆ SetShortAddress()

void ns3::lrwpan::LrWpanMac::SetShortAddress ( Mac16Address address)

Set the short address of this MAC.

Parameters
addressthe new address

Definition at line 346 of file lr-wpan-mac.cc.

References m_shortAddress.

Referenced by PdDataConfirm().

+ Here is the caller graph for this function:

◆ SetTxQMaxSize()

void ns3::lrwpan::LrWpanMac::SetTxQMaxSize ( uint32_t queueSize)

Set the max size of the transmit queue.

Parameters
queueSizeThe transmit queue size.

Definition at line 3839 of file lr-wpan-mac.cc.

References m_maxTxQueueSize, and queueSize.

◆ StartCAP()

void ns3::lrwpan::LrWpanMac::StartCAP ( SuperframeType superframeType)
private

Called to begin the Contention Access Period (CAP) in a beacon-enabled mode.

Parameters
superframeTypeThe incoming or outgoing superframe reference

Definition at line 1569 of file lr-wpan-mac.cc.

References ns3::lrwpan::CAP, CheckQueue(), ns3::lrwpan::INCOMING, m_capEvent, m_fnlCapSlot, m_incomingFnlCapSlot, m_incomingSuperframeDuration, m_incSuperframeStatus, m_macBeaconRxTime, m_macBeaconTxTime, m_outSuperframeStatus, m_phy, m_superframeDuration, ns3::Simulator::Now(), NS_LOG_DEBUG, ns3::lrwpan::OUTGOING, ns3::Time::S, ns3::Simulator::Schedule(), ns3::Seconds(), and StartCFP().

Referenced by PdDataConfirm(), and ReceiveBeacon().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ StartCFP()

void ns3::lrwpan::LrWpanMac::StartCFP ( SuperframeType superframeType)
private

Called to begin the Contention Free Period (CFP) in a beacon-enabled mode.

Parameters
superframeTypeThe incoming or outgoing superframe reference

Definition at line 1617 of file lr-wpan-mac.cc.

References ns3::lrwpan::CFP, ns3::lrwpan::INCOMING, m_cfpEvent, m_fnlCapSlot, m_incCfpEvent, m_incomingFnlCapSlot, m_incomingSuperframeDuration, m_incSuperframeStatus, m_outSuperframeStatus, m_phy, m_superframeDuration, NS_LOG_DEBUG, ns3::lrwpan::OUTGOING, ns3::Time::S, ns3::Simulator::Schedule(), ns3::Seconds(), and StartInactivePeriod().

Referenced by StartCAP().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ StartInactivePeriod()

void ns3::lrwpan::LrWpanMac::StartInactivePeriod ( SuperframeType superframeType)
private

Start the Inactive Period in a beacon-enabled mode.

Parameters
superframeTypeThe incoming or outgoing superframe reference

Definition at line 1667 of file lr-wpan-mac.cc.

References ns3::Time::As(), AwaitBeacon(), ns3::lrwpan::INACTIVE, ns3::lrwpan::INCOMING, m_beaconEvent, m_beaconInterval, m_incomingBeaconInterval, m_incomingSuperframeDuration, m_incSuperframeStatus, m_outSuperframeStatus, m_phy, m_superframeDuration, NS_LOG_DEBUG, ns3::Time::S, ns3::Simulator::Schedule(), ns3::Seconds(), and SendOneBeacon().

Referenced by StartCFP().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_ackWaitTimeout

EventId ns3::lrwpan::LrWpanMac::m_ackWaitTimeout
private

Scheduler event for the ACK timeout of the currently transmitted data packet.

Definition at line 1268 of file lr-wpan-mac.h.

Referenced by PdDataConfirm(), and PdDataIndication().

◆ m_associateParams

MlmeAssociateRequestParams ns3::lrwpan::LrWpanMac::m_associateParams
private

The parameters used during a MLME-ASSOCIATE.request.

These parameters are stored here while PLME-SET operations (set channel page, set channel number) take place.

Definition at line 1235 of file lr-wpan-mac.h.

Referenced by EndAssociateRequest(), MlmeAssociateRequest(), PlmeSetAttributeConfirm(), and SendAssocRequestCommand().

◆ m_assocResCmdWaitTimeout

EventId ns3::lrwpan::LrWpanMac::m_assocResCmdWaitTimeout
private

Scheduler event for the lost of a association response command frame.

Definition at line 1278 of file lr-wpan-mac.h.

Referenced by PdDataIndication().

◆ m_assocRespCmdWaitTime

uint64_t ns3::lrwpan::LrWpanMac::m_assocRespCmdWaitTime

The maximum wait time for an association response command after the reception of data request command ACK during the association process.

Not explicitly listed by the standard but its use is required for a device to react to the lost of the association response (failure of the association: NO_DATA)

Definition at line 397 of file lr-wpan-mac.h.

Referenced by LrWpanMac(), and PdDataIndication().

◆ m_beaconEvent

EventId ns3::lrwpan::LrWpanMac::m_beaconEvent
private

Scheduler event for generation of one beacon.

Definition at line 1293 of file lr-wpan-mac.h.

Referenced by DoDispose(), EndStartRequest(), and StartInactivePeriod().

◆ m_beaconInterval

uint32_t ns3::lrwpan::LrWpanMac::m_beaconInterval

Indication of the Interval used by the coordinator to transmit beacon frames expressed in symbols.

Definition at line 589 of file lr-wpan-mac.h.

Referenced by EndStartRequest(), and StartInactivePeriod().

◆ m_beaconTrackingOn

bool ns3::lrwpan::LrWpanMac::m_beaconTrackingOn

Indication of whether the current device is tracking incoming beacons.

Definition at line 617 of file lr-wpan-mac.h.

Referenced by LrWpanMac(), BeaconSearchTimeout(), MlmeSyncRequest(), PdDataIndication(), and ReceiveBeacon().

◆ m_capEvent

EventId ns3::lrwpan::LrWpanMac::m_capEvent
private

Scheduler event for the end of the outgoing superframe CAP.

Definition at line 1298 of file lr-wpan-mac.h.

Referenced by EndStartRequest(), MlmeScanRequest(), PdDataConfirm(), PdDataIndication(), and StartCAP().

◆ m_cfpEvent

EventId ns3::lrwpan::LrWpanMac::m_cfpEvent
private

Scheduler event for the end of the outgoing superframe CFP.

Definition at line 1303 of file lr-wpan-mac.h.

Referenced by EndStartRequest(), MlmeScanRequest(), and StartCFP().

◆ m_channelScanIndex

uint16_t ns3::lrwpan::LrWpanMac::m_channelScanIndex
private

The channel list index used to obtain the current scanned channel.

Definition at line 1240 of file lr-wpan-mac.h.

Referenced by LrWpanMac(), EndChannelEnergyScan(), EndChannelScan(), MlmeScanRequest(), PdDataIndication(), and PlmeSetAttributeConfirm().

◆ m_coor

bool ns3::lrwpan::LrWpanMac::m_coor

Indicates if the current device is a coordinator type.

Definition at line 583 of file lr-wpan-mac.h.

Referenced by LrWpanMac(), CheckQueue(), EndStartRequest(), IsCoordDest(), McpsDataRequest(), and PdDataIndication().

◆ m_csmaCa

◆ m_deviceCapability

uint8_t ns3::lrwpan::LrWpanMac::m_deviceCapability

Indication of current device capability (FFD or RFD)

Definition at line 612 of file lr-wpan-mac.h.

Referenced by LrWpanMac(), and MlmeStartRequest().

◆ m_energyDetectList

std::vector<uint8_t> ns3::lrwpan::LrWpanMac::m_energyDetectList
private

The list of energy measurements, one for each channel searched during an ED scan.

Definition at line 1212 of file lr-wpan-mac.h.

Referenced by DoDispose(), EndChannelEnergyScan(), and MlmeScanRequest().

◆ m_fnlCapSlot

uint8_t ns3::lrwpan::LrWpanMac::m_fnlCapSlot

Indication of the Slot where the CAP portion of the OUTGOING Superframe ends.

Definition at line 457 of file lr-wpan-mac.h.

Referenced by EndStartRequest(), GetSuperframeField(), StartCAP(), and StartCFP().

◆ m_ifs

uint32_t ns3::lrwpan::LrWpanMac::m_ifs

The value of the necessary InterFrame Space after the transmission of a packet.

Definition at line 573 of file lr-wpan-mac.h.

Referenced by LrWpanMac().

◆ m_ifsEvent

EventId ns3::lrwpan::LrWpanMac::m_ifsEvent
private

Scheduler event for Interframe spacing wait time.

Definition at line 1288 of file lr-wpan-mac.h.

Referenced by CheckQueue(), PdDataConfirm(), and PdDataIndication().

◆ m_incCapEvent

EventId ns3::lrwpan::LrWpanMac::m_incCapEvent
private

Scheduler event for the end of the incoming superframe CAP.

Definition at line 1308 of file lr-wpan-mac.h.

Referenced by EndStartRequest(), MlmeScanRequest(), PdDataConfirm(), PlmeSetAttributeConfirm(), PrepareRetransmission(), ReceiveBeacon(), and SetLrWpanMacState().

◆ m_incCfpEvent

EventId ns3::lrwpan::LrWpanMac::m_incCfpEvent
private

Scheduler event for the end of the incoming superframe CFP.

Definition at line 1313 of file lr-wpan-mac.h.

Referenced by EndStartRequest(), MlmeScanRequest(), PdDataConfirm(), PlmeSetAttributeConfirm(), PrepareRetransmission(), SetLrWpanMacState(), and StartCFP().

◆ m_incomingBeaconInterval

uint32_t ns3::lrwpan::LrWpanMac::m_incomingBeaconInterval

Indication of the interval a node should receive a superframe expressed in symbols.

Definition at line 601 of file lr-wpan-mac.h.

Referenced by ReceiveBeacon(), and StartInactivePeriod().

◆ m_incomingBeaconOrder

uint8_t ns3::lrwpan::LrWpanMac::m_incomingBeaconOrder

The beaconOrder value of the INCOMING frame.

Used by all devices that have a parent. Specification of how often the parent coordinator transmits its beacon. 0 - 15 with 15 means the parent is not currently transmitting beacons.

Definition at line 464 of file lr-wpan-mac.h.

Referenced by LrWpanMac(), BeaconSearchTimeout(), MlmeSyncRequest(), PdDataConfirm(), PlmeSetAttributeConfirm(), PrepareRetransmission(), ReceiveBeacon(), and SetLrWpanMacState().

◆ m_incomingFnlCapSlot

uint8_t ns3::lrwpan::LrWpanMac::m_incomingFnlCapSlot

Indication of the Slot where the CAP portion of the INCOMING Superframe ends.

Definition at line 477 of file lr-wpan-mac.h.

Referenced by ReceiveBeacon(), StartCAP(), and StartCFP().

◆ m_incomingSuperframeDuration

uint32_t ns3::lrwpan::LrWpanMac::m_incomingSuperframeDuration

Indication of the superframe duration in symbols (e.g.

1 symbol = 4 bits in a 250kbps O-QPSK PHY)

Definition at line 607 of file lr-wpan-mac.h.

Referenced by ReceiveBeacon(), StartCAP(), StartCFP(), and StartInactivePeriod().

◆ m_incomingSuperframeOrder

uint8_t ns3::lrwpan::LrWpanMac::m_incomingSuperframeOrder

Used by all devices that have a parent.

The length of the active portion of the INCOMING superframe, including the beacon frame. 0 - 15 with 15 meaning the superframe will not be active after the beacon.

Definition at line 472 of file lr-wpan-mac.h.

Referenced by LrWpanMac(), PdDataConfirm(), PlmeSetAttributeConfirm(), PrepareRetransmission(), ReceiveBeacon(), and SetLrWpanMacState().

◆ m_incSuperframeStatus

TracedValue<SuperframeStatus> ns3::lrwpan::LrWpanMac::m_incSuperframeStatus
private

The current period of the incoming superframe.

Definition at line 1152 of file lr-wpan-mac.h.

Referenced by LrWpanMac(), AwaitBeacon(), CheckQueue(), GetTypeId(), StartCAP(), StartCFP(), and StartInactivePeriod().

◆ m_indTxQueue

std::deque<Ptr<IndTxQueueElement> > ns3::lrwpan::LrWpanMac::m_indTxQueue
private

The indirect transmit queue used by the MAC pending messages (The pending transaction list).

Definition at line 1191 of file lr-wpan-mac.h.

Referenced by LrWpanMac(), DequeueInd(), DoDispose(), EnqueueInd(), PrintPendingTxQueue(), PurgeInd(), and RemovePendTxQElement().

◆ m_lastRxFrameLqi

uint8_t ns3::lrwpan::LrWpanMac::m_lastRxFrameLqi
private

Keep track of the last received frame Link Quality Indicator.

Definition at line 1262 of file lr-wpan-mac.h.

Referenced by LrWpanMac(), PdDataConfirm(), and PdDataIndication().

◆ m_macAssociationPermit

bool ns3::lrwpan::LrWpanMac::m_macAssociationPermit

Indication of whether a coordinator is currently allowing association.

A value of TRUE indicates that the association is permitted. See IEEE 802.15.4-2011, section 6.4.2, Table 52.

Definition at line 554 of file lr-wpan-mac.h.

Referenced by LrWpanMac(), GetSuperframeField(), MlmeGetRequest(), MlmeSetRequest(), and PdDataIndication().

◆ m_macAutoRequest

bool ns3::lrwpan::LrWpanMac::m_macAutoRequest

Indication of whether a device automatically sends data request command if its address is listed in the beacon frame.

TRUE = request command automatically is sent. This command also affects the generation of MLME-BEACON-NOTIFY.indication (6.2.4.1) See IEEE 802.15.4-2011, section 6.4.2, Table 52.

Definition at line 563 of file lr-wpan-mac.h.

Referenced by LrWpanMac(), EndChannelScan(), and ReceiveBeacon().

◆ m_macBeaconOrder

uint8_t ns3::lrwpan::LrWpanMac::m_macBeaconOrder

Used by a PAN coordinator or coordinator.

Defines how often the coordinator transmits its beacon (outgoing superframe). Range 0 - 15 with 15 meaning no beacons are being sent. See IEEE 802.15.4-2011, section 6.4.2, Table 52.

Definition at line 427 of file lr-wpan-mac.h.

Referenced by LrWpanMac(), EndStartRequest(), EnqueueInd(), and GetSuperframeField().

◆ m_macBeaconPayload

std::vector<uint8_t> ns3::lrwpan::LrWpanMac::m_macBeaconPayload

The set with the contents of the beacon payload.

This value is set directly by the MLME-SET primitive. See IEEE 802.15.4-2011, section 6.4.2, Table 52.

Definition at line 516 of file lr-wpan-mac.h.

Referenced by LrWpanMac(), MlmeGetRequest(), MlmeSetRequest(), and SendOneBeacon().

◆ m_macBeaconPayloadLength

uint32_t ns3::lrwpan::LrWpanMac::m_macBeaconPayloadLength

The length, in octets, of the beacon payload.

See IEEE 802.15.4-2011, section 6.4.2, Table 52.

Definition at line 522 of file lr-wpan-mac.h.

Referenced by LrWpanMac(), MlmeGetRequest(), and MlmeSetRequest().

◆ m_macBeaconRxTime

Time ns3::lrwpan::LrWpanMac::m_macBeaconRxTime

The time that the device received its last bit of the beacon frame.

It does not indicate the start of the Active Period in the Incoming superframe. Not explicitly listed by the standard but its use is implied. Its purpose is somehow similar to m_macBeaconTxTime

Definition at line 382 of file lr-wpan-mac.h.

Referenced by ReceiveBeacon(), and StartCAP().

◆ m_macBeaconTxTime

Time ns3::lrwpan::LrWpanMac::m_macBeaconTxTime

The time that the device transmitted its last beacon frame.

It also indicates the start of the Active Period in the Outgoing superframe. See IEEE 802.15.4-2011, section 6.4.2, Table 52.

Definition at line 374 of file lr-wpan-mac.h.

Referenced by PdDataConfirm(), and StartCAP().

◆ m_macBsn

SequenceNumber8 ns3::lrwpan::LrWpanMac::m_macBsn

Sequence number added to transmitted beacon frame, 00-ff.

See IEEE 802.15.4-2011, section 6.4.2, Table 52.

Definition at line 509 of file lr-wpan-mac.h.

Referenced by LrWpanMac(), MlmePollRequest(), and SendOneBeacon().

◆ m_macCoordExtendedAddress

Mac64Address ns3::lrwpan::LrWpanMac::m_macCoordExtendedAddress

The extended address of the coordinator through which the device is associated.

See IEEE 802.15.4-2011, section 6.4.2, Table 52.

Definition at line 413 of file lr-wpan-mac.h.

Referenced by LrWpanMac(), EndAssociateRequest(), EndChannelScan(), GetCoordExtAddress(), IsCoordDest(), LostAssocRespCommand(), PdDataConfirm(), PdDataIndication(), PlmeSetAttributeConfirm(), PrepareRetransmission(), SendDataRequestCommand(), SetAssociatedCoor(), and SetLrWpanMacState().

◆ m_macCoordShortAddress

Mac16Address ns3::lrwpan::LrWpanMac::m_macCoordShortAddress

The short address of the coordinator through which the device is associated.

0xFFFF indicates this value is unknown. 0xFFFE indicates the coordinator is only using its extended address. See IEEE 802.15.4-2011, section 6.4.2, Table 52.

Definition at line 406 of file lr-wpan-mac.h.

Referenced by LrWpanMac(), EndAssociateRequest(), EndChannelScan(), GetCoordShortAddress(), IsCoordDest(), LostAssocRespCommand(), PdDataConfirm(), PdDataIndication(), PlmeSetAttributeConfirm(), PrepareRetransmission(), SendDataRequestCommand(), SetAssociatedCoor(), and SetLrWpanMacState().

◆ m_macDsn

SequenceNumber8 ns3::lrwpan::LrWpanMac::m_macDsn

Sequence number added to transmitted data or MAC command frame, 00-ff.

See IEEE 802.15.4-2006, section 7.4.2, Table 86.

Definition at line 503 of file lr-wpan-mac.h.

Referenced by LrWpanMac(), McpsDataRequest(), MlmeAssociateResponse(), MlmeOrphanResponse(), SendAssocRequestCommand(), SendBeaconRequestCommand(), SendDataRequestCommand(), and SendOrphanNotificationCommand().

◆ m_macExtendedAddress

Mac64Address ns3::lrwpan::LrWpanMac::m_macExtendedAddress
private

The extended 64 address (IEEE EUI-64) used by this MAC.

Definition at line 1180 of file lr-wpan-mac.h.

Referenced by LrWpanMac(), GetExtendedAddress(), MlmeGetRequest(), PdDataIndication(), SendDataRequestCommand(), and SetExtendedAddress().

◆ m_macIfsEndTrace

TracedCallback<Time> ns3::lrwpan::LrWpanMac::m_macIfsEndTrace
private

The trace source is fired at the end of any Interframe Space (IFS).

Definition at line 978 of file lr-wpan-mac.h.

Referenced by GetTypeId(), and IfsWaitTimeout().

◆ m_macIndTxDequeueTrace

TracedCallback<Ptr<const Packet> > ns3::lrwpan::LrWpanMac::m_macIndTxDequeueTrace
private

The trace source fired when packets are dequeued from the L3/l2 indirect transmission queue (Pending transaction list).

See also
class CallBackTraceSource

Definition at line 1022 of file lr-wpan-mac.h.

Referenced by DequeueInd(), GetTypeId(), and RemovePendTxQElement().

◆ m_macIndTxDropTrace

TracedCallback<Ptr<const Packet> > ns3::lrwpan::LrWpanMac::m_macIndTxDropTrace
private

The trace source fired when packets are dropped due to indirect Tx queue overflows or expiration.

See also
class CallBackTraceSource

Definition at line 1054 of file lr-wpan-mac.h.

Referenced by EnqueueInd(), GetTypeId(), and PurgeInd().

◆ m_macIndTxEnqueueTrace

TracedCallback<Ptr<const Packet> > ns3::lrwpan::LrWpanMac::m_macIndTxEnqueueTrace
private

The trace source fired when packets come into the "top" of the device at the L3/L2 transition, when being queued for indirect transmission (pending transaction list).

See also
class CallBackTraceSource

Definition at line 1014 of file lr-wpan-mac.h.

Referenced by EnqueueInd(), and GetTypeId().

◆ m_macLIFSPeriod

uint32_t ns3::lrwpan::LrWpanMac::m_macLIFSPeriod

The minimum time forming a Long InterFrame Spacing (LIFS) period.

See IEEE 802.15.4-2011, section 6.4.2, Table 52.

Definition at line 541 of file lr-wpan-mac.h.

Referenced by LrWpanMac(), GetIfsSize(), and IfsWaitTimeout().

◆ m_macMaxFrameRetries

uint8_t ns3::lrwpan::LrWpanMac::m_macMaxFrameRetries

The maximum number of retries allowed after a transmission failure.

See IEEE 802.15.4-2006, section 7.4.2, Table 86.

Definition at line 528 of file lr-wpan-mac.h.

Referenced by LrWpanMac(), GetMacMaxFrameRetries(), PrepareRetransmission(), and SetMacMaxFrameRetries().

◆ m_macPanId

◆ m_macPanIdScan

uint16_t ns3::lrwpan::LrWpanMac::m_macPanIdScan

Temporally stores the value of the current m_macPanId when a MLME-SCAN.request is performed.

See IEEE 802.15.4-2011, section 5.1.2.1.2.

Definition at line 497 of file lr-wpan-mac.h.

Referenced by EndChannelEnergyScan(), EndChannelScan(), MlmeScanRequest(), and PdDataIndication().

◆ m_macPromiscRxTrace

TracedCallback<Ptr<const Packet> > ns3::lrwpan::LrWpanMac::m_macPromiscRxTrace
private

The trace source fired for packets successfully received by the device immediately before being forwarded up to higher layers (at the L2/L3 transition).

This is a promiscuous trace.

See also
class CallBackTraceSource

Definition at line 1063 of file lr-wpan-mac.h.

Referenced by GetTypeId(), and PdDataIndication().

◆ m_macPromiscuousMode

bool ns3::lrwpan::LrWpanMac::m_macPromiscuousMode

Indicates if MAC sublayer is in receive all mode.

True mean accept all frames from PHY. See IEEE 802.15.4-2006, section 7.4.2, Table 86.

Definition at line 484 of file lr-wpan-mac.h.

Referenced by LrWpanMac(), MlmeGetRequest(), MlmeSetRequest(), and PdDataIndication().

◆ m_macResponseWaitTime

uint64_t ns3::lrwpan::LrWpanMac::m_macResponseWaitTime

The maximum time, in multiples of aBaseSuperframeDuration, a device shall wait for a response command frame to be available following a request command frame.

Definition at line 389 of file lr-wpan-mac.h.

Referenced by LrWpanMac(), PdDataIndication(), and PlmeSetAttributeConfirm().

◆ m_macRxDropTrace

TracedCallback<Ptr<const Packet> > ns3::lrwpan::LrWpanMac::m_macRxDropTrace
private

The trace source fired for packets successfully received by the device but dropped before being forwarded up to higher layers (at the L2/L3 transition).

See also
class CallBackTraceSource

Definition at line 1081 of file lr-wpan-mac.h.

Referenced by GetTypeId(), and PdDataIndication().

◆ m_macRxOnWhenIdle

bool ns3::lrwpan::LrWpanMac::m_macRxOnWhenIdle

Indication of whether the MAC sublayer is to enable its receiver during idle periods.

See IEEE 802.15.4-2006, section 7.4.2, Table 86.

Definition at line 535 of file lr-wpan-mac.h.

Referenced by LrWpanMac(), DoInitialize(), GetRxOnWhenIdle(), MlmeGetRequest(), MlmeSetRequest(), SetLrWpanMacState(), and SetRxOnWhenIdle().

◆ m_macRxTrace

TracedCallback<Ptr<const Packet> > ns3::lrwpan::LrWpanMac::m_macRxTrace
private

The trace source fired for packets successfully received by the device immediately before being forwarded up to higher layers (at the L2/L3 transition).

This is a non-promiscuous trace.

See also
class CallBackTraceSource

Definition at line 1072 of file lr-wpan-mac.h.

Referenced by GetTypeId(), and PdDataIndication().

◆ m_macSIFSPeriod

uint32_t ns3::lrwpan::LrWpanMac::m_macSIFSPeriod

The minimum time forming a Short InterFrame Spacing (SIFS) period.

See IEEE 802.15.4-2011, section 6.4.2, Table 52.

Definition at line 547 of file lr-wpan-mac.h.

Referenced by LrWpanMac(), GetIfsSize(), and IfsWaitTimeout().

◆ m_macState

TracedValue<MacState> ns3::lrwpan::LrWpanMac::m_macState
private

◆ m_macStateLogger

TracedCallback<MacState, MacState> ns3::lrwpan::LrWpanMac::m_macStateLogger
private

A trace source that fires when the MAC changes states.

Parameters are the old mac state and the new mac state.

Deprecated
This TracedCallback is deprecated and will be removed in a future release, Instead, use the MacStateValue TracedValue.

Definition at line 1132 of file lr-wpan-mac.h.

Referenced by ChangeMacState(), and GetTypeId().

◆ m_macSuperframeOrder

uint8_t ns3::lrwpan::LrWpanMac::m_macSuperframeOrder

Used by a PAN coordinator or coordinator.

The length of the active portion of the outgoing superframe, including the beacon frame. 0 - 15 with 15 means the superframe will not be active after the beacon. See IEEE 802.15.4-2011, section 6.4.2, Table 52.

Definition at line 435 of file lr-wpan-mac.h.

Referenced by LrWpanMac(), EndStartRequest(), and GetSuperframeField().

◆ m_macSyncSymbolOffset

uint64_t ns3::lrwpan::LrWpanMac::m_macSyncSymbolOffset

Symbol boundary is same as m_macBeaconTxTime.

See IEEE 802.15.4-2006, section 7.4.2, Table 86.

Definition at line 419 of file lr-wpan-mac.h.

◆ m_macTransactionPersistenceTime

uint16_t ns3::lrwpan::LrWpanMac::m_macTransactionPersistenceTime

The maximum time (in UNIT periods) that a transaction is stored by a coordinator and indicated in its beacon.

This value establish the expiration time of the packets stored in the pending transaction list (indirect transmissions). 1 Unit Period: Beacon-enabled = aBaseSuperframeDuration * 2^BO Non-beacon enabled = aBaseSuperframeDuration See IEEE 802.15.4-2006, section 7.4.2, Table 86.

Definition at line 446 of file lr-wpan-mac.h.

Referenced by LrWpanMac(), and EnqueueInd().

◆ m_macTxDequeueTrace

TracedCallback<Ptr<const Packet> > ns3::lrwpan::LrWpanMac::m_macTxDequeueTrace
private

The trace source fired when packets are dequeued from the L3/l2 transmission queue.

See also
class CallBackTraceSource

Definition at line 1006 of file lr-wpan-mac.h.

Referenced by GetTypeId(), and RemoveFirstTxQElement().

◆ m_macTxDropTrace

TracedCallback<Ptr<const Packet> > ns3::lrwpan::LrWpanMac::m_macTxDropTrace
private

The trace source fired when packets are dropped due to missing ACKs or because of transmission failures in L1.

See also
class CallBackTraceSource

Definition at line 1046 of file lr-wpan-mac.h.

Referenced by EnqueueTxQElement(), GetTypeId(), PdDataConfirm(), PrepareRetransmission(), and SetLrWpanMacState().

◆ m_macTxEnqueueTrace

TracedCallback<Ptr<const Packet> > ns3::lrwpan::LrWpanMac::m_macTxEnqueueTrace
private

The trace source fired when packets come into the "top" of the device at the L3/L2 transition, when being queued for transmission.

See also
class CallBackTraceSource

Definition at line 998 of file lr-wpan-mac.h.

Referenced by EnqueueTxQElement(), and GetTypeId().

◆ m_macTxOkTrace

TracedCallback<Ptr<const Packet> > ns3::lrwpan::LrWpanMac::m_macTxOkTrace
private

The trace source fired when packets where successfully transmitted, that is an acknowledgment was received, if requested, or the packet was successfully sent by L1, if no ACK was requested.

See also
class CallBackTraceSource

Definition at line 1038 of file lr-wpan-mac.h.

Referenced by GetTypeId(), PdDataConfirm(), and PdDataIndication().

◆ m_macTxTrace

TracedCallback<Ptr<const Packet> > ns3::lrwpan::LrWpanMac::m_macTxTrace
private

The trace source fired when packets are being sent down to L1.

See also
class CallBackTraceSource

Definition at line 1029 of file lr-wpan-mac.h.

Referenced by GetTypeId(), and PlmeSetTRXStateConfirm().

◆ m_maxEnergyLevel

uint8_t ns3::lrwpan::LrWpanMac::m_maxEnergyLevel

The maximum energy level detected during ED scan on the current channel.

Definition at line 568 of file lr-wpan-mac.h.

Referenced by LrWpanMac(), EndChannelEnergyScan(), PlmeEdConfirm(), and PlmeSetAttributeConfirm().

◆ m_maxIndTxQueueSize

uint32_t ns3::lrwpan::LrWpanMac::m_maxIndTxQueueSize
private

The maximum size of the indirect transmit queue (The pending transaction list).

Definition at line 1201 of file lr-wpan-mac.h.

Referenced by LrWpanMac(), EnqueueInd(), and SetIndTxQMaxSize().

◆ m_maxTxQueueSize

uint32_t ns3::lrwpan::LrWpanMac::m_maxTxQueueSize
private

The maximum size of the transmit queue.

Definition at line 1196 of file lr-wpan-mac.h.

Referenced by LrWpanMac(), EnqueueTxQElement(), and SetTxQMaxSize().

◆ m_numCsmacaRetry

uint8_t ns3::lrwpan::LrWpanMac::m_numCsmacaRetry
private

The number of CSMA/CA retries used for sending the current packet.

Definition at line 1257 of file lr-wpan-mac.h.

Referenced by LrWpanMac(), PrepareRetransmission(), RemoveFirstTxQElement(), and SetLrWpanMacState().

◆ m_numLostBeacons

uint8_t ns3::lrwpan::LrWpanMac::m_numLostBeacons

The number of consecutive loss beacons in a beacon tracking operation.

Definition at line 622 of file lr-wpan-mac.h.

Referenced by LrWpanMac(), BeaconSearchTimeout(), MlmeSyncRequest(), and ReceiveBeacon().

◆ m_outSuperframeStatus

TracedValue<SuperframeStatus> ns3::lrwpan::LrWpanMac::m_outSuperframeStatus
private

The current period of the outgoing superframe.

Definition at line 1157 of file lr-wpan-mac.h.

Referenced by LrWpanMac(), CheckQueue(), GetTypeId(), SendOneBeacon(), StartCAP(), StartCFP(), and StartInactivePeriod().

◆ m_panCoor

bool ns3::lrwpan::LrWpanMac::m_panCoor

Indication of whether the current device is the PAN coordinator.

Definition at line 578 of file lr-wpan-mac.h.

Referenced by LrWpanMac(), EndStartRequest(), and GetSuperframeField().

◆ m_panDescriptorList

std::vector<PanDescriptor> ns3::lrwpan::LrWpanMac::m_panDescriptorList
private

The list of PAN descriptors accumulated during channel scans, used to select a PAN to associate.

Definition at line 1207 of file lr-wpan-mac.h.

Referenced by DoDispose(), EndChannelScan(), MlmeScanRequest(), and ReceiveBeacon().

◆ m_pendPrimitive

PendingPrimitiveStatus ns3::lrwpan::LrWpanMac::m_pendPrimitive
private

Indicates the pending primitive when PLME.SET operation (page or channel switch) is called from within another MLME primitive (e.g.

Association, Scan, Sync, Start).

Definition at line 1246 of file lr-wpan-mac.h.

Referenced by LrWpanMac(), EndAssociateRequest(), EndChannelEnergyScan(), EndChannelScan(), EndStartRequest(), MlmeAssociateRequest(), MlmeScanRequest(), MlmeStartRequest(), PdDataIndication(), and PlmeSetAttributeConfirm().

◆ m_phy

◆ m_promiscSnifferTrace

TracedCallback<Ptr<const Packet> > ns3::lrwpan::LrWpanMac::m_promiscSnifferTrace
private

A trace source that emulates a promiscuous mode protocol sniffer connected to the device.

This trace source fire on packets destined for any host just like your average everyday packet sniffer.

On the transmit size, this trace hook will fire after a packet is dequeued from the device queue for transmission. In Linux, for example, this would correspond to the point just before a device hard_start_xmit where dev_queue_xmit_nit is called to dispatch the packet to the PF_PACKET ETH_P_ALL handlers.

On the receive side, this trace hook will fire when a packet is received, just before the receive callback is executed. In Linux, for example, this would correspond to the point at which the packet is dispatched to packet sniffers in netif_receive_skb.

See also
class CallBackTraceSource

Definition at line 1121 of file lr-wpan-mac.h.

Referenced by GetTypeId(), PdDataIndication(), and PlmeSetTRXStateConfirm().

◆ m_respWaitTimeout

EventId ns3::lrwpan::LrWpanMac::m_respWaitTimeout
private

Scheduler event for a response to a request command frame.

Definition at line 1273 of file lr-wpan-mac.h.

Referenced by PdDataIndication().

◆ m_retransmission

uint8_t ns3::lrwpan::LrWpanMac::m_retransmission
private

The number of already used retransmission for the currently transmitted packet.

Definition at line 1252 of file lr-wpan-mac.h.

Referenced by LrWpanMac(), PrepareRetransmission(), RemoveFirstTxQElement(), and SetLrWpanMacState().

◆ m_rxBeaconSymbols

uint64_t ns3::lrwpan::LrWpanMac::m_rxBeaconSymbols

The total size of the received beacon in symbols.

Its value is used to calculate the end CAP time of the incoming superframe.

Definition at line 452 of file lr-wpan-mac.h.

Referenced by ReceiveBeacon().

◆ m_rxPkt

Ptr<Packet> ns3::lrwpan::LrWpanMac::m_rxPkt
private

The command request packet received.

Briefly stored to proceed with operations that take place after ACK messages.

Definition at line 1168 of file lr-wpan-mac.h.

Referenced by LrWpanMac(), PdDataConfirm(), and PdDataIndication().

◆ m_scanEnergyEvent

EventId ns3::lrwpan::LrWpanMac::m_scanEnergyEvent
private

Scheduler event for the end of a ED channel scan.

Definition at line 1333 of file lr-wpan-mac.h.

Referenced by DoDispose(), EndStartRequest(), MlmeScanRequest(), PdDataIndication(), PlmeEdConfirm(), PlmeSetAttributeConfirm(), and PlmeSetTRXStateConfirm().

◆ m_scanEvent

EventId ns3::lrwpan::LrWpanMac::m_scanEvent
private

Scheduler event for the end of an ACTIVE or PASSIVE channel scan.

Definition at line 1323 of file lr-wpan-mac.h.

Referenced by DoDispose(), EndStartRequest(), MlmeScanRequest(), PdDataIndication(), PlmeSetAttributeConfirm(), ReceiveBeacon(), and SetLrWpanMacState().

◆ m_scanOrphanEvent

EventId ns3::lrwpan::LrWpanMac::m_scanOrphanEvent
private

Scheduler event for the end of an ORPHAN channel scan.

Definition at line 1328 of file lr-wpan-mac.h.

Referenced by DoDispose(), EndStartRequest(), MlmeScanRequest(), PdDataIndication(), PlmeSetAttributeConfirm(), and SetLrWpanMacState().

◆ m_scanParams

MlmeScanRequestParams ns3::lrwpan::LrWpanMac::m_scanParams
private

The parameters used during a MLME-SCAN.request.

These parameters are stored here while PLME-SET (set channel page, set channel number) and other operations take place.

Definition at line 1223 of file lr-wpan-mac.h.

Referenced by EndChannelEnergyScan(), EndChannelScan(), MlmeScanRequest(), PdDataIndication(), and PlmeSetAttributeConfirm().

◆ m_sentPktTrace

TracedCallback<Ptr<const Packet>, uint8_t, uint8_t> ns3::lrwpan::LrWpanMac::m_sentPktTrace
private

The trace source fired when packets are considered as successfully sent or the transmission has been given up.

Only non-broadcast packets are traced.

The data should represent: packet, number of retries, total number of csma backoffs

See also
class CallBackTraceSource

Definition at line 990 of file lr-wpan-mac.h.

Referenced by GetTypeId(), and RemoveFirstTxQElement().

◆ m_setMacState

EventId ns3::lrwpan::LrWpanMac::m_setMacState
private

Scheduler event for a deferred MAC state change.

Definition at line 1283 of file lr-wpan-mac.h.

Referenced by CheckQueue(), PdDataConfirm(), PdDataIndication(), and ReceiveBeacon().

◆ m_shortAddress

Mac16Address ns3::lrwpan::LrWpanMac::m_shortAddress
private

The short address (16 bit address) used by this MAC.

If supported, the short address must be assigned to the device by the coordinator during the association process.

Definition at line 1175 of file lr-wpan-mac.h.

Referenced by LrWpanMac(), EndChannelScan(), GetShortAddress(), MlmeGetRequest(), MlmeSetRequest(), PdDataIndication(), and SetShortAddress().

◆ m_snifferTrace

TracedCallback<Ptr<const Packet> > ns3::lrwpan::LrWpanMac::m_snifferTrace
private

A trace source that emulates a non-promiscuous protocol sniffer connected to the device.

Unlike your average everyday sniffer, this trace source will not fire on PACKET_OTHERHOST events.

On the transmit size, this trace hook will fire after a packet is dequeued from the device queue for transmission. In Linux, for example, this would correspond to the point just before a device hard_start_xmit where dev_queue_xmit_nit is called to dispatch the packet to the PF_PACKET ETH_P_ALL handlers.

On the receive side, this trace hook will fire when a packet is received, just before the receive callback is executed. In Linux, for example, this would correspond to the point at which the packet is dispatched to packet sniffers in netif_receive_skb.

See also
class CallBackTraceSource

Definition at line 1101 of file lr-wpan-mac.h.

Referenced by GetTypeId(), and PlmeSetTRXStateConfirm().

◆ m_startParams

MlmeStartRequestParams ns3::lrwpan::LrWpanMac::m_startParams
private

The parameters used during a MLME-START.request.

These parameters are stored here while PLME-SET operations (set channel page, set channel number) take place.

Definition at line 1229 of file lr-wpan-mac.h.

Referenced by EndStartRequest(), MlmeStartRequest(), and PlmeSetAttributeConfirm().

◆ m_superframeDuration

uint32_t ns3::lrwpan::LrWpanMac::m_superframeDuration

Indication of the superframe duration in symbols.

(e.g. 1 symbol = 4 bits in a 250kbps O-QPSK PHY)

Definition at line 595 of file lr-wpan-mac.h.

Referenced by EndStartRequest(), SendOneBeacon(), StartCAP(), StartCFP(), and StartInactivePeriod().

◆ m_trackingEvent

EventId ns3::lrwpan::LrWpanMac::m_trackingEvent
private

Scheduler event to track the incoming beacons.

Definition at line 1318 of file lr-wpan-mac.h.

Referenced by BeaconSearchTimeout(), EndStartRequest(), MlmeScanRequest(), MlmeSyncRequest(), and ReceiveBeacon().

◆ m_txPkt

Ptr<Packet> ns3::lrwpan::LrWpanMac::m_txPkt
private

◆ m_txQueue

std::deque<Ptr<TxQueueElement> > ns3::lrwpan::LrWpanMac::m_txQueue
private

◆ m_uniformVar

Ptr<UniformRandomVariable> ns3::lrwpan::LrWpanMac::m_uniformVar
private

The uniform random variable used in this mac layer.

Definition at line 1338 of file lr-wpan-mac.h.

Referenced by LrWpanMac(), AssignStreams(), and PdDataIndication().

◆ m_unscannedChannels

std::vector<uint8_t> ns3::lrwpan::LrWpanMac::m_unscannedChannels
private

The list of unscanned channels during a scan operation.

Definition at line 1217 of file lr-wpan-mac.h.

Referenced by DoDispose(), EndChannelScan(), MlmeScanRequest(), and SetLrWpanMacState().


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