A Discrete-Event Network Simulator
API
lr-wpan-mac.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2011 The Boeing Company
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Authors:
18 * Gary Pei <guangyu.pei@boeing.com>
19 * kwong yin <kwong-sang.yin@boeing.com>
20 * Tom Henderson <thomas.r.henderson@boeing.com>
21 * Sascha Alexander Jopen <jopen@cs.uni-bonn.de>
22 * Alberto Gallegos Ramonet <ramonet@fc.ritsumei.ac.jp>
23 */
24
25#ifndef LR_WPAN_MAC_H
26#define LR_WPAN_MAC_H
27
28#include <ns3/event-id.h>
29#include <ns3/lr-wpan-fields.h>
30#include <ns3/lr-wpan-phy.h>
31#include <ns3/mac16-address.h>
32#include <ns3/mac64-address.h>
33#include <ns3/object.h>
34#include <ns3/sequence-number.h>
35#include <ns3/traced-callback.h>
36#include <ns3/traced-value.h>
37
38#include <deque>
39#include <memory>
40
41namespace ns3
42{
43
44class Packet;
45class LrWpanCsmaCa;
46
59typedef enum
60{
66
72typedef enum
73{
85
91typedef enum
92{
98
104typedef enum
105{
107 INCOMING = 1
109
115typedef enum
116{
121 MLME_SYNC_REQ = 4
123
124namespace TracedValueCallback
125{
126
134typedef void (*LrWpanMacState)(LrWpanMacState oldValue, LrWpanMacState newValue);
135
143typedef void (*SuperframeStatus)(SuperframeStatus oldValue, SuperframeStatus newValue);
144
145} // namespace TracedValueCallback
146
152typedef enum
153{
157 EXT_ADDR = 3
159
165typedef enum
166{
171 DISASSOCIATED = 0xff
173
179typedef enum
180{
184 MLMESCAN_ORPHAN = 0x03
186
192typedef enum
193{
207
213typedef enum
214{
226
232typedef enum
233{
244
250typedef enum
251{
263
269typedef enum
270{
276
282typedef enum
283{
293
299typedef enum
300{
311
318{
321 uint16_t m_coorPanId{
322 0xffff};
327 uint8_t m_logCh{11};
328 uint8_t m_logChPage{0};
332 false};
334 0};
337};
338
345{
348 uint16_t m_dstPanId{0};
351 uint8_t m_msduHandle{0};
352 uint8_t m_txOptions{0};
353};
354
361{
362 uint8_t m_msduHandle{0};
365};
366
373{
375 uint16_t m_srcPanId{0};
379 uint16_t m_dstPanId{0};
382 uint8_t m_mpduLinkQuality{0};
383 uint8_t m_dsn{0};
384};
385
392{
396};
397
404{
410};
411
418{
419 uint16_t m_PanId{0};
420 uint8_t m_logCh{
421 11};
423 0};
426 uint8_t m_bcnOrd{15};
428 uint8_t m_sfrmOrd{15};
429 bool m_panCoor{false};
430 bool m_battLifeExt{false};
432 bool m_coorRealgn{false};
434};
435
442{
443 uint8_t m_logCh{11};
444 bool m_trackBcn{false};
446};
447
454{
456 SHORT_ADDR};
457 uint16_t m_coorPanId{0};
460};
461
468{
472 uint8_t m_scanDuration{14};
475};
476
483{
489 std::vector<uint8_t> m_unscannedCh;
491 std::vector<uint8_t>
494 std::vector<PanDescriptor> m_panDescList;
496};
497
504{
505 uint8_t m_chNum{11};
508 SHORT_ADDR};
509 uint16_t m_coordPanId{0};
516};
517
524{
528};
529
536{
539};
540
547{
548 uint8_t m_bsn{0};
552};
553
560{
563 uint16_t m_panId{0};
565 uint8_t m_logCh{11};
567};
568
575{
576 uint16_t m_panId{0};
589};
590
597{
601};
602
611
622
631
643
654
663
671
680
691
702
708class LrWpanMac : public Object
709{
710 public:
716 static TypeId GetTypeId();
717 // MAC sublayer constants
722 static constexpr uint32_t aMinMPDUOverhead = 9;
723
729 static constexpr uint32_t aBaseSlotDuration = 60;
730
735 static constexpr uint32_t aNumSuperframeSlots = 16;
736
743
750 static constexpr uint32_t aMaxLostBeacons = 4;
751
757 static constexpr uint32_t aMaxSIFSFrameSize = 18;
761 LrWpanMac();
762 ~LrWpanMac() override;
763
769 bool GetRxOnWhenIdle();
770
776 void SetRxOnWhenIdle(bool rxOnWhenIdle);
777
778 // XXX these setters will become obsolete if we use the attribute system
785
792
799
806
812 void SetPanId(uint16_t panId);
813
819 uint16_t GetPanId() const;
820
827
834
844
854
863
873
883
893
902
908 void SetCsmaCa(Ptr<LrWpanCsmaCa> csmaCa);
909
916
923
932
941
950
959
968
977
986
995
1004
1013
1014 // interfaces between MAC and PHY
1015
1024 void PdDataIndication(uint32_t psduLength, Ptr<Packet> p, uint8_t lqi);
1025
1033
1040
1047 void PlmeEdConfirm(LrWpanPhyEnumeration status, uint8_t energyLevel);
1048
1059 LrWpanPhyPibAttributes* attribute);
1060
1068
1077
1083 void SetLrWpanMacState(LrWpanMacState macState);
1084
1091
1098
1104 void SetTxQMaxSize(uint32_t queueSize);
1105
1111 void SetIndTxQMaxSize(uint32_t queueSize);
1112
1113 // MAC PIB attributes
1114
1121
1129
1136
1144
1153
1160
1166
1174
1182
1193
1199
1204
1211
1219
1224
1231
1237 uint16_t m_macPanId;
1238
1244
1250
1256
1262
1269
1275
1281
1288
1297
1302
1307
1312
1318
1324
1330
1336
1341
1346
1351
1357 uint64_t GetMacAckWaitDuration() const;
1358
1364 uint8_t GetMacMaxFrameRetries() const;
1365
1370
1376 void SetMacMaxFrameRetries(uint8_t retries);
1377
1383 bool isCoordDest();
1384
1391
1398
1405
1411 uint64_t GetTxPacketSymbols();
1412
1418 bool isTxAckReq();
1419
1424 void PrintPendTxQ(std::ostream& os) const;
1425
1430 void PrintTxQueue(std::ostream& os) const;
1431
1439 typedef void (*SentTracedCallback)(Ptr<const Packet> packet, uint8_t retries, uint8_t backoffs);
1440
1450 typedef void (*StateTracedCallback)(LrWpanMacState oldState, LrWpanMacState newState);
1451
1452 protected:
1453 // Inherited from Object.
1454 void DoInitialize() override;
1455 void DoDispose() override;
1456
1457 private:
1461 struct TxQueueElement : public SimpleRefCount<TxQueueElement>
1462 {
1465 };
1466
1470 struct IndTxQueueElement : public SimpleRefCount<IndTxQueueElement>
1471 {
1472 uint8_t seqNum;
1477 };
1478
1482 void SendOneBeacon();
1483
1488
1494
1501 void SendAssocResponseCommand(Ptr<Packet> rxDataReqPkt);
1502
1507 void LostAssocRespCommand();
1508
1513
1517 void EndStartRequest();
1518
1522 void EndChannelScan();
1523
1527 void EndChannelEnergyScan();
1528
1532 void EndAssociateRequest();
1533
1540 void StartCFP(SuperframeType superframeType);
1541
1548 void StartCAP(SuperframeType superframeType);
1549
1556 void StartInactivePeriod(SuperframeType superframeType);
1557
1562 void AwaitBeacon();
1563
1567 void BeaconSearchTimeout();
1568
1574 void SendAck(uint8_t seqno);
1575
1581 void EnqueueTxQElement(Ptr<TxQueueElement> txQElement);
1582
1587 void RemoveFirstTxQElement();
1588
1594 void ChangeMacState(LrWpanMacState newState);
1595
1600 void AckWaitTimeout();
1601
1609 void IfsWaitTimeout(Time ifsTime);
1610
1617 bool PrepareRetransmission();
1618
1624 void EnqueueInd(Ptr<Packet> p);
1625
1634
1638 void PurgeInd();
1639
1646
1652 void CheckQueue();
1653
1661
1669
1677
1682
1694
1702
1710
1718
1726
1733
1742
1750
1758
1767
1776
1785
1805
1825
1835
1840
1845
1851
1857
1864
1871
1878
1885
1891
1897
1903
1910
1915
1920
1925
1930
1934 Ptr<Packet> m_txPkt; // XXX need packet buffer instead of single packet
1935
1941
1948
1954
1958 std::deque<Ptr<TxQueueElement>> m_txQueue;
1959
1964 std::deque<Ptr<IndTxQueueElement>> m_indTxQueue;
1965
1970
1975
1980 std::vector<PanDescriptor> m_panDescriptorList;
1981
1985 std::vector<uint8_t> m_energyDetectList;
1986
1992
1998
2004
2009
2015
2021
2026
2032
2037
2042
2047
2052
2057
2062
2067
2072
2077
2082
2087
2092};
2093} // namespace ns3
2094
2095#endif /* LR_WPAN_MAC_H */
Represent the Capability Information Field.
An identifier for simulation events.
Definition: event-id.h:55
Represent the GTS information fields.
Class that implements the LR-WPAN MAC state machine.
Definition: lr-wpan-mac.h:709
uint32_t m_incomingBeaconInterval
Indication of the interval a node should receive a superframe expressed in symbols.
Definition: lr-wpan-mac.h:1329
uint32_t GetIfsSize()
Get the size of the Interframe Space according to MPDU size (m_txPkt).
Ptr< LrWpanCsmaCa > m_csmaCa
The CSMA/CA implementation used by this MAC.
Definition: lr-wpan-mac.h:1844
uint64_t m_assocRespCmdWaitTime
The maximum wait time for an association response command after the reception of data request command...
Definition: lr-wpan-mac.h:1143
McpsDataConfirmCallback m_mcpsDataConfirmCallback
This callback is used to report data transmission request status to the upper layers.
Definition: lr-wpan-mac.h:1909
uint64_t GetMacAckWaitDuration() const
Get the macAckWaitDuration attribute value.
Time m_macBeaconRxTime
The time that the device received its last bit of the beacon frame.
Definition: lr-wpan-mac.h:1128
void PlmeCcaConfirm(LrWpanPhyEnumeration status)
IEEE 802.15.4-2006 section 6.2.2.2 PLME-CCA.confirm status.
~LrWpanMac() override
Definition: lr-wpan-mac.cc:219
bool m_macRxOnWhenIdle
Indication of whether the MAC sublayer is to enable its receiver during idle periods.
Definition: lr-wpan-mac.h:1268
bool m_macAssociationPermit
Indication of whether a coordinator is currently allowing association.
Definition: lr-wpan-mac.h:1287
TracedCallback< Ptr< const Packet > > m_macTxOkTrace
The trace source fired when packets where successfully transmitted, that is an acknowledgment was rec...
Definition: lr-wpan-mac.h:1741
void SetMlmeBeaconNotifyIndicationCallback(MlmeBeaconNotifyIndicationCallback c)
Set the callback for the indication of an incoming beacon packet.
uint64_t m_rxBeaconSymbols
The total size of the received beacon in symbols.
Definition: lr-wpan-mac.h:1198
void SetRxOnWhenIdle(bool rxOnWhenIdle)
Set if the receiver should be enabled when the MAC is idle.
Definition: lr-wpan-mac.cc:289
uint64_t GetTxPacketSymbols()
Obtain the number of symbols in the packet which is currently being sent by the MAC layer.
bool m_panCoor
Indication of whether the current device is the PAN coordinator.
Definition: lr-wpan-mac.h:1311
void SetMlmeAssociateIndicationCallback(MlmeAssociateIndicationCallback c)
Set the callback for the indication of an incoming associate request command.
void PlmeSetTRXStateConfirm(LrWpanPhyEnumeration status)
IEEE 802.15.4-2006 section 6.2.2.8 PLME-SET-TRX-STATE.confirm Set PHY state.
uint8_t m_numCsmacaRetry
The number of CSMA/CA retries used for sending the current packet.
Definition: lr-wpan-mac.h:2025
void MlmeSyncRequest(MlmeSyncRequestParams params)
IEEE 802.15.4-2011, section 6.2.13.1 MLME-SYNC.request Request to synchronize with the coordinator by...
Definition: lr-wpan-mac.cc:772
static TypeId GetTypeId()
Get the type ID.
Definition: lr-wpan-mac.cc:50
MlmeStartConfirmCallback m_mlmeStartConfirmCallback
This callback is used to report the start of a new PAN or the begin of a new superframe configuration...
Definition: lr-wpan-mac.h:1884
uint8_t m_deviceCapability
Indication of current device capability (FFD or RFD)
Definition: lr-wpan-mac.h:1340
void AwaitBeacon()
Called after the end of an INCOMING superframe to start the moment a device waits for a new incoming ...
void LostAssocRespCommand()
Called after m_assocRespCmdWaitTime timeout while waiting for an association response command.
bool isCoordDest()
Check if the packet destination is its coordinator.
EventId m_trackingEvent
Scheduler event to track the incoming beacons.
Definition: lr-wpan-mac.h:2081
void SetMlmeScanConfirmCallback(MlmeScanConfirmCallback c)
Set the callback for the confirmation of a data transmission request.
uint32_t m_maxIndTxQueueSize
The maximum size of the indirect transmit queue (The pending transaction list).
Definition: lr-wpan-mac.h:1974
EventId m_assocResCmdWaitTimeout
Scheduler event for the lost of a association response command frame.
Definition: lr-wpan-mac.h:2041
void PurgeInd()
Purge expired transactions from the pending transactions list.
bool GetRxOnWhenIdle()
Check if the receiver will be enabled when the MAC is idle.
Definition: lr-wpan-mac.cc:283
void SetMlmePollConfirmCallback(MlmePollConfirmCallback c)
Set the callback for the confirmation of a data transmission request.
void RemoveFirstTxQElement()
Remove the tip of the transmission queue, including clean up related to the last packet transmission.
void PlmeEdConfirm(LrWpanPhyEnumeration status, uint8_t energyLevel)
IEEE 802.15.4-2006 section 6.2.2.4 PLME-ED.confirm status and energy level.
TracedCallback< Ptr< const Packet > > m_macRxTrace
The trace source fired for packets successfully received by the device immediately before being forwa...
Definition: lr-wpan-mac.h:1775
TracedCallback< Ptr< const Packet > > m_promiscSnifferTrace
A trace source that emulates a promiscuous mode protocol sniffer connected to the device.
Definition: lr-wpan-mac.h:1824
void SetExtendedAddress(Mac64Address address)
Set the extended address of this MAC.
Definition: lr-wpan-mac.cc:315
void MlmeStartRequest(MlmeStartRequestParams params)
IEEE 802.15.4-2006, section 7.1.14.1 MLME-START.request Request to allow a PAN coordinator to initiat...
Definition: lr-wpan-mac.cc:537
uint32_t m_macLIFSPeriod
The minimum time forming a Long InterFrame Spacing (LIFS) period.
Definition: lr-wpan-mac.h:1274
void StartInactivePeriod(SuperframeType superframeType)
Start the Inactive Period in a beacon-enabled mode.
TracedCallback< Ptr< const Packet > > m_macTxDropTrace
The trace source fired when packets are dropped due to missing ACKs or because of transmission failur...
Definition: lr-wpan-mac.h:1749
void SetMcpsDataIndicationCallback(McpsDataIndicationCallback c)
Set the callback for the indication of an incoming data packet.
TracedCallback< Ptr< const Packet > > m_macIndTxDequeueTrace
The trace source fired when packets are dequeued from the L3/l2 indirect transmission queue (Pending ...
Definition: lr-wpan-mac.h:1725
TracedCallback< Ptr< const Packet > > m_macIndTxDropTrace
The trace source fired when packets are dropped due to indirect Tx queue overflows or expiration.
Definition: lr-wpan-mac.h:1757
void SetMlmeAssociateConfirmCallback(MlmeAssociateConfirmCallback c)
Set the callback for the confirmation of a data transmission request.
MlmeScanConfirmCallback m_mlmeScanConfirmCallback
This callback is used to report the result of a scan on a group of channels for the selected channel ...
Definition: lr-wpan-mac.h:1863
Mac16Address GetShortAddress() const
Get the short address of this MAC.
Definition: lr-wpan-mac.cc:322
void SendDataRequestCommand()
Used to send a data request command (i.e.
Definition: lr-wpan-mac.cc:977
void SetMlmeStartConfirmCallback(MlmeStartConfirmCallback c)
Set the callback for the confirmation of a data transmission request.
SuperframeField GetSuperframeField()
Constructs a Superframe specification field from the local information, the superframe Specification ...
EventId m_cfpEvent
Scheduler event for the end of the outgoing superframe CFP.
Definition: lr-wpan-mac.h:2066
static constexpr uint32_t aBaseSuperframeDuration
Length of a superframe in symbols.
Definition: lr-wpan-mac.h:742
uint8_t m_macMaxFrameRetries
The maximum number of retries allowed after a transmission failure.
Definition: lr-wpan-mac.h:1261
Mac64Address m_macCoordExtendedAddress
The extended address of the coordinator through which the device is associated.
Definition: lr-wpan-mac.h:1159
MlmeSyncLossIndicationCallback m_mlmeSyncLossIndicationCallback
This callback is used to indicate the loss of synchronization with a coordinator.
Definition: lr-wpan-mac.h:1856
PendingPrimitiveStatus m_pendPrimitive
Indicates the pending primitive when PLME.SET operation (page or channel switch) is called from withi...
Definition: lr-wpan-mac.h:2014
MlmePollConfirmCallback m_mlmePollConfirmCallback
This callback is used to report the status after a device send data command request to the coordinato...
Definition: lr-wpan-mac.h:1877
uint8_t GetMacMaxFrameRetries() const
Get the macMaxFrameRetries attribute value.
uint16_t m_channelScanIndex
The channel list index used to obtain the current scanned channel.
Definition: lr-wpan-mac.h:2008
uint16_t GetPanId() const
Get the PAN id used by this MAC.
PendingAddrFields GetPendingAddrFields()
Constructs Pending Address Fields from the local information, the Pending Address Fields are part of ...
std::vector< PanDescriptor > m_panDescriptorList
The list of PAN descriptors accumulated during channel scans, used to select a PAN to associate.
Definition: lr-wpan-mac.h:1980
void SendBeaconRequestCommand()
Called to send a beacon request command.
Definition: lr-wpan-mac.cc:886
EventId m_respWaitTimeout
Scheduler event for a response to a request command frame.
Definition: lr-wpan-mac.h:2036
uint32_t m_maxTxQueueSize
The maximum size of the transmit queue.
Definition: lr-wpan-mac.h:1969
std::deque< Ptr< TxQueueElement > > m_txQueue
The transmit queue used by the MAC.
Definition: lr-wpan-mac.h:1958
SequenceNumber8 m_macBsn
Sequence number added to transmitted beacon frame, 00-ff.
Definition: lr-wpan-mac.h:1255
LrWpanAssociationStatus m_associationStatus
The current association status of the MAC layer.
Definition: lr-wpan-mac.h:1929
Ptr< Packet > m_rxPkt
The command request packet received.
Definition: lr-wpan-mac.h:1940
TracedCallback< Ptr< const Packet > > m_macIndTxEnqueueTrace
The trace source fired when packets come into the "top" of the device at the L3/L2 transition,...
Definition: lr-wpan-mac.h:1717
void SetLrWpanMacState(LrWpanMacState macState)
CSMA-CA algorithm calls back the MAC after executing channel assessment.
Mac16Address m_shortAddress
The short address used by this MAC.
Definition: lr-wpan-mac.h:1947
uint8_t m_macSuperframeOrder
Used by a PAN coordinator or coordinator.
Definition: lr-wpan-mac.h:1181
void(* StateTracedCallback)(LrWpanMacState oldState, LrWpanMacState newState)
TracedCallback signature for LrWpanMacState change events.
Definition: lr-wpan-mac.h:1450
void SetCsmaCa(Ptr< LrWpanCsmaCa > csmaCa)
Set the CSMA/CA implementation to be used by the MAC.
void BeaconSearchTimeout()
Called if the device is unable to locate a beacon in the time set by MLME-SYNC.request.
bool isTxAckReq()
Check if the packet to transmit requires acknowledgment.
std::vector< uint8_t > m_energyDetectList
The list of energy measurements, one for each channel searched during an ED scan.
Definition: lr-wpan-mac.h:1985
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 M...
void SendOneBeacon()
Called to send a single beacon frame.
Definition: lr-wpan-mac.cc:826
Time m_macBeaconTxTime
The time that the device transmitted its last beacon frame.
Definition: lr-wpan-mac.h:1120
MlmeBeaconNotifyIndicationCallback m_mlmeBeaconNotifyIndicationCallback
This callback is used to notify incoming beacon packets to the upper layers.
Definition: lr-wpan-mac.h:1850
void EndStartRequest()
Called to end a MLME-START.request after changing the page and channel number.
TracedCallback< LrWpanMacState, LrWpanMacState > m_macStateLogger
A trace source that fires when the LrWpanMac changes states.
Definition: lr-wpan-mac.h:1834
Mac64Address GetExtendedAddress() const
Get the extended address of this MAC.
Definition: lr-wpan-mac.cc:329
EventId m_setMacState
Scheduler event for a deferred MAC state change.
Definition: lr-wpan-mac.h:2046
uint64_t m_macResponseWaitTime
The maximum time, in multiples of aBaseSuperframeDuration, a device shall wait for a response command...
Definition: lr-wpan-mac.h:1135
void EnqueueInd(Ptr< Packet > p)
Adds a packet to the pending transactions list (Indirect transmissions).
void SendAssocResponseCommand(Ptr< Packet > rxDataReqPkt)
Called to send an associate response command.
void StartCFP(SuperframeType superframeType)
Called to begin the Contention Free Period (CFP) in a beacon-enabled mode.
EventId m_scanEnergyEvent
Scheduler event for the end of a ED channel scan.
Definition: lr-wpan-mac.h:2091
void SetMcpsDataConfirmCallback(McpsDataConfirmCallback c)
Set the callback for the confirmation of a data transmission request.
bool PrepareRetransmission()
Check for remaining retransmissions for the packet currently being sent.
void SetAssociationStatus(LrWpanAssociationStatus status)
Set the current association status.
static constexpr uint32_t aMaxSIFSFrameSize
The maximum size of an MPDU, in octets, that can be followed by a Short InterFrame Spacing (SIFS) per...
Definition: lr-wpan-mac.h:757
void MlmeAssociateRequest(MlmeAssociateRequestParams params)
IEEE 802.15.4-2011, section 6.2.2.1 MLME-ASSOCIATE.request Request primitive used by a device to requ...
Definition: lr-wpan-mac.cc:635
void EnqueueTxQElement(Ptr< TxQueueElement > txQElement)
Add an element to the transmission queue.
void SetPanId(uint16_t panId)
Set the PAN id used by this MAC.
EventId m_scanEvent
Scheduler event for the end of a channel scan.
Definition: lr-wpan-mac.h:2086
TracedCallback< Ptr< const Packet > > m_snifferTrace
A trace source that emulates a non-promiscuous protocol sniffer connected to the device.
Definition: lr-wpan-mac.h:1804
uint8_t m_incomingBeaconOrder
The beaconOrder value of the INCOMING frame.
Definition: lr-wpan-mac.h:1210
SequenceNumber8 m_macDsn
Sequence number added to transmitted data or MAC command frame, 00-ff.
Definition: lr-wpan-mac.h:1249
void SetMlmeSyncLossIndicationCallback(MlmeSyncLossIndicationCallback c)
Set the callback for the loss of synchronization with a coordinator.
uint32_t m_ifs
The value of the necessary InterFrame Space after the transmission of a packet.
Definition: lr-wpan-mac.h:1306
uint16_t m_macTransactionPersistenceTime
The maximum time (in UNIT periods) that a transaction is stored by a coordinator and indicated in its...
Definition: lr-wpan-mac.h:1192
Mac16Address GetCoordShortAddress() const
Get the coordinator short address currently associated to this device.
void ChangeMacState(LrWpanMacState newState)
Change the current MAC state to the given new state.
void(* SentTracedCallback)(Ptr< const Packet > packet, uint8_t retries, uint8_t backoffs)
TracedCallback signature for sent packets.
Definition: lr-wpan-mac.h:1439
void PlmeGetAttributeConfirm(LrWpanPhyEnumeration status, LrWpanPibAttributeIdentifier id, LrWpanPhyPibAttributes *attribute)
IEEE 802.15.4-2006 section 6.2.2.6 PLME-GET.confirm Get attributes per definition from Table 23 in se...
MlmeStartRequestParams m_startParams
The parameters used during a MLME-START.request.
Definition: lr-wpan-mac.h:1997
void AckWaitTimeout()
Handle an ACK timeout with a packet retransmission, if there are retransmission left,...
void MlmeScanRequest(MlmeScanRequestParams params)
IEEE 802.15.4-2011, section 6.2.10.1 MLME-SCAN.request Request primitive used to initiate a channel s...
Definition: lr-wpan-mac.cc:576
LrWpanAssociationStatus GetAssociationStatus() const
Get the current association status.
Mac64Address GetCoordExtAddress() const
Get the coordinator extended address currently associated to this device.
uint8_t m_macBeaconOrder
Used by a PAN coordinator or coordinator.
Definition: lr-wpan-mac.h:1173
TracedCallback< Time > m_macIfsEndTrace
The trace source is fired at the end of any Interframe Space (IFS).
Definition: lr-wpan-mac.h:1681
TracedValue< SuperframeStatus > m_outSuperframeStatus
The current period of the outgoing superframe.
Definition: lr-wpan-mac.h:1924
static constexpr uint32_t aNumSuperframeSlots
Number of a superframe slots per superframe.
Definition: lr-wpan-mac.h:735
void PlmeSetAttributeConfirm(LrWpanPhyEnumeration status, LrWpanPibAttributeIdentifier id)
IEEE 802.15.4-2006 section 6.2.2.10 PLME-SET.confirm Set attributes per definition from Table 23 in s...
void SetMlmeCommStatusIndicationCallback(MlmeCommStatusIndicationCallback c)
Set the callback for the indication to a response primitive.
bool DequeueInd(Mac64Address dst, Ptr< IndTxQueueElement > entry)
Extracts a packet from pending transactions list (Indirect transmissions).
MlmeAssociateRequestParams m_associateParams
The parameters used during a MLME-ASSOCIATE.request.
Definition: lr-wpan-mac.h:2003
LrWpanMac()
Default constructor.
Definition: lr-wpan-mac.cc:161
void CheckQueue()
Check the transmission queue.
EventId m_ackWaitTimeout
Scheduler event for the ACK timeout of the currently transmitted data packet.
Definition: lr-wpan-mac.h:2031
MlmeAssociateConfirmCallback m_mlmeAssociateConfirmCallback
This callback is used to report the status after a device request an association with a coordinator.
Definition: lr-wpan-mac.h:1870
bool m_macPromiscuousMode
Indicates if MAC sublayer is in receive all mode.
Definition: lr-wpan-mac.h:1230
uint8_t m_fnlCapSlot
Indication of the Slot where the CAP portion of the OUTGOING Superframe ends.
Definition: lr-wpan-mac.h:1203
uint32_t m_macSIFSPeriod
The minimum time forming a Short InterFrame Spacing (SIFS) period.
Definition: lr-wpan-mac.h:1280
void IfsWaitTimeout(Time ifsTime)
After a successful transmission of a frame (beacon, data) or an ack frame reception,...
std::deque< Ptr< IndTxQueueElement > > m_indTxQueue
The indirect transmit queue used by the MAC pending messages (The pending transaction list).
Definition: lr-wpan-mac.h:1964
uint32_t m_beaconInterval
Indication of the Interval used by the coordinator to transmit beacon frames expressed in symbols.
Definition: lr-wpan-mac.h:1317
static constexpr uint32_t aMaxLostBeacons
The number of consecutive lost beacons that will cause the MAC sublayer of a receiving device to decl...
Definition: lr-wpan-mac.h:750
TracedValue< LrWpanMacState > m_lrWpanMacState
The current state of the MAC layer.
Definition: lr-wpan-mac.h:1914
TracedCallback< Ptr< const Packet > > m_macTxEnqueueTrace
The trace source fired when packets come into the "top" of the device at the L3/L2 transition,...
Definition: lr-wpan-mac.h:1701
EventId m_capEvent
Scheduler event for the end of the outgoing superframe CAP.
Definition: lr-wpan-mac.h:2061
TracedCallback< Ptr< const Packet > > m_macTxTrace
The trace source fired when packets are being sent down to L1.
Definition: lr-wpan-mac.h:1732
uint16_t m_macPanId
16 bits id of PAN on which this device is operating.
Definition: lr-wpan-mac.h:1237
void EndChannelScan()
Called at the end of the current channel scan (Active or Passive) for a given duration.
void DoInitialize() override
Initialize() implementation.
Definition: lr-wpan-mac.cc:224
void MlmeAssociateResponse(MlmeAssociateResponseParams params)
IEEE 802.15.4-2011, section 6.2.2.3 MLME-ASSOCIATE.response Primitive used to initiate a response to ...
Definition: lr-wpan-mac.cc:710
void PrintTxQueue(std::ostream &os) const
Print the Transmit Queue.
TracedCallback< Ptr< const Packet > > m_macRxDropTrace
The trace source fired for packets successfully received by the device but dropped before being forwa...
Definition: lr-wpan-mac.h:1784
bool m_macAutoRequest
Indication of whether a device automatically sends data request command if its address is listed in t...
Definition: lr-wpan-mac.h:1296
uint8_t m_incomingSuperframeOrder
Used by all devices that have a parent.
Definition: lr-wpan-mac.h:1218
uint16_t m_macPanIdScan
Temporally stores the value of the current m_macPanId when a MLME-SCAN.request is performed.
Definition: lr-wpan-mac.h:1243
static constexpr uint32_t aBaseSlotDuration
Length of a superframe slot in symbols.
Definition: lr-wpan-mac.h:729
TracedCallback< Ptr< const Packet > > m_macTxDequeueTrace
The trace source fired when packets are dequeued from the L3/l2 transmission queue.
Definition: lr-wpan-mac.h:1709
void PdDataConfirm(LrWpanPhyEnumeration status)
IEEE 802.15.4-2006 section 6.2.1.2 Confirm the end of transmission of an MPDU to MAC.
uint8_t m_numLostBeacons
The number of consecutive loss beacons in a beacon tracking operation.
Definition: lr-wpan-mac.h:1350
Ptr< Packet > m_txPkt
The packet which is currently being sent by the MAC layer.
Definition: lr-wpan-mac.h:1934
void McpsDataRequest(McpsDataRequestParams params, Ptr< Packet > p)
IEEE 802.15.4-2006, section 7.1.1.1 MCPS-DATA.request Request to transfer a MSDU.
Definition: lr-wpan-mac.cc:336
void SendAssocRequestCommand()
Called to send an associate request command.
Definition: lr-wpan-mac.cc:928
uint8_t m_maxEnergyLevel
The maximum energy level detected during ED scan on the current channel.
Definition: lr-wpan-mac.h:1301
void DoDispose() override
Destructor implementation.
Definition: lr-wpan-mac.cc:239
MlmeScanRequestParams m_scanParams
The parameters used during a MLME-SCAN.request.
Definition: lr-wpan-mac.h:1991
MlmeAssociateIndicationCallback m_mlmeAssociateIndicationCallback
This callback is used to indicate the reception of an association request command.
Definition: lr-wpan-mac.h:1896
static constexpr uint32_t aMinMPDUOverhead
The minimum number of octets added by the MAC sublayer to the PSDU.
Definition: lr-wpan-mac.h:722
void SetPhy(Ptr< LrWpanPhy > phy)
Set the underlying PHY for the MAC.
Ptr< LrWpanPhy > GetPhy()
Get the underlying PHY of the MAC.
void EndAssociateRequest()
Called to end an MLME-ASSOCIATE.request after changing the page and channel number.
Definition: lr-wpan-mac.cc:690
Mac64Address m_selfExt
The extended address used by this MAC.
Definition: lr-wpan-mac.h:1953
EventId m_incCapEvent
Scheduler event for the end of the incoming superframe CAP.
Definition: lr-wpan-mac.h:2071
void SetTxQMaxSize(uint32_t queueSize)
Set the max size of the transmit queue.
void SetIndTxQMaxSize(uint32_t queueSize)
Set the max size of the indirect transmit queue (Pending Transaction list)
McpsDataIndicationCallback m_mcpsDataIndicationCallback
This callback is used to notify incoming packets to the upper layers.
Definition: lr-wpan-mac.h:1890
bool m_beaconTrackingOn
Indication of whether the current device is tracking incoming beacons.
Definition: lr-wpan-mac.h:1345
uint32_t m_superframeDuration
Indication of the superframe duration in symbols.
Definition: lr-wpan-mac.h:1323
Mac16Address m_macCoordShortAddress
The short address of the coordinator through which the device is associated.
Definition: lr-wpan-mac.h:1152
GtsFields GetGtsFields()
Constructs the Guaranteed Time Slots (GTS) Fields from local information.
Ptr< LrWpanPhy > m_phy
The PHY associated with this MAC.
Definition: lr-wpan-mac.h:1839
void EndChannelEnergyScan()
Called at the end of one ED channel scan.
uint64_t m_macSyncSymbolOffset
Symbol boundary is same as m_macBeaconTxTime.
Definition: lr-wpan-mac.h:1165
void PrintTransmitQueueSize()
Print the number of elements in the packet transmit queue.
void PrintPendTxQ(std::ostream &os) const
Print the Pending transaction list.
void StartCAP(SuperframeType superframeType)
Called to begin the Contention Access Period (CAP) in a beacon-enabled mode.
TracedCallback< Ptr< const Packet > > m_macPromiscRxTrace
The trace source fired for packets successfully received by the device immediately before being forwa...
Definition: lr-wpan-mac.h:1766
void MlmePollRequest(MlmePollRequestParams params)
IEEE 802.15.4-2011, section 6.2.14.2 MLME-POLL.request Prompts the device to request data from the co...
Definition: lr-wpan-mac.cc:811
EventId m_ifsEvent
Scheduler event for Interframe spacing wait time.
Definition: lr-wpan-mac.h:2051
EventId m_beaconEvent
Scheduler event for generation of one beacon.
Definition: lr-wpan-mac.h:2056
uint32_t m_incomingSuperframeDuration
Indication of the superframe duration in symbols (e.g.
Definition: lr-wpan-mac.h:1335
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 ...
Definition: lr-wpan-mac.h:1693
void RemovePendTxQElement(Ptr< Packet > p)
Remove an element from the pending transaction list.
void SetShortAddress(Mac16Address address)
Set the short address of this MAC.
Definition: lr-wpan-mac.cc:308
void SetMacMaxFrameRetries(uint8_t retries)
Set the macMaxFrameRetries attribute value.
uint8_t m_retransmission
The number of already used retransmission for the currently transmitted packet.
Definition: lr-wpan-mac.h:2020
EventId m_incCfpEvent
Scheduler event for the end of the incoming superframe CFP.
Definition: lr-wpan-mac.h:2076
void SendAck(uint8_t seqno)
Send an acknowledgment packet for the given sequence number.
uint8_t m_incomingFnlCapSlot
Indication of the Slot where the CAP portion of the INCOMING Superframe ends.
Definition: lr-wpan-mac.h:1223
MlmeCommStatusIndicationCallback m_mlmeCommStatusIndicationCallback
This callback is instigated through a response primitive.
Definition: lr-wpan-mac.h:1902
TracedValue< SuperframeStatus > m_incSuperframeStatus
The current period of the incoming superframe.
Definition: lr-wpan-mac.h:1919
void SetAssociatedCoor(Mac16Address mac)
Check if the packet destination is its coordinator.
This class can contain 16 bit addresses.
Definition: mac16-address.h:44
an EUI-64 address
Definition: mac64-address.h:46
A base class which provides memory management and object aggregation.
Definition: object.h:89
Represent the Pending Address Specification field.
A template-based reference counting class.
Represent the Superframe Specification information field.
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
Forward calls to a chain of Callback.
a unique identifier for an interface.
Definition: type-id.h:60
Callback< void, McpsDataConfirmParams > McpsDataConfirmCallback
This callback is called after a McpsDataRequest has been called from the higher layer.
Definition: lr-wpan-mac.h:610
LrWpanMlmePollConfirmStatus
Table 39 of IEEE 802.15.4-2011.
Definition: lr-wpan-mac.h:300
LrWpanMacState
MAC states.
Definition: lr-wpan-mac.h:73
Callback< void, McpsDataIndicationParams, Ptr< Packet > > McpsDataIndicationCallback
This callback is called after a Mcps has successfully received a frame and wants to deliver it to the...
Definition: lr-wpan-mac.h:621
Callback< void, MlmeStartConfirmParams > MlmeStartConfirmCallback
This callback is called after a MlmeStartRequest has been called from the higher layer.
Definition: lr-wpan-mac.h:630
Callback< void, MlmeScanConfirmParams > MlmeScanConfirmCallback
This callback is called after a MlmeScanRequest has been called from the higher layer.
Definition: lr-wpan-mac.h:670
LrWpanMlmeScanType
Table 30 of IEEE 802.15.4-2011.
Definition: lr-wpan-mac.h:180
LrWpanMcpsDataConfirmStatus
Table 42 of 802.15.4-2006.
Definition: lr-wpan-mac.h:193
LrWpanMlmeScanConfirmStatus
Table 31 of IEEE 802.15.4-2011.
Definition: lr-wpan-mac.h:233
SuperframeStatus
Superframe status.
Definition: lr-wpan-mac.h:92
LrWpanPhyEnumeration
IEEE802.15.4-2006 PHY Emumerations Table 18 in section 6.2.3.
Definition: lr-wpan-phy.h:109
LrWpanTxOption
Tx options.
Definition: lr-wpan-mac.h:60
LrWpanAssociationStatus
table 83 of 802.15.4
Definition: lr-wpan-mac.h:166
Callback< void, MlmeAssociateIndicationParams > MlmeAssociateIndicationCallback
This callback is called after a Mlme has successfully received a command frame and wants to deliver i...
Definition: lr-wpan-mac.h:690
Callback< void, MlmePollConfirmParams > MlmePollConfirmCallback
This callback is called after a Mlme-Poll.Request has been called from the higher layer.
Definition: lr-wpan-mac.h:662
LrWpanMlmeStartConfirmStatus
Table 35 of IEEE 802.15.4-2011.
Definition: lr-wpan-mac.h:214
PendingPrimitiveStatus
Indicates a pending MAC primitive.
Definition: lr-wpan-mac.h:116
LrWpanAddressMode
table 80 of 802.15.4
Definition: lr-wpan-mac.h:153
Callback< void, MlmeAssociateConfirmParams > MlmeAssociateConfirmCallback
This callback is called after a MlmeAssociateRequest has been called from the higher layer.
Definition: lr-wpan-mac.h:679
LrWpanMlmeAssociateConfirmStatus
Table 12 of IEEE 802.15.4-2011.
Definition: lr-wpan-mac.h:251
SuperframeType
Superframe type.
Definition: lr-wpan-mac.h:105
LrWpanMlmeCommStatus
Table 18 of IEEE 802.15.4-2011.
Definition: lr-wpan-mac.h:283
Callback< void, MlmeBeaconNotifyIndicationParams, Ptr< Packet > > MlmeBeaconNotifyIndicationCallback
This callback is called after a Mlme has successfully received a beacon frame and wants to deliver it...
Definition: lr-wpan-mac.h:642
Callback< void, MlmeSyncLossIndicationParams > MlmeSyncLossIndicationCallback
This callback is called to indicate the loss of synchronization with a coordinator.
Definition: lr-wpan-mac.h:653
LrWpanPibAttributeIdentifier
IEEE802.15.4-2006 PHY PIB Attribute Identifiers Table 23 in section 6.4.2.
Definition: lr-wpan-phy.h:143
Callback< void, MlmeCommStatusIndicationParams > MlmeCommStatusIndicationCallback
This callback is called by the MLME and issued to its next higher layer following a transmission inst...
Definition: lr-wpan-mac.h:701
LrWpanSyncLossReason
Table 37 of IEEE 802.15.4-2011.
Definition: lr-wpan-mac.h:270
@ MLMEPOLL_UNSUPPORTED_SECURITY
Definition: lr-wpan-mac.h:308
@ MLMEPOLL_SUCCESS
Definition: lr-wpan-mac.h:301
@ MLMEPOLL_NO_DATA
Definition: lr-wpan-mac.h:304
@ MLMEPOLL_FRAME_TOO_LONG
Definition: lr-wpan-mac.h:306
@ MLMEPOLL_COUNTER_ERROR
Definition: lr-wpan-mac.h:305
@ MLMEPOLL_INVALID_PARAMETER
Definition: lr-wpan-mac.h:309
@ MLMEPOLL_NO_ACK
Definition: lr-wpan-mac.h:303
@ MLMEPOLL_CHANNEL_ACCESS_FAILURE
Definition: lr-wpan-mac.h:302
@ MLMEPOLL_UNAVAILABLE_KEY
Definition: lr-wpan-mac.h:307
@ CHANNEL_ACCESS_FAILURE
CHANNEL_ACCESS_FAILURE.
Definition: lr-wpan-mac.h:78
@ MAC_IDLE
MAC_IDLE.
Definition: lr-wpan-mac.h:74
@ MAC_CSMA_DEFERRED
MAC_CSMA_DEFERRED.
Definition: lr-wpan-mac.h:83
@ MAC_CSMA
MAC_CSMA.
Definition: lr-wpan-mac.h:75
@ CHANNEL_IDLE
CHANNEL_IDLE.
Definition: lr-wpan-mac.h:79
@ MAC_GTS
MAC_GTS.
Definition: lr-wpan-mac.h:81
@ SET_PHY_TX_ON
SET_PHY_TX_ON.
Definition: lr-wpan-mac.h:80
@ MAC_INACTIVE
MAC_INACTIVE.
Definition: lr-wpan-mac.h:82
@ MAC_SENDING
MAC_SENDING.
Definition: lr-wpan-mac.h:76
@ MAC_ACK_PENDING
MAC_ACK_PENDING.
Definition: lr-wpan-mac.h:77
@ MLMESCAN_ED
Definition: lr-wpan-mac.h:181
@ MLMESCAN_PASSIVE
Definition: lr-wpan-mac.h:183
@ MLMESCAN_ORPHAN
Definition: lr-wpan-mac.h:184
@ MLMESCAN_ACTIVE
Definition: lr-wpan-mac.h:182
@ IEEE_802_15_4_TRANSACTION_OVERFLOW
Definition: lr-wpan-mac.h:195
@ IEEE_802_15_4_INVALID_GTS
Definition: lr-wpan-mac.h:199
@ IEEE_802_15_4_UNSUPPORTED_SECURITY
Definition: lr-wpan-mac.h:204
@ IEEE_802_15_4_NO_ACK
Definition: lr-wpan-mac.h:200
@ IEEE_802_15_4_CHANNEL_ACCESS_FAILURE
Definition: lr-wpan-mac.h:197
@ IEEE_802_15_4_INVALID_ADDRESS
Definition: lr-wpan-mac.h:198
@ IEEE_802_15_4_INVALID_PARAMETER
Definition: lr-wpan-mac.h:205
@ IEEE_802_15_4_COUNTER_ERROR
Definition: lr-wpan-mac.h:201
@ IEEE_802_15_4_SUCCESS
Definition: lr-wpan-mac.h:194
@ IEEE_802_15_4_FRAME_TOO_LONG
Definition: lr-wpan-mac.h:202
@ IEEE_802_15_4_TRANSACTION_EXPIRED
Definition: lr-wpan-mac.h:196
@ IEEE_802_15_4_UNAVAILABLE_KEY
Definition: lr-wpan-mac.h:203
@ MLMESCAN_UNAVAILABLE_KEY
Definition: lr-wpan-mac.h:240
@ MLMESCAN_NO_BEACON
Definition: lr-wpan-mac.h:236
@ MLMESCAN_UNSUPPORTED_SECURITY
Definition: lr-wpan-mac.h:241
@ MLMESCAN_FRAME_TOO_LONG
Definition: lr-wpan-mac.h:239
@ MLMESCAN_COUNTER_ERROR
Definition: lr-wpan-mac.h:238
@ MLMESCAN_LIMIT_REACHED
Definition: lr-wpan-mac.h:235
@ MLMESCAN_SUCCESS
Definition: lr-wpan-mac.h:234
@ MLMESCAN_SCAN_IN_PROGRESS
Definition: lr-wpan-mac.h:237
@ MLMESCAN_INVALID_PARAMETER
Definition: lr-wpan-mac.h:242
@ CFP
Contention Free Period.
Definition: lr-wpan-mac.h:95
@ INACTIVE
Inactive Period or unslotted CSMA-CA.
Definition: lr-wpan-mac.h:96
@ CAP
Contention Access Period.
Definition: lr-wpan-mac.h:94
@ BEACON
The Beacon transmission or reception Period.
Definition: lr-wpan-mac.h:93
@ TX_OPTION_ACK
TX_OPTION_ACK.
Definition: lr-wpan-mac.h:62
@ TX_OPTION_INDIRECT
TX_OPTION_INDIRECT.
Definition: lr-wpan-mac.h:64
@ TX_OPTION_NONE
TX_OPTION_NONE.
Definition: lr-wpan-mac.h:61
@ TX_OPTION_GTS
TX_OPTION_GTS.
Definition: lr-wpan-mac.h:63
@ ASSOCIATED
Definition: lr-wpan-mac.h:167
@ PAN_ACCESS_DENIED
Definition: lr-wpan-mac.h:169
@ ASSOCIATED_WITHOUT_ADDRESS
Definition: lr-wpan-mac.h:170
@ PAN_AT_CAPACITY
Definition: lr-wpan-mac.h:168
@ DISASSOCIATED
Definition: lr-wpan-mac.h:171
@ MLMESTART_UNSUPPORTED_SECURITY
Definition: lr-wpan-mac.h:223
@ MLMESTART_SUPERFRAME_OVERLAP
Definition: lr-wpan-mac.h:217
@ MLMESTART_INVALID_PARAMETER
Definition: lr-wpan-mac.h:219
@ MLMESTART_TRACKING_OFF
Definition: lr-wpan-mac.h:218
@ MLMESTART_CHANNEL_ACCESS_FAILURE
Definition: lr-wpan-mac.h:224
@ MLMESTART_FRAME_TOO_LONG
Definition: lr-wpan-mac.h:221
@ MLMESTART_UNAVAILABLE_KEY
Definition: lr-wpan-mac.h:222
@ MLMESTART_SUCCESS
Definition: lr-wpan-mac.h:215
@ MLMESTART_COUNTER_ERROR
Definition: lr-wpan-mac.h:220
@ MLMESTART_NO_SHORT_ADDRESS
Definition: lr-wpan-mac.h:216
@ MLME_SCAN_REQ
Pending MLME-SCAN.request primitive.
Definition: lr-wpan-mac.h:119
@ MLME_ASSOC_REQ
Pending MLME-ASSOCIATION.request primitive.
Definition: lr-wpan-mac.h:120
@ MLME_SYNC_REQ
Pending MLME-SYNC.request primitive.
Definition: lr-wpan-mac.h:121
@ MLME_START_REQ
Pending MLME-START.request primitive.
Definition: lr-wpan-mac.h:118
@ MLME_NONE
No pending primitive.
Definition: lr-wpan-mac.h:117
@ SHORT_ADDR
Definition: lr-wpan-mac.h:156
@ NO_PANID_ADDR
Definition: lr-wpan-mac.h:154
@ EXT_ADDR
Definition: lr-wpan-mac.h:157
@ ADDR_MODE_RESERVED
Definition: lr-wpan-mac.h:155
@ MLMEASSOC_NO_DATA
Definition: lr-wpan-mac.h:257
@ MLMEASSOC_ACCESS_DENIED
Definition: lr-wpan-mac.h:254
@ MLMEASSOC_COUNTER_ERROR
Definition: lr-wpan-mac.h:258
@ MLMEASSOC_CHANNEL_ACCESS_FAILURE
Definition: lr-wpan-mac.h:255
@ MLMEASSOC_SUCCESS
Definition: lr-wpan-mac.h:252
@ MLMEASSOC_INVALID_PARAMETER
Definition: lr-wpan-mac.h:261
@ MLMEASSOC_FRAME_TOO_LONG
Definition: lr-wpan-mac.h:259
@ MLMEASSOC_NO_ACK
Definition: lr-wpan-mac.h:256
@ MLMEASSOC_UNSUPPORTED_LEGACY
Definition: lr-wpan-mac.h:260
@ MLMEASSOC_FULL_CAPACITY
Definition: lr-wpan-mac.h:253
@ INCOMING
Incoming Superframe.
Definition: lr-wpan-mac.h:107
@ OUTGOING
Outgoing Superframe.
Definition: lr-wpan-mac.h:106
@ MLMECOMMSTATUS_SUCCESS
Definition: lr-wpan-mac.h:284
@ MLMECOMMSTATUS_TRANSACTION_OVERFLOW
Definition: lr-wpan-mac.h:285
@ MLMECOMMSTATUS_FRAME_TOO_LONG
Definition: lr-wpan-mac.h:290
@ MLMECOMMSTATUS_COUNTER_ERROR
Definition: lr-wpan-mac.h:289
@ MLMECOMMSTATUS_INVALID_PARAMETER
Definition: lr-wpan-mac.h:291
@ MLMECOMMSTATUS_TRANSACTION_EXPIRED
Definition: lr-wpan-mac.h:286
@ MLMECOMMSTATUS_CHANNEL_ACCESS_FAILURE
Definition: lr-wpan-mac.h:287
@ MLMECOMMSTATUS_NO_ACK
Definition: lr-wpan-mac.h:288
@ MLMESYNCLOSS_SUPERFRAME_OVERLAP
Definition: lr-wpan-mac.h:274
@ MLMESYNCLOSS_PAN_ID_CONFLICT
Definition: lr-wpan-mac.h:271
@ MLMESYNCLOSS_REALIGMENT
Definition: lr-wpan-mac.h:272
@ MLMESYNCLOSS_BEACON_LOST
Definition: lr-wpan-mac.h:273
address
Definition: first.py:40
Every class exported by the ns3 library is enclosed in the ns3 namespace.
mac
Definition: third.py:85
phy
Definition: third.py:82
Helper structure for managing pending transaction list elements (Indirect transmissions).
Definition: lr-wpan-mac.h:1471
Time expireTime
The expiration time of the packet in the indirect transmission queue.
Definition: lr-wpan-mac.h:1476
Mac64Address dstExtAddress
The destination extended Mac Address.
Definition: lr-wpan-mac.h:1474
uint8_t seqNum
The sequence number of the queued packet.
Definition: lr-wpan-mac.h:1472
Mac16Address dstShortAddress
The destination short Mac Address.
Definition: lr-wpan-mac.h:1473
Ptr< Packet > txQPkt
Queued packet.
Definition: lr-wpan-mac.h:1475
Helper structure for managing transmission queue elements.
Definition: lr-wpan-mac.h:1462
Ptr< Packet > txQPkt
Queued packet.
Definition: lr-wpan-mac.h:1464
uint8_t txQMsduHandle
MSDU Handle.
Definition: lr-wpan-mac.h:1463
IEEE802.15.4-2006 PHY PIB Attributes Table 23 in section 6.4.2.
Definition: lr-wpan-phy.h:160
MCPS-DATA.confirm params.
Definition: lr-wpan-mac.h:361
LrWpanMcpsDataConfirmStatus m_status
The status of the last MSDU transmission.
Definition: lr-wpan-mac.h:363
uint8_t m_msduHandle
MSDU handle.
Definition: lr-wpan-mac.h:362
MCPS-DATA.indication params.
Definition: lr-wpan-mac.h:373
Mac16Address m_dstAddr
Destination address.
Definition: lr-wpan-mac.h:380
uint8_t m_dstAddrMode
Destination address mode.
Definition: lr-wpan-mac.h:378
uint16_t m_dstPanId
Destination PAN identifier.
Definition: lr-wpan-mac.h:379
uint8_t m_dsn
The DSN of the received data frame.
Definition: lr-wpan-mac.h:383
uint8_t m_mpduLinkQuality
LQI value measured during reception of the MPDU.
Definition: lr-wpan-mac.h:382
uint16_t m_srcPanId
Source PAN identifier.
Definition: lr-wpan-mac.h:375
Mac64Address m_dstExtAddr
Destination extended address.
Definition: lr-wpan-mac.h:381
uint8_t m_srcAddrMode
Source address mode.
Definition: lr-wpan-mac.h:374
Mac64Address m_srcExtAddr
Source extended address.
Definition: lr-wpan-mac.h:377
Mac16Address m_srcAddr
Source address.
Definition: lr-wpan-mac.h:376
MCPS-DATA.request params.
Definition: lr-wpan-mac.h:345
LrWpanAddressMode m_srcAddrMode
Source address mode.
Definition: lr-wpan-mac.h:346
Mac64Address m_dstExtAddr
Destination extended address.
Definition: lr-wpan-mac.h:350
LrWpanAddressMode m_dstAddrMode
Destination address mode.
Definition: lr-wpan-mac.h:347
uint16_t m_dstPanId
Destination PAN identifier.
Definition: lr-wpan-mac.h:348
Mac16Address m_dstAddr
Destination address.
Definition: lr-wpan-mac.h:349
uint8_t m_msduHandle
MSDU handle.
Definition: lr-wpan-mac.h:351
uint8_t m_txOptions
Tx Options (bitfield)
Definition: lr-wpan-mac.h:352
MLME-ASSOCIATE.confirm params.
Definition: lr-wpan-mac.h:524
LrWpanMlmeAssociateConfirmStatus m_status
The status of a MLME-associate.request.
Definition: lr-wpan-mac.h:526
Mac16Address m_assocShortAddr
The short address used in the association request.
Definition: lr-wpan-mac.h:525
MLME-ASSOCIATE.indication params.
Definition: lr-wpan-mac.h:392
Mac64Address m_extDevAddr
The extended address of the device requesting association.
Definition: lr-wpan-mac.h:393
CapabilityField capabilityInfo
The operational capabilities of the device requesting association.
Definition: lr-wpan-mac.h:395
MLME-ASSOCIATE.request params.
Definition: lr-wpan-mac.h:504
uint8_t m_chNum
The channel number on which to attempt association.
Definition: lr-wpan-mac.h:505
CapabilityField m_capabilityInfo
Specifies the operational capabilities of the associating device.
Definition: lr-wpan-mac.h:515
uint8_t m_coordAddrMode
The coordinator addressing mode for this primitive and subsequent MPDU.
Definition: lr-wpan-mac.h:507
uint32_t m_chPage
The channel page on which to attempt association.
Definition: lr-wpan-mac.h:506
Mac64Address m_coordExtAddr
The extended address of the coordinator with which to associate.
Definition: lr-wpan-mac.h:513
Mac16Address m_coordShortAddr
The short address of the coordinator with which to associate.
Definition: lr-wpan-mac.h:511
uint16_t m_coordPanId
The identifier of the PAN with which to associate.
Definition: lr-wpan-mac.h:509
MLME-ASSOCIATE.response params.
Definition: lr-wpan-mac.h:404
LrWpanAssociationStatus m_status
The status of the association attempt (As defined on Table 83 IEEE 802.15.4-2006)
Definition: lr-wpan-mac.h:408
Mac16Address m_assocShortAddr
The short address allocated by the coordinator on successful assoc.
Definition: lr-wpan-mac.h:406
Mac64Address m_extDevAddr
The extended address of the device requesting association.
Definition: lr-wpan-mac.h:405
MLME-BEACON-NOTIFY.indication params.
Definition: lr-wpan-mac.h:547
uint32_t m_sduLength
The number of octets contained in the beacon payload.
Definition: lr-wpan-mac.h:550
uint8_t m_bsn
The beacon sequence number.
Definition: lr-wpan-mac.h:548
Ptr< Packet > m_sdu
The set of octets comprising the beacon payload.
Definition: lr-wpan-mac.h:551
PanDescriptor m_panDescriptor
The PAN descriptor for the received beacon.
Definition: lr-wpan-mac.h:549
MLME-COMM-STATUS.indication params.
Definition: lr-wpan-mac.h:575
Mac16Address m_srcShortAddr
The short address of the entity from which the frame causing the error originated.
Definition: lr-wpan-mac.h:579
LrWpanMlmeCommStatus m_status
The communication status.
Definition: lr-wpan-mac.h:588
Mac16Address m_dstShortAddr
The short address of the device for which the frame was intended.
Definition: lr-wpan-mac.h:585
Mac64Address m_dstExtAddr
The extended address of the device for which the frame was intended.
Definition: lr-wpan-mac.h:587
uint16_t m_panId
The PAN identifier of the device from which the frame was received or to which the frame was being se...
Definition: lr-wpan-mac.h:576
Mac64Address m_srcExtAddr
The extended address of the entity from which the frame causing the error originated.
Definition: lr-wpan-mac.h:581
uint8_t m_dstAddrMode
The destination addressing mode for this primitive.
Definition: lr-wpan-mac.h:583
uint8_t m_srcAddrMode
The source addressing mode for this primitive.
Definition: lr-wpan-mac.h:578
MLME-START.confirm params.
Definition: lr-wpan-mac.h:597
LrWpanMlmePollConfirmStatus m_status
The confirmation status resulting from a MLME-poll.request.
Definition: lr-wpan-mac.h:598
MLME-POLL.request params.
Definition: lr-wpan-mac.h:454
Mac16Address m_coorShortAddr
Coordinator short address.
Definition: lr-wpan-mac.h:458
uint16_t m_coorPanId
The PAN id of the coordinator to which the poll is intended.
Definition: lr-wpan-mac.h:457
Mac64Address m_coorExtAddr
Coordinator extended address.
Definition: lr-wpan-mac.h:459
LrWpanAddressMode m_coorAddrMode
The addressing mode of the coordinator to which the pool is intended.
Definition: lr-wpan-mac.h:455
MLME-SCAN.confirm params.
Definition: lr-wpan-mac.h:483
std::vector< PanDescriptor > m_panDescList
A list of PAN descriptor, one for each beacon found (Not valid for ED and Orphan scans).
Definition: lr-wpan-mac.h:494
LrWpanMlmeScanType m_scanType
Indicates the type of scan performed (ED,ACTIVE,PASSIVE,ORPHAN).
Definition: lr-wpan-mac.h:486
uint32_t m_chPage
The channel page on which the scan was performed.
Definition: lr-wpan-mac.h:488
std::vector< uint8_t > m_unscannedCh
A list of channels given in the request which were not scanned (Not valid for ED scans).
Definition: lr-wpan-mac.h:489
LrWpanMlmeScanConfirmStatus m_status
The status of the scan request.
Definition: lr-wpan-mac.h:484
std::vector< uint8_t > m_energyDetList
A list of energy measurements, one for each channel searched during ED scan (Not valid for Active,...
Definition: lr-wpan-mac.h:492
MLME-SCAN.request params.
Definition: lr-wpan-mac.h:468
uint32_t m_scanChannels
The channel numbers to be scanned.
Definition: lr-wpan-mac.h:471
uint32_t m_chPage
The channel page on which to perform scan.
Definition: lr-wpan-mac.h:474
uint8_t m_scanDuration
A value used to calculate the length of time to spend scanning [aBaseSuperframeDuration * (2^m_scanDu...
Definition: lr-wpan-mac.h:472
LrWpanMlmeScanType m_scanType
Indicates the type of scan performed as described in IEEE 802.15.4-2011 (5.1.2.1).
Definition: lr-wpan-mac.h:469
MLME-START.confirm params.
Definition: lr-wpan-mac.h:536
LrWpanMlmeStartConfirmStatus m_status
The status of a MLME-start.request.
Definition: lr-wpan-mac.h:537
MLME-START.request params.
Definition: lr-wpan-mac.h:418
uint32_t m_logChPage
Logical channel page on which to start using the new superframe configuration.
Definition: lr-wpan-mac.h:422
uint8_t m_logCh
Logical channel on which to start using the new superframe configuration.
Definition: lr-wpan-mac.h:420
bool m_panCoor
On true this device will become coordinator.
Definition: lr-wpan-mac.h:429
bool m_coorRealgn
True if a realignment request command is to be transmitted prior changing the superframe.
Definition: lr-wpan-mac.h:432
uint8_t m_bcnOrd
Beacon Order, Used to calculate the beacon interval, a value of 15 indicates no periodic beacons will...
Definition: lr-wpan-mac.h:426
uint32_t m_startTime
Time at which to begin transmitting beacons (Used by Coordinator not PAN Coordinators).
Definition: lr-wpan-mac.h:424
uint16_t m_PanId
Pan Identifier used by the device.
Definition: lr-wpan-mac.h:419
uint8_t m_sfrmOrd
Superframe Order, indicates the length of the CAP in time slots.
Definition: lr-wpan-mac.h:428
bool m_battLifeExt
Flag indicating whether or not the Battery life extension (BLE) features are used.
Definition: lr-wpan-mac.h:430
MLME-SYNC-LOSS.indication params.
Definition: lr-wpan-mac.h:560
uint16_t m_panId
The PAN identifier with which the device lost synchronization or to which it was realigned.
Definition: lr-wpan-mac.h:563
uint8_t m_logCh
The channel number on which the device lost synchronization or to which it was realigned.
Definition: lr-wpan-mac.h:565
LrWpanSyncLossReason m_lossReason
The reason for the lost of synchronization.
Definition: lr-wpan-mac.h:561
MLME-SYNC.request params.
Definition: lr-wpan-mac.h:442
bool m_trackBcn
True if the mlme sync with the next beacon and attempts to track future beacons.
Definition: lr-wpan-mac.h:444
uint8_t m_logCh
The channel number on which to attempt coordinator synchronization.
Definition: lr-wpan-mac.h:443
PAN Descriptor, Table 17 IEEE 802.15.4-2011.
Definition: lr-wpan-mac.h:318
LrWpanAddressMode m_coorAddrMode
The coordinator addressing mode corresponding to the received beacon frame.
Definition: lr-wpan-mac.h:319
Mac64Address m_coorExtAddr
The coordinator extended address as specified in the coordinator address mode.
Definition: lr-wpan-mac.h:325
Mac16Address m_coorShortAddr
The coordinator short address as specified in the coordinator address mode.
Definition: lr-wpan-mac.h:323
uint8_t m_logChPage
The current channel page occupied by the network.
Definition: lr-wpan-mac.h:328
uint16_t m_coorPanId
The PAN ID of the coordinator as specified in the received beacon frame.
Definition: lr-wpan-mac.h:321
bool m_gtsPermit
TRUE if the beacon is from the PAN coordinator that is accepting GTS requests.
Definition: lr-wpan-mac.h:331
SuperframeField m_superframeSpec
The superframe specification as specified in the received beacon frame.
Definition: lr-wpan-mac.h:329
uint8_t m_linkQuality
The LQI at which the network beacon was received.
Definition: lr-wpan-mac.h:333
Time m_timeStamp
Beacon frame reception time.
Definition: lr-wpan-mac.h:335
uint8_t m_logCh
The current channel number occupied by the network.
Definition: lr-wpan-mac.h:327