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 
41 namespace ns3
42 {
43 
44 class Packet;
45 class LrWpanCsmaCa;
46 
60 {
65 };
66 
73 {
84 };
85 
92 {
94  CAP,
95  CFP,
96  INACTIVE
97 };
98 
105 {
106  OUTGOING = 0,
107  INCOMING = 1
108 };
109 
116 {
117  MLME_NONE = 0,
121  MLME_SYNC_REQ = 4
122 };
123 
124 namespace TracedValueCallback
125 {
126 
134 typedef void (*LrWpanMacState)(LrWpanMacState oldValue, LrWpanMacState newValue);
135 
143 typedef void (*SuperframeStatus)(SuperframeStatus oldValue, SuperframeStatus newValue);
144 
145 } // namespace TracedValueCallback
146 
153 {
157  EXT_ADDR = 3
158 };
159 
166 {
171  DISASSOCIATED = 0xff
172 };
173 
180 {
181  MLMESCAN_ED = 0x00,
184  MLMESCAN_ORPHAN = 0x03
185 };
186 
193 {
206 };
207 
214 {
225 };
226 
233 {
243 };
244 
251 {
262 };
263 
270 {
275 };
276 
283 {
292 };
293 
300 {
310 };
311 
318 {
324 };
325 
333 {
336  // TODO: complete other MAC pib attributes
337 };
338 
344 struct LrWpanMacPibAttributes : public SimpleRefCount<LrWpanMacPibAttributes>
345 {
348  // TODO: complete other MAC pib attributes
349 };
350 
357 {
360  uint16_t m_coorPanId{0xffff};
366  uint8_t m_logCh{11};
367  uint8_t m_logChPage{0};
370  bool m_gtsPermit{false};
372  uint8_t m_linkQuality{0};
376 };
377 
384 {
387  uint16_t m_dstPanId{0};
390  uint8_t m_msduHandle{0};
391  uint8_t m_txOptions{0};
392 };
393 
400 {
401  uint8_t m_msduHandle{0};
404 };
405 
412 {
414  uint16_t m_srcPanId{0};
418  uint16_t m_dstPanId{0};
421  uint8_t m_mpduLinkQuality{0};
422  uint8_t m_dsn{0};
423 };
424 
431 {
435 };
436 
443 {
449 };
450 
457 {
458  uint16_t m_PanId{0};
459  uint8_t m_logCh{
460  11};
461  uint32_t m_logChPage{
462  0};
463  uint32_t m_startTime{0};
465  uint8_t m_bcnOrd{15};
467  uint8_t m_sfrmOrd{15};
468  bool m_panCoor{false};
469  bool m_battLifeExt{false};
471  bool m_coorRealgn{false};
473 };
474 
481 {
482  uint8_t m_logCh{11};
483  bool m_trackBcn{false};
485 };
486 
493 {
495  SHORT_ADDR};
496  uint16_t m_coorPanId{0};
499 };
500 
507 {
510  uint32_t m_scanChannels{0x7FFFFFF};
511  uint8_t m_scanDuration{14};
513  uint32_t m_chPage{0};
514 };
515 
522 {
527  uint32_t m_chPage{0};
528  std::vector<uint8_t> m_unscannedCh;
530  std::vector<uint8_t>
533  std::vector<PanDescriptor> m_panDescList;
535 };
536 
543 {
544  uint8_t m_chNum{11};
545  uint32_t m_chPage{0};
547  SHORT_ADDR};
548  uint16_t m_coordPanId{0};
555 };
556 
563 {
567 };
568 
575 {
578 };
579 
586 {
587  uint8_t m_bsn{0};
589  uint32_t m_sduLength{0};
591 };
592 
599 {
602  uint16_t m_panId{0};
604  uint8_t m_logCh{11};
606 };
607 
614 {
615  uint16_t m_panId{0};
628 };
629 
636 {
640 };
641 
648 {
653 };
654 
663 
674 
683 
694 
705 
714 
722 
731 
742 
753 
762 
768 class LrWpanMac : public Object
769 {
770  public:
776  static TypeId GetTypeId();
777 
781  LrWpanMac();
782  ~LrWpanMac() override;
783 
789  bool GetRxOnWhenIdle() const;
790 
796  void SetRxOnWhenIdle(bool rxOnWhenIdle);
797 
798  // XXX these setters will become obsolete if we use the attribute system
805 
812 
819 
826 
832  void SetPanId(uint16_t panId);
833 
839  uint16_t GetPanId() const;
840 
847 
854 
864 
874 
883 
893 
903 
913 
922 
932 
938  void SetCsmaCa(Ptr<LrWpanCsmaCa> csmaCa);
939 
945  void SetPhy(Ptr<LrWpanPhy> phy);
946 
953 
962 
971 
980 
989 
998 
1007 
1016 
1025 
1034 
1043 
1052 
1053  // interfaces between MAC and PHY
1054 
1063  void PdDataIndication(uint32_t psduLength, Ptr<Packet> p, uint8_t lqi);
1064 
1071  void PdDataConfirm(LrWpanPhyEnumeration status);
1072 
1078  void PlmeCcaConfirm(LrWpanPhyEnumeration status);
1079 
1086  void PlmeEdConfirm(LrWpanPhyEnumeration status, uint8_t energyLevel);
1087 
1098  LrWpanPhyPibAttributes* attribute);
1099 
1107 
1116 
1122  void SetLrWpanMacState(LrWpanMacState macState);
1123 
1130 
1137 
1143  void SetTxQMaxSize(uint32_t queueSize);
1144 
1150  void SetIndTxQMaxSize(uint32_t queueSize);
1151 
1152  // MAC PIB attributes
1153 
1160 
1168 
1175 
1183 
1192 
1199 
1205 
1213 
1221 
1232 
1238 
1242  uint8_t m_fnlCapSlot;
1243 
1250 
1258 
1263 
1270 
1276  uint16_t m_macPanId;
1277 
1282  uint16_t m_macPanIdScan;
1283 
1289 
1295 
1302 
1308 
1314 
1321 
1327 
1333 
1340 
1349 
1354 
1358  uint32_t m_ifs;
1359 
1364 
1370 
1376 
1382 
1388 
1393 
1398 
1403 
1409  uint64_t GetMacAckWaitDuration() const;
1410 
1416  uint8_t GetMacMaxFrameRetries() const;
1417 
1421  void PrintTransmitQueueSize();
1422 
1428  void SetMacMaxFrameRetries(uint8_t retries);
1429 
1435  bool isCoordDest();
1436 
1443 
1450 
1456  uint32_t GetIfsSize();
1457 
1463  uint64_t GetTxPacketSymbols();
1464 
1470  bool isTxAckReq();
1471 
1476  void PrintPendTxQ(std::ostream& os) const;
1477 
1482  void PrintTxQueue(std::ostream& os) const;
1483 
1491  typedef void (*SentTracedCallback)(Ptr<const Packet> packet, uint8_t retries, uint8_t backoffs);
1492 
1502  typedef void (*StateTracedCallback)(LrWpanMacState oldState, LrWpanMacState newState);
1503 
1504  protected:
1505  // Inherited from Object.
1506  void DoInitialize() override;
1507  void DoDispose() override;
1508 
1509  private:
1513  struct TxQueueElement : public SimpleRefCount<TxQueueElement>
1514  {
1515  uint8_t txQMsduHandle;
1517  };
1518 
1522  struct IndTxQueueElement : public SimpleRefCount<IndTxQueueElement>
1523  {
1524  uint8_t seqNum;
1529  };
1530 
1534  void SendOneBeacon();
1535 
1539  void SendAssocRequestCommand();
1540 
1545  void SendDataRequestCommand();
1546 
1553  void SendAssocResponseCommand(Ptr<Packet> rxDataReqPkt);
1554 
1559  void LostAssocRespCommand();
1560 
1564  void SendBeaconRequestCommand();
1565 
1569  void EndStartRequest();
1570 
1574  void EndChannelScan();
1575 
1579  void EndChannelEnergyScan();
1580 
1584  void EndAssociateRequest();
1585 
1592  void StartCFP(SuperframeType superframeType);
1593 
1600  void StartCAP(SuperframeType superframeType);
1601 
1608  void StartInactivePeriod(SuperframeType superframeType);
1609 
1614  void AwaitBeacon();
1615 
1619  void BeaconSearchTimeout();
1620 
1626  void SendAck(uint8_t seqno);
1627 
1633  void EnqueueTxQElement(Ptr<TxQueueElement> txQElement);
1634 
1639  void RemoveFirstTxQElement();
1640 
1646  void ChangeMacState(LrWpanMacState newState);
1647 
1652  void AckWaitTimeout();
1653 
1661  void IfsWaitTimeout(Time ifsTime);
1662 
1669  bool PrepareRetransmission();
1670 
1676  void EnqueueInd(Ptr<Packet> p);
1677 
1686 
1690  void PurgeInd();
1691 
1698 
1704  void CheckQueue();
1705 
1713 
1721 
1729 
1734 
1746 
1754 
1762 
1770 
1778 
1785 
1794 
1802 
1810 
1819 
1828 
1837 
1857 
1877 
1887 
1892 
1897 
1904 
1910 
1916 
1923 
1930 
1937 
1944 
1950 
1956 
1962 
1969 
1974 
1979 
1984 
1989 
1994 
2000 
2007 
2012 
2016  std::deque<Ptr<TxQueueElement>> m_txQueue;
2017 
2022  std::deque<Ptr<IndTxQueueElement>> m_indTxQueue;
2023 
2028 
2033 
2038  std::vector<PanDescriptor> m_panDescriptorList;
2039 
2043  std::vector<uint8_t> m_energyDetectList;
2044 
2050 
2056 
2062 
2067 
2073 
2079 
2084 
2090 
2095 
2100 
2105 
2110 
2115 
2120 
2125 
2130 
2135 
2140 
2145 
2150 };
2151 } // namespace ns3
2152 
2153 #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:769
uint32_t m_incomingBeaconInterval
Indication of the interval a node should receive a superframe expressed in symbols.
Definition: lr-wpan-mac.h:1381
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:1896
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:1182
McpsDataConfirmCallback m_mcpsDataConfirmCallback
This callback is used to report data transmission request status to the upper layers.
Definition: lr-wpan-mac.h:1968
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:1167
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:222
bool m_macRxOnWhenIdle
Indication of whether the MAC sublayer is to enable its receiver during idle periods.
Definition: lr-wpan-mac.h:1320
bool m_macAssociationPermit
Indication of whether a coordinator is currently allowing association.
Definition: lr-wpan-mac.h:1339
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:1793
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:1237
void SetRxOnWhenIdle(bool rxOnWhenIdle)
Set if the receiver should be enabled when the MAC is idle.
Definition: lr-wpan-mac.cc:292
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:1363
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:2083
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:775
static TypeId GetTypeId()
Get the type ID.
Definition: lr-wpan-mac.cc:51
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:1943
uint8_t m_deviceCapability
Indication of current device capability (FFD or RFD)
Definition: lr-wpan-mac.h:1392
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:2139
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:2032
EventId m_assocResCmdWaitTimeout
Scheduler event for the lost of a association response command frame.
Definition: lr-wpan-mac.h:2099
void PurgeInd()
Purge expired transactions from the pending transactions list.
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:1827
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:1876
void SetExtendedAddress(Mac64Address address)
Set the extended address of this MAC.
Definition: lr-wpan-mac.cc:318
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:540
uint32_t m_macLIFSPeriod
The minimum time forming a Long InterFrame Spacing (LIFS) period.
Definition: lr-wpan-mac.h:1326
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:1801
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:1777
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:1809
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:1922
Mac16Address GetShortAddress() const
Get the short address of this MAC.
Definition: lr-wpan-mac.cc:325
void SendDataRequestCommand()
Used to send a data request command (i.e.
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:2124
uint8_t m_macMaxFrameRetries
The maximum number of retries allowed after a transmission failure.
Definition: lr-wpan-mac.h:1313
Mac64Address m_macCoordExtendedAddress
The extended address of the coordinator through which the device is associated.
Definition: lr-wpan-mac.h:1198
MlmeSyncLossIndicationCallback m_mlmeSyncLossIndicationCallback
This callback is used to indicate the loss of synchronization with a coordinator.
Definition: lr-wpan-mac.h:1915
PendingPrimitiveStatus m_pendPrimitive
Indicates the pending primitive when PLME.SET operation (page or channel switch) is called from withi...
Definition: lr-wpan-mac.h:2072
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:1936
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:2066
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:2038
void SendBeaconRequestCommand()
Called to send a beacon request command.
Definition: lr-wpan-mac.cc:933
EventId m_respWaitTimeout
Scheduler event for a response to a request command frame.
Definition: lr-wpan-mac.h:2094
uint32_t m_maxTxQueueSize
The maximum size of the transmit queue.
Definition: lr-wpan-mac.h:2027
Ptr< Packet > m_macBeaconPayload
The contents of the beacon payload.
Definition: lr-wpan-mac.h:1301
std::deque< Ptr< TxQueueElement > > m_txQueue
The transmit queue used by the MAC.
Definition: lr-wpan-mac.h:2016
SequenceNumber8 m_macBsn
Sequence number added to transmitted beacon frame, 00-ff.
Definition: lr-wpan-mac.h:1294
LrWpanAssociationStatus m_associationStatus
The current association status of the MAC layer.
Definition: lr-wpan-mac.h:1988
Ptr< Packet > m_rxPkt
The command request packet received.
Definition: lr-wpan-mac.h:1999
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:1769
void SetLrWpanMacState(LrWpanMacState macState)
CSMA-CA algorithm calls back the MAC after executing channel assessment.
Mac16Address m_shortAddress
The short address (16 bit address) used by this MAC.
Definition: lr-wpan-mac.h:2006
uint8_t m_macSuperframeOrder
Used by a PAN coordinator or coordinator.
Definition: lr-wpan-mac.h:1220
void(* StateTracedCallback)(LrWpanMacState oldState, LrWpanMacState newState)
TracedCallback signature for LrWpanMacState change events.
Definition: lr-wpan-mac.h:1502
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:2043
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:864
Time m_macBeaconTxTime
The time that the device transmitted its last beacon frame.
Definition: lr-wpan-mac.h:1159
MlmeBeaconNotifyIndicationCallback m_mlmeBeaconNotifyIndicationCallback
This callback is used to notify incoming beacon packets to the upper layers.
Definition: lr-wpan-mac.h:1909
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:1886
Mac64Address GetExtendedAddress() const
Get the extended address of this MAC.
Definition: lr-wpan-mac.cc:332
EventId m_setMacState
Scheduler event for a deferred MAC state change.
Definition: lr-wpan-mac.h:2104
uint64_t m_macResponseWaitTime
The maximum time, in multiples of aBaseSuperframeDuration, a device shall wait for a response command...
Definition: lr-wpan-mac.h:1174
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 SetMlmeSetConfirmCallback(MlmeSetConfirmCallback c)
Set the callback for the confirmation of an attempt to write an attribute.
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:2149
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.
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:638
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:2144
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:1856
uint8_t m_incomingBeaconOrder
The beaconOrder value of the INCOMING frame.
Definition: lr-wpan-mac.h:1249
SequenceNumber8 m_macDsn
Sequence number added to transmitted data or MAC command frame, 00-ff.
Definition: lr-wpan-mac.h:1288
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:1358
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:1231
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:1491
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:2055
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:579
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:1212
TracedCallback< Time > m_macIfsEndTrace
The trace source is fired at the end of any Interframe Space (IFS).
Definition: lr-wpan-mac.h:1733
TracedValue< SuperframeStatus > m_outSuperframeStatus
The current period of the outgoing superframe.
Definition: lr-wpan-mac.h:1983
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:2061
LrWpanMac()
Default constructor.
Definition: lr-wpan-mac.cc:162
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:2089
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:1929
bool m_macPromiscuousMode
Indicates if MAC sublayer is in receive all mode.
Definition: lr-wpan-mac.h:1269
uint8_t m_fnlCapSlot
Indication of the Slot where the CAP portion of the OUTGOING Superframe ends.
Definition: lr-wpan-mac.h:1242
uint32_t m_macSIFSPeriod
The minimum time forming a Short InterFrame Spacing (SIFS) period.
Definition: lr-wpan-mac.h:1332
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:2022
uint32_t m_beaconInterval
Indication of the Interval used by the coordinator to transmit beacon frames expressed in symbols.
Definition: lr-wpan-mac.h:1369
TracedValue< LrWpanMacState > m_lrWpanMacState
The current state of the MAC layer.
Definition: lr-wpan-mac.h:1973
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:1753
EventId m_capEvent
Scheduler event for the end of the outgoing superframe CAP.
Definition: lr-wpan-mac.h:2119
TracedCallback< Ptr< const Packet > > m_macTxTrace
The trace source fired when packets are being sent down to L1.
Definition: lr-wpan-mac.h:1784
uint16_t m_macPanId
16 bits id of PAN on which this device is operating.
Definition: lr-wpan-mac.h:1276
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:227
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:713
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:1836
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:1348
uint8_t m_incomingSuperframeOrder
Used by all devices that have a parent.
Definition: lr-wpan-mac.h:1257
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:1282
uint32_t m_macBeaconPayloadLength
The length, in octets, of the beacon payload.
Definition: lr-wpan-mac.h:1307
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:1761
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:1402
Ptr< Packet > m_txPkt
The packet which is currently being sent by the MAC layer.
Definition: lr-wpan-mac.h:1993
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:339
void SendAssocRequestCommand()
Called to send an associate request command.
Definition: lr-wpan-mac.cc:975
uint8_t m_maxEnergyLevel
The maximum energy level detected during ED scan on the current channel.
Definition: lr-wpan-mac.h:1353
void DoDispose() override
Destructor implementation.
Definition: lr-wpan-mac.cc:242
MlmeScanRequestParams m_scanParams
The parameters used during a MLME-SCAN.request.
Definition: lr-wpan-mac.h:2049
MlmeAssociateIndicationCallback m_mlmeAssociateIndicationCallback
This callback is used to indicate the reception of an association request command.
Definition: lr-wpan-mac.h:1955
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:693
MlmeSetConfirmCallback m_mlmeSetConfirmCallback
This callback is used to report the result of an attribute writing request to the upper layers.
Definition: lr-wpan-mac.h:1903
Mac64Address m_selfExt
The extended 64 address (IEEE EUI-64) used by this MAC.
Definition: lr-wpan-mac.h:2011
EventId m_incCapEvent
Scheduler event for the end of the incoming superframe CAP.
Definition: lr-wpan-mac.h:2129
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:1949
bool m_beaconTrackingOn
Indication of whether the current device is tracking incoming beacons.
Definition: lr-wpan-mac.h:1397
uint32_t m_superframeDuration
Indication of the superframe duration in symbols.
Definition: lr-wpan-mac.h:1375
bool GetRxOnWhenIdle() const
Check if the receiver will be enabled when the MAC is idle.
Definition: lr-wpan-mac.cc:286
Mac16Address m_macCoordShortAddress
The short address of the coordinator through which the device is associated.
Definition: lr-wpan-mac.h:1191
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:1891
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:1204
void PrintTransmitQueueSize()
Print the number of elements in the packet transmit queue.
void PrintPendTxQ(std::ostream &os) const
Print the Pending transaction list.
void MlmeSetRequest(LrWpanMacPibAttributeIdentifier id, Ptr< LrWpanMacPibAttributes > attribute)
IEEE 802.15.4-2011, section 6.2.11.1 MLME-SET.request Attempts to write the given value to the indica...
Definition: lr-wpan-mac.cc:830
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:1818
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:815
EventId m_ifsEvent
Scheduler event for Interframe spacing wait time.
Definition: lr-wpan-mac.h:2109
EventId m_beaconEvent
Scheduler event for generation of one beacon.
Definition: lr-wpan-mac.h:2114
uint32_t m_incomingSuperframeDuration
Indication of the superframe duration in symbols (e.g.
Definition: lr-wpan-mac.h:1387
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:1745
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:311
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:2078
EventId m_incCfpEvent
Scheduler event for the end of the incoming superframe CFP.
Definition: lr-wpan-mac.h:2134
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:1262
MlmeCommStatusIndicationCallback m_mlmeCommStatusIndicationCallback
This callback is instigated through a response primitive.
Definition: lr-wpan-mac.h:1961
TracedValue< SuperframeStatus > m_incSuperframeStatus
The current period of the incoming superframe.
Definition: lr-wpan-mac.h:1978
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:662
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:673
Callback< void, MlmeStartConfirmParams > MlmeStartConfirmCallback
This callback is called after a MlmeStartRequest has been called from the higher layer.
Definition: lr-wpan-mac.h:682
Callback< void, MlmeScanConfirmParams > MlmeScanConfirmCallback
This callback is called after a MlmeScanRequest has been called from the higher layer.
Definition: lr-wpan-mac.h:721
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
LrWpanMlmeSetConfirmStatus
Table 33 of IEEE 802.15.4-2011.
Definition: lr-wpan-mac.h:318
LrWpanTxOption
Tx options.
Definition: lr-wpan-mac.h:60
Callback< void, MlmeBeaconNotifyIndicationParams > MlmeBeaconNotifyIndicationCallback
This callback is called after a Mlme has successfully received a beacon frame and wants to deliver it...
Definition: lr-wpan-mac.h:693
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:741
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:713
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:730
LrWpanMlmeAssociateConfirmStatus
Table 12 of IEEE 802.15.4-2011.
Definition: lr-wpan-mac.h:251
Callback< void, MlmeSetConfirmParams > MlmeSetConfirmCallback
This callback is called after a MlmeSetRequest has been called from the higher layer to set a PIB.
Definition: lr-wpan-mac.h:761
SuperframeType
Superframe type.
Definition: lr-wpan-mac.h:105
LrWpanMlmeCommStatus
Table 18 of IEEE 802.15.4-2011.
Definition: lr-wpan-mac.h:283
LrWpanMacPibAttributeIdentifier
IEEE802.15.4-2011 MAC PIB Attribute Identifiers Table 52 in section 6.4.2.
Definition: lr-wpan-mac.h:333
Callback< void, MlmeSyncLossIndicationParams > MlmeSyncLossIndicationCallback
This callback is called to indicate the loss of synchronization with a coordinator.
Definition: lr-wpan-mac.h:704
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:752
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
@ MLMESET_INVALID_PARAMETER
Definition: lr-wpan-mac.h:323
@ MLMESET_INVALID_INDEX
Definition: lr-wpan-mac.h:322
@ MLMESET_READ_ONLY
Definition: lr-wpan-mac.h:320
@ MLMESET_SUCCESS
Definition: lr-wpan-mac.h:319
@ MLMESET_UNSUPPORTED_ATTRIBUTE
Definition: lr-wpan-mac.h:321
@ 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
@ macBeaconPayloadLength
Definition: lr-wpan-mac.h:335
@ macBeaconPayload
Definition: lr-wpan-mac.h:334
@ 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
params
Fit Fluctuating Two Ray model to the 3GPP TR 38.901 using the Anderson-Darling goodness-of-fit ##.
Helper structure for managing pending transaction list elements (Indirect transmissions).
Definition: lr-wpan-mac.h:1523
Time expireTime
The expiration time of the packet in the indirect transmission queue.
Definition: lr-wpan-mac.h:1528
Mac64Address dstExtAddress
The destination extended Mac Address.
Definition: lr-wpan-mac.h:1526
uint8_t seqNum
The sequence number of the queued packet.
Definition: lr-wpan-mac.h:1524
Mac16Address dstShortAddress
The destination short Mac Address.
Definition: lr-wpan-mac.h:1525
Ptr< Packet > txQPkt
Queued packet.
Definition: lr-wpan-mac.h:1527
Helper structure for managing transmission queue elements.
Definition: lr-wpan-mac.h:1514
Ptr< Packet > txQPkt
Queued packet.
Definition: lr-wpan-mac.h:1516
uint8_t txQMsduHandle
MSDU Handle.
Definition: lr-wpan-mac.h:1515
IEEE802.15.4-2011 PHY PIB Attributes Table 52 in section 6.4.2.
Definition: lr-wpan-mac.h:345
uint8_t macBeaconPayloadLength
The length in octets of the beacon payload.
Definition: lr-wpan-mac.h:347
Ptr< Packet > macBeaconPayload
The contents of the beacon payload.
Definition: lr-wpan-mac.h:346
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:400
LrWpanMcpsDataConfirmStatus m_status
The status of the last MSDU transmission.
Definition: lr-wpan-mac.h:402
uint8_t m_msduHandle
MSDU handle.
Definition: lr-wpan-mac.h:401
MCPS-DATA.indication params.
Definition: lr-wpan-mac.h:412
Mac16Address m_dstAddr
Destination address.
Definition: lr-wpan-mac.h:419
uint8_t m_dstAddrMode
Destination address mode.
Definition: lr-wpan-mac.h:417
uint16_t m_dstPanId
Destination PAN identifier.
Definition: lr-wpan-mac.h:418
uint8_t m_dsn
The DSN of the received data frame.
Definition: lr-wpan-mac.h:422
uint8_t m_mpduLinkQuality
LQI value measured during reception of the MPDU.
Definition: lr-wpan-mac.h:421
uint16_t m_srcPanId
Source PAN identifier.
Definition: lr-wpan-mac.h:414
Mac64Address m_dstExtAddr
Destination extended address.
Definition: lr-wpan-mac.h:420
uint8_t m_srcAddrMode
Source address mode.
Definition: lr-wpan-mac.h:413
Mac64Address m_srcExtAddr
Source extended address.
Definition: lr-wpan-mac.h:416
Mac16Address m_srcAddr
Source address.
Definition: lr-wpan-mac.h:415
MCPS-DATA.request params.
Definition: lr-wpan-mac.h:384
LrWpanAddressMode m_srcAddrMode
Source address mode.
Definition: lr-wpan-mac.h:385
Mac64Address m_dstExtAddr
Destination extended address.
Definition: lr-wpan-mac.h:389
LrWpanAddressMode m_dstAddrMode
Destination address mode.
Definition: lr-wpan-mac.h:386
uint16_t m_dstPanId
Destination PAN identifier.
Definition: lr-wpan-mac.h:387
Mac16Address m_dstAddr
Destination address.
Definition: lr-wpan-mac.h:388
uint8_t m_msduHandle
MSDU handle.
Definition: lr-wpan-mac.h:390
uint8_t m_txOptions
Tx Options (bitfield)
Definition: lr-wpan-mac.h:391
MLME-ASSOCIATE.confirm params.
Definition: lr-wpan-mac.h:563
LrWpanMlmeAssociateConfirmStatus m_status
The status of a MLME-associate.request.
Definition: lr-wpan-mac.h:565
Mac16Address m_assocShortAddr
The short address used in the association request.
Definition: lr-wpan-mac.h:564
MLME-ASSOCIATE.indication params.
Definition: lr-wpan-mac.h:431
Mac64Address m_extDevAddr
The extended address of the device requesting association.
Definition: lr-wpan-mac.h:432
CapabilityField capabilityInfo
The operational capabilities of the device requesting association.
Definition: lr-wpan-mac.h:434
MLME-ASSOCIATE.request params.
Definition: lr-wpan-mac.h:543
uint8_t m_chNum
The channel number on which to attempt association.
Definition: lr-wpan-mac.h:544
CapabilityField m_capabilityInfo
Specifies the operational capabilities of the associating device.
Definition: lr-wpan-mac.h:554
uint8_t m_coordAddrMode
The coordinator addressing mode for this primitive and subsequent MPDU.
Definition: lr-wpan-mac.h:546
uint32_t m_chPage
The channel page on which to attempt association.
Definition: lr-wpan-mac.h:545
Mac64Address m_coordExtAddr
The extended address of the coordinator with which to associate.
Definition: lr-wpan-mac.h:552
Mac16Address m_coordShortAddr
The short address of the coordinator with which to associate.
Definition: lr-wpan-mac.h:550
uint16_t m_coordPanId
The identifier of the PAN with which to associate.
Definition: lr-wpan-mac.h:548
MLME-ASSOCIATE.response params.
Definition: lr-wpan-mac.h:443
LrWpanAssociationStatus m_status
The status of the association attempt (As defined on Table 83 IEEE 802.15.4-2006)
Definition: lr-wpan-mac.h:447
Mac16Address m_assocShortAddr
The short address allocated by the coordinator on successful assoc.
Definition: lr-wpan-mac.h:445
Mac64Address m_extDevAddr
The extended address of the device requesting association.
Definition: lr-wpan-mac.h:444
MLME-BEACON-NOTIFY.indication params.
Definition: lr-wpan-mac.h:586
uint32_t m_sduLength
The number of octets contained in the beacon payload.
Definition: lr-wpan-mac.h:589
uint8_t m_bsn
The beacon sequence number.
Definition: lr-wpan-mac.h:587
Ptr< Packet > m_sdu
The set of octets comprising the beacon payload.
Definition: lr-wpan-mac.h:590
PanDescriptor m_panDescriptor
The PAN descriptor for the received beacon.
Definition: lr-wpan-mac.h:588
MLME-COMM-STATUS.indication params.
Definition: lr-wpan-mac.h:614
Mac16Address m_srcShortAddr
The short address of the entity from which the frame causing the error originated.
Definition: lr-wpan-mac.h:618
LrWpanMlmeCommStatus m_status
The communication status.
Definition: lr-wpan-mac.h:627
Mac16Address m_dstShortAddr
The short address of the device for which the frame was intended.
Definition: lr-wpan-mac.h:624
Mac64Address m_dstExtAddr
The extended address of the device for which the frame was intended.
Definition: lr-wpan-mac.h:626
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:615
Mac64Address m_srcExtAddr
The extended address of the entity from which the frame causing the error originated.
Definition: lr-wpan-mac.h:620
uint8_t m_dstAddrMode
The destination addressing mode for this primitive.
Definition: lr-wpan-mac.h:622
uint8_t m_srcAddrMode
The source addressing mode for this primitive.
Definition: lr-wpan-mac.h:617
MLME-START.confirm params.
Definition: lr-wpan-mac.h:636
LrWpanMlmePollConfirmStatus m_status
The confirmation status resulting from a MLME-poll.request.
Definition: lr-wpan-mac.h:637
MLME-POLL.request params.
Definition: lr-wpan-mac.h:493
Mac16Address m_coorShortAddr
Coordinator short address.
Definition: lr-wpan-mac.h:497
uint16_t m_coorPanId
The PAN id of the coordinator to which the poll is intended.
Definition: lr-wpan-mac.h:496
Mac64Address m_coorExtAddr
Coordinator extended address.
Definition: lr-wpan-mac.h:498
LrWpanAddressMode m_coorAddrMode
The addressing mode of the coordinator to which the pool is intended.
Definition: lr-wpan-mac.h:494
MLME-SCAN.confirm params.
Definition: lr-wpan-mac.h:522
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:533
LrWpanMlmeScanType m_scanType
Indicates the type of scan performed (ED,ACTIVE,PASSIVE,ORPHAN).
Definition: lr-wpan-mac.h:525
uint32_t m_chPage
The channel page on which the scan was performed.
Definition: lr-wpan-mac.h:527
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:528
LrWpanMlmeScanConfirmStatus m_status
The status of the scan request.
Definition: lr-wpan-mac.h:523
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:531
MLME-SCAN.request params.
Definition: lr-wpan-mac.h:507
uint32_t m_scanChannels
The channel numbers to be scanned.
Definition: lr-wpan-mac.h:510
uint32_t m_chPage
The channel page on which to perform scan.
Definition: lr-wpan-mac.h:513
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:511
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:508
MLME-SET.confirm params.
Definition: lr-wpan-mac.h:648
LrWpanMlmeSetConfirmStatus m_status
The result of the request to write the PIB attribute.
Definition: lr-wpan-mac.h:649
LrWpanMacPibAttributeIdentifier id
The id of the PIB attribute that was written.
Definition: lr-wpan-mac.h:652
MLME-START.confirm params.
Definition: lr-wpan-mac.h:575
LrWpanMlmeStartConfirmStatus m_status
The status of a MLME-start.request.
Definition: lr-wpan-mac.h:576
MLME-START.request params.
Definition: lr-wpan-mac.h:457
uint32_t m_logChPage
Logical channel page on which to start using the new superframe configuration.
Definition: lr-wpan-mac.h:461
uint8_t m_logCh
Logical channel on which to start using the new superframe configuration.
Definition: lr-wpan-mac.h:459
bool m_panCoor
On true this device will become coordinator.
Definition: lr-wpan-mac.h:468
bool m_coorRealgn
True if a realignment request command is to be transmitted prior changing the superframe.
Definition: lr-wpan-mac.h:471
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:465
uint32_t m_startTime
Time at which to begin transmitting beacons (Used by Coordinator not PAN Coordinators).
Definition: lr-wpan-mac.h:463
uint16_t m_PanId
Pan Identifier used by the device.
Definition: lr-wpan-mac.h:458
uint8_t m_sfrmOrd
Superframe Order, indicates the length of the CAP in time slots.
Definition: lr-wpan-mac.h:467
bool m_battLifeExt
Flag indicating whether or not the Battery life extension (BLE) features are used.
Definition: lr-wpan-mac.h:469
MLME-SYNC-LOSS.indication params.
Definition: lr-wpan-mac.h:599
uint16_t m_panId
The PAN identifier with which the device lost synchronization or to which it was realigned.
Definition: lr-wpan-mac.h:602
uint8_t m_logCh
The channel number on which the device lost synchronization or to which it was realigned.
Definition: lr-wpan-mac.h:604
LrWpanSyncLossReason m_lossReason
The reason for the lost of synchronization.
Definition: lr-wpan-mac.h:600
MLME-SYNC.request params.
Definition: lr-wpan-mac.h:481
bool m_trackBcn
True if the mlme sync with the next beacon and attempts to track future beacons.
Definition: lr-wpan-mac.h:483
uint8_t m_logCh
The channel number on which to attempt coordinator synchronization.
Definition: lr-wpan-mac.h:482
PAN Descriptor, Table 17 IEEE 802.15.4-2011.
Definition: lr-wpan-mac.h:357
LrWpanAddressMode m_coorAddrMode
The coordinator addressing mode corresponding to the received beacon frame.
Definition: lr-wpan-mac.h:358
Mac64Address m_coorExtAddr
The coordinator extended address as specified in the coordinator address mode.
Definition: lr-wpan-mac.h:364
Mac16Address m_coorShortAddr
The coordinator short address as specified in the coordinator address mode.
Definition: lr-wpan-mac.h:362
uint8_t m_logChPage
The current channel page occupied by the network.
Definition: lr-wpan-mac.h:367
uint16_t m_coorPanId
The PAN ID of the coordinator as specified in the received beacon frame.
Definition: lr-wpan-mac.h:360
bool m_gtsPermit
TRUE if the beacon is from the PAN coordinator that is accepting GTS requests.
Definition: lr-wpan-mac.h:370
SuperframeField m_superframeSpec
The superframe specification as specified in the received beacon frame.
Definition: lr-wpan-mac.h:368
uint8_t m_linkQuality
The LQI at which the network beacon was received.
Definition: lr-wpan-mac.h:372
Time m_timeStamp
Beacon frame reception time.
Definition: lr-wpan-mac.h:374
uint8_t m_logCh
The current channel number occupied by the network.
Definition: lr-wpan-mac.h:366