A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
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 "lr-wpan-fields.h"
29#include "lr-wpan-phy.h"
30
31#include <ns3/event-id.h>
32#include <ns3/mac16-address.h>
33#include <ns3/mac64-address.h>
34#include <ns3/object.h>
35#include <ns3/sequence-number.h>
36#include <ns3/traced-callback.h>
37#include <ns3/traced-value.h>
38
39#include <deque>
40#include <memory>
41
42namespace ns3
43{
44
45class Packet;
46class LrWpanCsmaCa;
47
61{
66};
67
74{
85};
86
93{
98};
99
106{
108 INCOMING = 1
110
117{
122 MLME_SYNC_REQ = 4
124
125namespace TracedValueCallback
126{
127
135typedef void (*LrWpanMacState)(LrWpanMacState oldValue, LrWpanMacState newValue);
136
144typedef void (*SuperframeStatus)(SuperframeStatus oldValue, SuperframeStatus newValue);
145
146} // namespace TracedValueCallback
147
154{
158 EXT_ADDR = 3
160
167{
172 DISASSOCIATED = 0xff
174
181{
185 MLMESCAN_ORPHAN = 0x03
187
194{
208
215{
227
234{
245
252{
264
271{
277
284{
294
301{
312
319{
326
333{
337
345{
351 unsupported = 255
352 // TODO: complete other MAC pib attributes
354
360struct LrWpanMacPibAttributes : public SimpleRefCount<LrWpanMacPibAttributes>
361{
366 uint16_t macPanId;
367 // TODO: complete other MAC pib attributes
368};
369
376{
379 uint16_t m_coorPanId{0xffff};
385 uint8_t m_logCh{11};
386 uint8_t m_logChPage{0};
389 bool m_gtsPermit{false};
391 uint8_t m_linkQuality{0};
395};
396
403{
406 uint16_t m_dstPanId{0};
409 uint8_t m_msduHandle{0};
410 uint8_t m_txOptions{0};
411};
412
419{
420 uint8_t m_msduHandle{0};
423};
424
431{
433 uint16_t m_srcPanId{0};
437 uint16_t m_dstPanId{0};
440 uint8_t m_mpduLinkQuality{0};
441 uint8_t m_dsn{0};
442};
443
450{
454 uint8_t lqi{0};
456};
457
464{
470};
471
478{
479 uint16_t m_PanId{0};
480 uint8_t m_logCh{11};
486 uint8_t m_bcnOrd{15};
488 uint8_t m_sfrmOrd{15};
489 bool m_panCoor{false};
490 bool m_battLifeExt{false};
492 bool m_coorRealgn{false};
494};
495
502{
503 uint8_t m_logCh{11};
504 bool m_trackBcn{false};
506};
507
514{
516 SHORT_ADDR};
517 uint16_t m_coorPanId{0};
520};
521
528{
534 uint8_t m_scanDuration{14};
539};
540
547{
552 std::vector<uint8_t> m_unscannedCh;
554 uint8_t m_resultListSize{0};
556 std::vector<uint8_t> m_energyDetList;
559 std::vector<PanDescriptor> m_panDescList;
561};
562
569{
570 uint8_t m_chNum{11};
573 SHORT_ADDR};
574 uint16_t m_coordPanId{0};
581};
582
589{
593};
594
601{
604};
605
612{
613 uint8_t m_bsn{0};
617};
618
625{
628 uint16_t m_panId{0};
630 uint8_t m_logCh{11};
632};
633
640{
641 uint16_t m_panId{0};
654};
655
662{
664};
665
672{
675 bool m_assocMember{false};
676};
677
684{
688};
689
696{
701};
702
711
722
731
742
753
762
770
779
790
801
812
821
829typedef Callback<void,
834
840class LrWpanMac : public Object
841{
842 public:
848 static TypeId GetTypeId();
849
853 LrWpanMac();
854 ~LrWpanMac() override;
855
861 bool GetRxOnWhenIdle() const;
862
868 void SetRxOnWhenIdle(bool rxOnWhenIdle);
869
870 // XXX these setters will become obsolete if we use the attribute system
876 void SetShortAddress(Mac16Address address);
877
884
890 void SetExtendedAddress(Mac64Address address);
891
898
904 void SetPanId(uint16_t panId);
905
911 uint16_t GetPanId() const;
912
919
926
936
946
955
965
975
985
995
1004
1014
1023
1029 void SetCsmaCa(Ptr<LrWpanCsmaCa> csmaCa);
1030
1036 void SetPhy(Ptr<LrWpanPhy> phy);
1037
1044
1053
1062
1071
1080
1089
1098
1107
1116
1125
1134
1143
1152
1161
1162 // interfaces between MAC and PHY
1163
1172 void PdDataIndication(uint32_t psduLength, Ptr<Packet> p, uint8_t lqi);
1173
1181
1188
1195 void PlmeEdConfirm(LrWpanPhyEnumeration status, uint8_t energyLevel);
1196
1207 Ptr<LrWpanPhyPibAttributes> attribute);
1208
1216
1225
1231 void SetLrWpanMacState(LrWpanMacState macState);
1232
1239
1246
1252 void SetTxQMaxSize(uint32_t queueSize);
1253
1259 void SetIndTxQMaxSize(uint32_t queueSize);
1260
1261 // MAC PIB attributes
1262
1269
1277
1284
1292
1301
1308
1314
1322
1330
1341
1347
1352
1359
1367
1372
1379
1385 uint16_t m_macPanId;
1386
1392
1398
1404
1411
1417
1423
1430
1436
1442
1449
1458
1463
1468
1473
1478
1484
1490
1496
1502
1507
1512
1517
1523 uint64_t GetMacAckWaitDuration() const;
1524
1530 uint8_t GetMacMaxFrameRetries() const;
1531
1536
1542 void SetMacMaxFrameRetries(uint8_t retries);
1543
1549 bool isCoordDest();
1550
1557
1564
1571
1577 uint64_t GetTxPacketSymbols();
1578
1584 bool isTxAckReq();
1585
1590 void PrintPendingTxQueue(std::ostream& os) const;
1591
1596 void PrintTxQueue(std::ostream& os) const;
1597
1605 typedef void (*SentTracedCallback)(Ptr<const Packet> packet, uint8_t retries, uint8_t backoffs);
1606
1616 typedef void (*StateTracedCallback)(LrWpanMacState oldState, LrWpanMacState newState);
1617
1618 protected:
1619 // Inherited from Object.
1620 void DoInitialize() override;
1621 void DoDispose() override;
1622
1623 private:
1627 struct TxQueueElement : public SimpleRefCount<TxQueueElement>
1628 {
1631 };
1632
1636 struct IndTxQueueElement : public SimpleRefCount<IndTxQueueElement>
1637 {
1638 uint8_t seqNum;
1643 };
1644
1648 void SendOneBeacon();
1649
1654
1660
1667 void SendAssocResponseCommand(Ptr<Packet> rxDataReqPkt);
1668
1673 void LostAssocRespCommand();
1674
1679
1686
1690 void EndStartRequest();
1691
1695 void EndChannelScan();
1696
1700 void EndChannelEnergyScan();
1701
1705 void EndAssociateRequest();
1706
1713 void StartCFP(SuperframeType superframeType);
1714
1721 void StartCAP(SuperframeType superframeType);
1722
1729 void StartInactivePeriod(SuperframeType superframeType);
1730
1735 void AwaitBeacon();
1736
1740 void BeaconSearchTimeout();
1741
1747 void SendAck(uint8_t seqno);
1748
1754 void EnqueueTxQElement(Ptr<TxQueueElement> txQElement);
1755
1760 void RemoveFirstTxQElement();
1761
1767 void ChangeMacState(LrWpanMacState newState);
1768
1773 void AckWaitTimeout();
1774
1782 void IfsWaitTimeout(Time ifsTime);
1783
1790 bool PrepareRetransmission();
1791
1797 void EnqueueInd(Ptr<Packet> p);
1798
1807
1811 void PurgeInd();
1812
1819
1825 void CheckQueue();
1826
1834
1842
1850
1855
1867
1875
1883
1891
1899
1906
1915
1923
1931
1940
1949
1958
1978
1998
2008
2013
2018
2025
2032
2038
2044
2051
2058
2065
2072
2078
2084
2090
2096
2103
2108
2113
2118
2123
2128
2134
2141
2146
2150 std::deque<Ptr<TxQueueElement>> m_txQueue;
2151
2156 std::deque<Ptr<IndTxQueueElement>> m_indTxQueue;
2157
2162
2167
2172 std::vector<PanDescriptor> m_panDescriptorList;
2173
2177 std::vector<uint8_t> m_energyDetectList;
2178
2182 std::vector<uint8_t> m_unscannedChannels;
2183
2189
2195
2201
2206
2212
2218
2223
2228
2234
2239
2244
2249
2254
2259
2264
2269
2274
2279
2284
2289
2294
2299};
2300} // namespace ns3
2301
2302#endif /* LR_WPAN_MAC_H */
Callback template class.
Definition: callback.h:438
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:841
uint32_t m_incomingBeaconInterval
Indication of the interval a node should receive a superframe expressed in symbols.
Definition: lr-wpan-mac.h:1495
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:2017
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:1291
McpsDataConfirmCallback m_mcpsDataConfirmCallback
This callback is used to report data transmission request status to the upper layers.
Definition: lr-wpan-mac.h:2102
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:1276
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:225
bool m_macRxOnWhenIdle
Indication of whether the MAC sublayer is to enable its receiver during idle periods.
Definition: lr-wpan-mac.h:1429
bool m_macAssociationPermit
Indication of whether a coordinator is currently allowing association.
Definition: lr-wpan-mac.h:1448
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:1914
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:1346
void SetRxOnWhenIdle(bool rxOnWhenIdle)
Set if the receiver should be enabled when the MAC is idle.
Definition: lr-wpan-mac.cc:303
uint64_t GetTxPacketSymbols()
Obtain the number of symbols in the packet which is currently being sent by the MAC layer.
void MlmeGetRequest(LrWpanMacPibAttributeIdentifier id)
IEEE 802.15.4-2011, section 6.2.5.1 MLME-GET.request Request information about a given PIB attribute.
Definition: lr-wpan-mac.cc:945
bool m_panCoor
Indication of whether the current device is the PAN coordinator.
Definition: lr-wpan-mac.h:1472
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:2222
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:846
static TypeId GetTypeId()
Get the type ID.
Definition: lr-wpan-mac.cc:52
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:2071
uint8_t m_deviceCapability
Indication of current device capability (FFD or RFD)
Definition: lr-wpan-mac.h:1506
void AwaitBeacon()
Called after the end of an INCOMING superframe to start the moment a device waits for a new incoming ...
bool m_coor
Indicates if the current device is a coordinator type.
Definition: lr-wpan-mac.h:1477
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:2283
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:2166
EventId m_assocResCmdWaitTimeout
Scheduler event for the lost of a association response command frame.
Definition: lr-wpan-mac.h:2243
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:1948
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:1997
void SetExtendedAddress(Mac64Address address)
Set the extended address of this MAC.
Definition: lr-wpan-mac.cc:329
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:550
uint32_t m_macLIFSPeriod
The minimum time forming a Long InterFrame Spacing (LIFS) period.
Definition: lr-wpan-mac.h:1435
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:1922
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:1898
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:1930
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:2050
Mac16Address GetShortAddress() const
Get the short address of this MAC.
Definition: lr-wpan-mac.cc:336
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:2268
void PlmeGetAttributeConfirm(LrWpanPhyEnumeration status, LrWpanPibAttributeIdentifier id, Ptr< LrWpanPhyPibAttributes > attribute)
IEEE 802.15.4-2006 section 6.2.2.6 PLME-GET.confirm Get attributes per definition from Table 23 in se...
uint8_t m_macMaxFrameRetries
The maximum number of retries allowed after a transmission failure.
Definition: lr-wpan-mac.h:1422
Mac64Address m_macCoordExtendedAddress
The extended address of the coordinator through which the device is associated.
Definition: lr-wpan-mac.h:1307
MlmeSyncLossIndicationCallback m_mlmeSyncLossIndicationCallback
This callback is used to indicate the loss of synchronization with a coordinator.
Definition: lr-wpan-mac.h:2043
PendingPrimitiveStatus m_pendPrimitive
Indicates the pending primitive when PLME.SET operation (page or channel switch) is called from withi...
Definition: lr-wpan-mac.h:2211
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:2064
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:2205
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:2172
void SendBeaconRequestCommand()
Called to send a beacon request command.
EventId m_respWaitTimeout
Scheduler event for a response to a request command frame.
Definition: lr-wpan-mac.h:2238
uint32_t m_maxTxQueueSize
The maximum size of the transmit queue.
Definition: lr-wpan-mac.h:2161
Ptr< Packet > m_macBeaconPayload
The contents of the beacon payload.
Definition: lr-wpan-mac.h:1410
std::deque< Ptr< TxQueueElement > > m_txQueue
The transmit queue used by the MAC.
Definition: lr-wpan-mac.h:2150
SequenceNumber8 m_macBsn
Sequence number added to transmitted beacon frame, 00-ff.
Definition: lr-wpan-mac.h:1403
LrWpanAssociationStatus m_associationStatus
The current association status of the MAC layer.
Definition: lr-wpan-mac.h:2122
Ptr< Packet > m_rxPkt
The command request packet received.
Definition: lr-wpan-mac.h:2133
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:1890
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:2140
uint8_t m_macSuperframeOrder
Used by a PAN coordinator or coordinator.
Definition: lr-wpan-mac.h:1329
void(* StateTracedCallback)(LrWpanMacState oldState, LrWpanMacState newState)
TracedCallback signature for LrWpanMacState change events.
Definition: lr-wpan-mac.h:1616
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:2177
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:979
Time m_macBeaconTxTime
The time that the device transmitted its last beacon frame.
Definition: lr-wpan-mac.h:1268
MlmeBeaconNotifyIndicationCallback m_mlmeBeaconNotifyIndicationCallback
This callback is used to notify incoming beacon packets to the upper layers.
Definition: lr-wpan-mac.h:2037
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:2007
Mac64Address GetExtendedAddress() const
Get the extended address of this MAC.
Definition: lr-wpan-mac.cc:343
EventId m_setMacState
Scheduler event for a deferred MAC state change.
Definition: lr-wpan-mac.h:2248
uint64_t m_macResponseWaitTime
The maximum time, in multiples of aBaseSuperframeDuration, a device shall wait for a response command...
Definition: lr-wpan-mac.h:1283
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:2298
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:649
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 an ACTIVE or PASSIVE channel scan.
Definition: lr-wpan-mac.h:2288
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:1977
uint8_t m_incomingBeaconOrder
The beaconOrder value of the INCOMING frame.
Definition: lr-wpan-mac.h:1358
SequenceNumber8 m_macDsn
Sequence number added to transmitted data or MAC command frame, 00-ff.
Definition: lr-wpan-mac.h:1397
void SetMlmeSyncLossIndicationCallback(MlmeSyncLossIndicationCallback c)
Set the callback for the loss of synchronization with a coordinator.
void SendOrphanNotificationCommand()
Called to send a orphan notification command.
uint32_t m_ifs
The value of the necessary InterFrame Space after the transmission of a packet.
Definition: lr-wpan-mac.h:1467
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:1340
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:1605
MlmeStartRequestParams m_startParams
The parameters used during a MLME-START.request.
Definition: lr-wpan-mac.h:2194
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:589
LrWpanAssociationStatus GetAssociationStatus() const
Get the current association status.
std::vector< uint8_t > m_unscannedChannels
The list of unscanned channels during a scan operation.
Definition: lr-wpan-mac.h:2182
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:1321
TracedCallback< Time > m_macIfsEndTrace
The trace source is fired at the end of any Interframe Space (IFS).
Definition: lr-wpan-mac.h:1854
void SetMlmeGetConfirmCallback(MlmeGetConfirmCallback c)
Set the callback for the confirmation of an attempt to read an attribute.
TracedValue< SuperframeStatus > m_outSuperframeStatus
The current period of the outgoing superframe.
Definition: lr-wpan-mac.h:2117
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...
MlmeOrphanIndicationCallback m_mlmeOrphanIndicationCallback
This callback is used to indicate the reception of a orphan notification command.
Definition: lr-wpan-mac.h:2095
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:2200
LrWpanMac()
Default constructor.
Definition: lr-wpan-mac.cc:163
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:2233
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:2057
bool m_macPromiscuousMode
Indicates if MAC sublayer is in receive all mode.
Definition: lr-wpan-mac.h:1378
uint8_t m_fnlCapSlot
Indication of the Slot where the CAP portion of the OUTGOING Superframe ends.
Definition: lr-wpan-mac.h:1351
uint32_t m_macSIFSPeriod
The minimum time forming a Short InterFrame Spacing (SIFS) period.
Definition: lr-wpan-mac.h:1441
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:2156
void PrintPendingTxQueue(std::ostream &os) const
Print the Pending transaction list.
uint32_t m_beaconInterval
Indication of the Interval used by the coordinator to transmit beacon frames expressed in symbols.
Definition: lr-wpan-mac.h:1483
TracedValue< LrWpanMacState > m_lrWpanMacState
The current state of the MAC layer.
Definition: lr-wpan-mac.h:2107
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:1874
EventId m_capEvent
Scheduler event for the end of the outgoing superframe CAP.
Definition: lr-wpan-mac.h:2263
TracedCallback< Ptr< const Packet > > m_macTxTrace
The trace source fired when packets are being sent down to L1.
Definition: lr-wpan-mac.h:1905
uint16_t m_macPanId
16 bits id of PAN on which this device is operating.
Definition: lr-wpan-mac.h:1385
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:230
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:724
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:1957
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:1457
uint8_t m_incomingSuperframeOrder
Used by all devices that have a parent.
Definition: lr-wpan-mac.h:1366
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:1391
uint32_t m_macBeaconPayloadLength
The length, in octets, of the beacon payload.
Definition: lr-wpan-mac.h:1416
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:1882
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:1516
Ptr< Packet > m_txPkt
The packet which is currently being sent by the MAC layer.
Definition: lr-wpan-mac.h:2127
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:350
void SendAssocRequestCommand()
Called to send an associate request command.
uint8_t m_maxEnergyLevel
The maximum energy level detected during ED scan on the current channel.
Definition: lr-wpan-mac.h:1462
void DoDispose() override
Destructor implementation.
Definition: lr-wpan-mac.cc:245
MlmeScanRequestParams m_scanParams
The parameters used during a MLME-SCAN.request.
Definition: lr-wpan-mac.h:2188
MlmeAssociateIndicationCallback m_mlmeAssociateIndicationCallback
This callback is used to indicate the reception of an association request command.
Definition: lr-wpan-mac.h:2083
void SetPhy(Ptr< LrWpanPhy > phy)
Set the underlying PHY for the MAC.
Ptr< LrWpanPhy > GetPhy()
Get the underlying PHY of the MAC.
uint8_t m_lastRxFrameLqi
Keep track of the last received frame Link Quality Indicator.
Definition: lr-wpan-mac.h:2227
EventId m_scanOrphanEvent
Scheduler event for the end of an ORPHAN channel scan.
Definition: lr-wpan-mac.h:2293
void EndAssociateRequest()
Called to end an MLME-ASSOCIATE.request after changing the page and channel number.
Definition: lr-wpan-mac.cc:704
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:2024
Mac64Address m_selfExt
The extended 64 address (IEEE EUI-64) used by this MAC.
Definition: lr-wpan-mac.h:2145
MlmeGetConfirmCallback m_mlmeGetConfirmCallback
This callback is used to report the result of an attribute read request to the upper layers.
Definition: lr-wpan-mac.h:2031
EventId m_incCapEvent
Scheduler event for the end of the incoming superframe CAP.
Definition: lr-wpan-mac.h:2273
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:2077
bool m_beaconTrackingOn
Indication of whether the current device is tracking incoming beacons.
Definition: lr-wpan-mac.h:1511
uint32_t m_superframeDuration
Indication of the superframe duration in symbols.
Definition: lr-wpan-mac.h:1489
bool GetRxOnWhenIdle() const
Check if the receiver will be enabled when the MAC is idle.
Definition: lr-wpan-mac.cc:297
Mac16Address m_macCoordShortAddress
The short address of the coordinator through which the device is associated.
Definition: lr-wpan-mac.h:1300
GtsFields GetGtsFields()
Constructs the Guaranteed Time Slots (GTS) Fields from local information.
void MlmeOrphanResponse(MlmeOrphanResponseParams params)
IEEE 802.15.4-2011, section 6.2.7.2 MLME-ORPHAN.response Primitive used to initiatte a response to an...
Definition: lr-wpan-mac.cc:786
Ptr< LrWpanPhy > m_phy
The PHY associated with this MAC.
Definition: lr-wpan-mac.h:2012
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:1313
void PrintTransmitQueueSize()
Print the number of elements in the packet transmit queue.
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:901
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:1939
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:886
EventId m_ifsEvent
Scheduler event for Interframe spacing wait time.
Definition: lr-wpan-mac.h:2253
EventId m_beaconEvent
Scheduler event for generation of one beacon.
Definition: lr-wpan-mac.h:2258
uint32_t m_incomingSuperframeDuration
Indication of the superframe duration in symbols (e.g.
Definition: lr-wpan-mac.h:1501
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:1866
void RemovePendTxQElement(Ptr< Packet > p)
Remove an element from the pending transaction list.
void SetMlmeOrphanIndicationCallback(MlmeOrphanIndicationCallback c)
Set the callback for the indication to the reception of an orphan notification.
void SetShortAddress(Mac16Address address)
Set the short address of this MAC.
Definition: lr-wpan-mac.cc:322
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:2217
EventId m_incCfpEvent
Scheduler event for the end of the incoming superframe CFP.
Definition: lr-wpan-mac.h:2278
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:1371
MlmeCommStatusIndicationCallback m_mlmeCommStatusIndicationCallback
This callback is instigated through a response primitive.
Definition: lr-wpan-mac.h:2089
TracedValue< SuperframeStatus > m_incSuperframeStatus
The current period of the incoming superframe.
Definition: lr-wpan-mac.h:2112
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.
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:78
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.
Trace classes with value semantics.
Definition: traced-value.h:116
a unique identifier for an interface.
Definition: type-id.h:59
Callback< void, McpsDataConfirmParams > McpsDataConfirmCallback
This callback is called after a McpsDataRequest has been called from the higher layer.
Definition: lr-wpan-mac.h:710
LrWpanMlmePollConfirmStatus
Table 39 of IEEE 802.15.4-2011.
Definition: lr-wpan-mac.h:301
LrWpanMacState
MAC states.
Definition: lr-wpan-mac.h:74
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:721
Callback< void, MlmeStartConfirmParams > MlmeStartConfirmCallback
This callback is called after a MlmeStartRequest has been called from the higher layer.
Definition: lr-wpan-mac.h:730
Callback< void, MlmeScanConfirmParams > MlmeScanConfirmCallback
This callback is called after a MlmeScanRequest has been called from the higher layer.
Definition: lr-wpan-mac.h:769
LrWpanMlmeScanType
Table 30 of IEEE 802.15.4-2011.
Definition: lr-wpan-mac.h:181
LrWpanMcpsDataConfirmStatus
Table 42 of 802.15.4-2006.
Definition: lr-wpan-mac.h:194
LrWpanMlmeScanConfirmStatus
Table 31 of IEEE 802.15.4-2011.
Definition: lr-wpan-mac.h:234
SuperframeStatus
Superframe status.
Definition: lr-wpan-mac.h:93
LrWpanPhyEnumeration
IEEE802.15.4-2006 PHY Emumerations Table 18 in section 6.2.3.
Definition: lr-wpan-phy.h:109
Callback< void, MlmeOrphanIndicationParams > MlmeOrphanIndicationCallback
This callback is called by the MLME and issued to its next higher layer following the reception of a ...
Definition: lr-wpan-mac.h:811
LrWpanMlmeSetConfirmStatus
Table 33 of IEEE 802.15.4-2011.
Definition: lr-wpan-mac.h:319
LrWpanTxOption
Tx options.
Definition: lr-wpan-mac.h:61
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:741
LrWpanAssociationStatus
table 83 of 802.15.4
Definition: lr-wpan-mac.h:167
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:789
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:761
LrWpanMlmeStartConfirmStatus
Table 35 of IEEE 802.15.4-2011.
Definition: lr-wpan-mac.h:215
PendingPrimitiveStatus
Indicates a pending MAC primitive.
Definition: lr-wpan-mac.h:117
LrWpanAddressMode
table 80 of 802.15.4
Definition: lr-wpan-mac.h:154
Callback< void, MlmeAssociateConfirmParams > MlmeAssociateConfirmCallback
This callback is called after a MlmeAssociateRequest has been called from the higher layer.
Definition: lr-wpan-mac.h:778
LrWpanMlmeAssociateConfirmStatus
Table 12 of IEEE 802.15.4-2011.
Definition: lr-wpan-mac.h:252
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:820
SuperframeType
Superframe type.
Definition: lr-wpan-mac.h:106
LrWpanMlmeCommStatus
Table 18 of IEEE 802.15.4-2011.
Definition: lr-wpan-mac.h:284
LrWpanMacPibAttributeIdentifier
IEEE802.15.4-2011 MAC PIB Attribute Identifiers Table 52 in section 6.4.2.
Definition: lr-wpan-mac.h:345
Callback< void, MlmeSyncLossIndicationParams > MlmeSyncLossIndicationCallback
This callback is called to indicate the loss of synchronization with a coordinator.
Definition: lr-wpan-mac.h:752
LrWpanPibAttributeIdentifier
IEEE802.15.4-2006 PHY PIB Attribute Identifiers Table 23 in section 6.4.2.
Definition: lr-wpan-phy.h:143
Callback< void, LrWpanMlmeGetConfirmStatus, LrWpanMacPibAttributeIdentifier, Ptr< LrWpanMacPibAttributes > > MlmeGetConfirmCallback
This callback is called after a MlmeGetRequest has been called from the higher layer to get a PIB.
Definition: lr-wpan-mac.h:833
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:800
LrWpanSyncLossReason
Table 37 of IEEE 802.15.4-2011.
Definition: lr-wpan-mac.h:271
LrWpanMlmeGetConfirmStatus
Table 20 of IEEE 802.15.4-2011.
Definition: lr-wpan-mac.h:333
@ MLMEPOLL_UNSUPPORTED_SECURITY
Definition: lr-wpan-mac.h:309
@ MLMEPOLL_SUCCESS
Definition: lr-wpan-mac.h:302
@ MLMEPOLL_NO_DATA
Definition: lr-wpan-mac.h:305
@ MLMEPOLL_FRAME_TOO_LONG
Definition: lr-wpan-mac.h:307
@ MLMEPOLL_COUNTER_ERROR
Definition: lr-wpan-mac.h:306
@ MLMEPOLL_INVALID_PARAMETER
Definition: lr-wpan-mac.h:310
@ MLMEPOLL_NO_ACK
Definition: lr-wpan-mac.h:304
@ MLMEPOLL_CHANNEL_ACCESS_FAILURE
Definition: lr-wpan-mac.h:303
@ MLMEPOLL_UNAVAILABLE_KEY
Definition: lr-wpan-mac.h:308
@ CHANNEL_ACCESS_FAILURE
CHANNEL_ACCESS_FAILURE.
Definition: lr-wpan-mac.h:79
@ MAC_IDLE
MAC_IDLE.
Definition: lr-wpan-mac.h:75
@ MAC_CSMA_DEFERRED
MAC_CSMA_DEFERRED.
Definition: lr-wpan-mac.h:84
@ MAC_CSMA
MAC_CSMA.
Definition: lr-wpan-mac.h:76
@ CHANNEL_IDLE
CHANNEL_IDLE.
Definition: lr-wpan-mac.h:80
@ MAC_GTS
MAC_GTS.
Definition: lr-wpan-mac.h:82
@ SET_PHY_TX_ON
SET_PHY_TX_ON.
Definition: lr-wpan-mac.h:81
@ MAC_INACTIVE
MAC_INACTIVE.
Definition: lr-wpan-mac.h:83
@ MAC_SENDING
MAC_SENDING.
Definition: lr-wpan-mac.h:77
@ MAC_ACK_PENDING
MAC_ACK_PENDING.
Definition: lr-wpan-mac.h:78
@ MLMESCAN_ED
Definition: lr-wpan-mac.h:182
@ MLMESCAN_PASSIVE
Definition: lr-wpan-mac.h:184
@ MLMESCAN_ORPHAN
Definition: lr-wpan-mac.h:185
@ MLMESCAN_ACTIVE
Definition: lr-wpan-mac.h:183
@ IEEE_802_15_4_TRANSACTION_OVERFLOW
Definition: lr-wpan-mac.h:196
@ IEEE_802_15_4_INVALID_GTS
Definition: lr-wpan-mac.h:200
@ IEEE_802_15_4_UNSUPPORTED_SECURITY
Definition: lr-wpan-mac.h:205
@ IEEE_802_15_4_NO_ACK
Definition: lr-wpan-mac.h:201
@ IEEE_802_15_4_CHANNEL_ACCESS_FAILURE
Definition: lr-wpan-mac.h:198
@ IEEE_802_15_4_INVALID_ADDRESS
Definition: lr-wpan-mac.h:199
@ IEEE_802_15_4_INVALID_PARAMETER
Definition: lr-wpan-mac.h:206
@ IEEE_802_15_4_COUNTER_ERROR
Definition: lr-wpan-mac.h:202
@ IEEE_802_15_4_SUCCESS
Definition: lr-wpan-mac.h:195
@ IEEE_802_15_4_FRAME_TOO_LONG
Definition: lr-wpan-mac.h:203
@ IEEE_802_15_4_TRANSACTION_EXPIRED
Definition: lr-wpan-mac.h:197
@ IEEE_802_15_4_UNAVAILABLE_KEY
Definition: lr-wpan-mac.h:204
@ MLMESCAN_UNAVAILABLE_KEY
Definition: lr-wpan-mac.h:241
@ MLMESCAN_NO_BEACON
Definition: lr-wpan-mac.h:237
@ MLMESCAN_UNSUPPORTED_SECURITY
Definition: lr-wpan-mac.h:242
@ MLMESCAN_FRAME_TOO_LONG
Definition: lr-wpan-mac.h:240
@ MLMESCAN_COUNTER_ERROR
Definition: lr-wpan-mac.h:239
@ MLMESCAN_LIMIT_REACHED
Definition: lr-wpan-mac.h:236
@ MLMESCAN_SUCCESS
Definition: lr-wpan-mac.h:235
@ MLMESCAN_SCAN_IN_PROGRESS
Definition: lr-wpan-mac.h:238
@ MLMESCAN_INVALID_PARAMETER
Definition: lr-wpan-mac.h:243
@ CFP
Contention Free Period.
Definition: lr-wpan-mac.h:96
@ INACTIVE
Inactive Period or unslotted CSMA-CA.
Definition: lr-wpan-mac.h:97
@ CAP
Contention Access Period.
Definition: lr-wpan-mac.h:95
@ BEACON
The Beacon transmission or reception Period.
Definition: lr-wpan-mac.h:94
@ MLMESET_INVALID_PARAMETER
Definition: lr-wpan-mac.h:324
@ MLMESET_INVALID_INDEX
Definition: lr-wpan-mac.h:323
@ MLMESET_READ_ONLY
Definition: lr-wpan-mac.h:321
@ MLMESET_SUCCESS
Definition: lr-wpan-mac.h:320
@ MLMESET_UNSUPPORTED_ATTRIBUTE
Definition: lr-wpan-mac.h:322
@ TX_OPTION_ACK
TX_OPTION_ACK.
Definition: lr-wpan-mac.h:63
@ TX_OPTION_INDIRECT
TX_OPTION_INDIRECT.
Definition: lr-wpan-mac.h:65
@ TX_OPTION_NONE
TX_OPTION_NONE.
Definition: lr-wpan-mac.h:62
@ TX_OPTION_GTS
TX_OPTION_GTS.
Definition: lr-wpan-mac.h:64
@ ASSOCIATED
Definition: lr-wpan-mac.h:168
@ PAN_ACCESS_DENIED
Definition: lr-wpan-mac.h:170
@ ASSOCIATED_WITHOUT_ADDRESS
Definition: lr-wpan-mac.h:171
@ PAN_AT_CAPACITY
Definition: lr-wpan-mac.h:169
@ DISASSOCIATED
Definition: lr-wpan-mac.h:172
@ MLMESTART_UNSUPPORTED_SECURITY
Definition: lr-wpan-mac.h:224
@ MLMESTART_SUPERFRAME_OVERLAP
Definition: lr-wpan-mac.h:218
@ MLMESTART_INVALID_PARAMETER
Definition: lr-wpan-mac.h:220
@ MLMESTART_TRACKING_OFF
Definition: lr-wpan-mac.h:219
@ MLMESTART_CHANNEL_ACCESS_FAILURE
Definition: lr-wpan-mac.h:225
@ MLMESTART_FRAME_TOO_LONG
Definition: lr-wpan-mac.h:222
@ MLMESTART_UNAVAILABLE_KEY
Definition: lr-wpan-mac.h:223
@ MLMESTART_SUCCESS
Definition: lr-wpan-mac.h:216
@ MLMESTART_COUNTER_ERROR
Definition: lr-wpan-mac.h:221
@ MLMESTART_NO_SHORT_ADDRESS
Definition: lr-wpan-mac.h:217
@ MLME_SCAN_REQ
Pending MLME-SCAN.request primitive.
Definition: lr-wpan-mac.h:120
@ MLME_ASSOC_REQ
Pending MLME-ASSOCIATION.request primitive.
Definition: lr-wpan-mac.h:121
@ MLME_SYNC_REQ
Pending MLME-SYNC.request primitive.
Definition: lr-wpan-mac.h:122
@ MLME_START_REQ
Pending MLME-START.request primitive.
Definition: lr-wpan-mac.h:119
@ MLME_NONE
No pending primitive.
Definition: lr-wpan-mac.h:118
@ SHORT_ADDR
Definition: lr-wpan-mac.h:157
@ NO_PANID_ADDR
Definition: lr-wpan-mac.h:155
@ EXT_ADDR
Definition: lr-wpan-mac.h:158
@ ADDR_MODE_RESERVED
Definition: lr-wpan-mac.h:156
@ MLMEASSOC_NO_DATA
Definition: lr-wpan-mac.h:258
@ MLMEASSOC_ACCESS_DENIED
Definition: lr-wpan-mac.h:255
@ MLMEASSOC_COUNTER_ERROR
Definition: lr-wpan-mac.h:259
@ MLMEASSOC_CHANNEL_ACCESS_FAILURE
Definition: lr-wpan-mac.h:256
@ MLMEASSOC_SUCCESS
Definition: lr-wpan-mac.h:253
@ MLMEASSOC_INVALID_PARAMETER
Definition: lr-wpan-mac.h:262
@ MLMEASSOC_FRAME_TOO_LONG
Definition: lr-wpan-mac.h:260
@ MLMEASSOC_NO_ACK
Definition: lr-wpan-mac.h:257
@ MLMEASSOC_UNSUPPORTED_LEGACY
Definition: lr-wpan-mac.h:261
@ MLMEASSOC_FULL_CAPACITY
Definition: lr-wpan-mac.h:254
@ INCOMING
Incoming Superframe.
Definition: lr-wpan-mac.h:108
@ OUTGOING
Outgoing Superframe.
Definition: lr-wpan-mac.h:107
@ MLMECOMMSTATUS_SUCCESS
Definition: lr-wpan-mac.h:285
@ MLMECOMMSTATUS_TRANSACTION_OVERFLOW
Definition: lr-wpan-mac.h:286
@ MLMECOMMSTATUS_FRAME_TOO_LONG
Definition: lr-wpan-mac.h:291
@ MLMECOMMSTATUS_COUNTER_ERROR
Definition: lr-wpan-mac.h:290
@ MLMECOMMSTATUS_INVALID_PARAMETER
Definition: lr-wpan-mac.h:292
@ MLMECOMMSTATUS_TRANSACTION_EXPIRED
Definition: lr-wpan-mac.h:287
@ MLMECOMMSTATUS_CHANNEL_ACCESS_FAILURE
Definition: lr-wpan-mac.h:288
@ MLMECOMMSTATUS_NO_ACK
Definition: lr-wpan-mac.h:289
@ unsupported
Definition: lr-wpan-mac.h:351
@ macBeaconPayloadLength
Definition: lr-wpan-mac.h:347
@ macShortAddress
Definition: lr-wpan-mac.h:348
@ macPanId
Definition: lr-wpan-mac.h:350
@ macBeaconPayload
Definition: lr-wpan-mac.h:346
@ macExtendedAddress
Definition: lr-wpan-mac.h:349
@ MLMESYNCLOSS_SUPERFRAME_OVERLAP
Definition: lr-wpan-mac.h:275
@ MLMESYNCLOSS_PAN_ID_CONFLICT
Definition: lr-wpan-mac.h:272
@ MLMESYNCLOSS_REALIGMENT
Definition: lr-wpan-mac.h:273
@ MLMESYNCLOSS_BEACON_LOST
Definition: lr-wpan-mac.h:274
@ MLMEGET_SUCCESS
Definition: lr-wpan-mac.h:334
@ MLMEGET_UNSUPPORTED_ATTRIBUTE
Definition: lr-wpan-mac.h:335
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Helper structure for managing pending transaction list elements (Indirect transmissions).
Definition: lr-wpan-mac.h:1637
Time expireTime
The expiration time of the packet in the indirect transmission queue.
Definition: lr-wpan-mac.h:1642
Mac64Address dstExtAddress
The destination extended Mac Address.
Definition: lr-wpan-mac.h:1640
uint8_t seqNum
The sequence number of the queued packet.
Definition: lr-wpan-mac.h:1638
Mac16Address dstShortAddress
The destination short Mac Address.
Definition: lr-wpan-mac.h:1639
Ptr< Packet > txQPkt
Queued packet.
Definition: lr-wpan-mac.h:1641
Helper structure for managing transmission queue elements.
Definition: lr-wpan-mac.h:1628
Ptr< Packet > txQPkt
Queued packet.
Definition: lr-wpan-mac.h:1630
uint8_t txQMsduHandle
MSDU Handle.
Definition: lr-wpan-mac.h:1629
IEEE802.15.4-2011 PHY PIB Attributes Table 52 in section 6.4.2.
Definition: lr-wpan-mac.h:361
Mac64Address macExtendedAddress
The EUI-64 bit address.
Definition: lr-wpan-mac.h:365
uint8_t macBeaconPayloadLength
The length in octets of the beacon payload.
Definition: lr-wpan-mac.h:363
Ptr< Packet > macBeaconPayload
The contents of the beacon payload.
Definition: lr-wpan-mac.h:362
Mac16Address macShortAddress
The 16 bit mac short address.
Definition: lr-wpan-mac.h:364
uint16_t macPanId
The identifier of the PAN.
Definition: lr-wpan-mac.h:366
MCPS-DATA.confirm params.
Definition: lr-wpan-mac.h:419
LrWpanMcpsDataConfirmStatus m_status
The status of the last MSDU transmission.
Definition: lr-wpan-mac.h:421
uint8_t m_msduHandle
MSDU handle.
Definition: lr-wpan-mac.h:420
MCPS-DATA.indication params.
Definition: lr-wpan-mac.h:431
Mac16Address m_dstAddr
Destination address.
Definition: lr-wpan-mac.h:438
uint8_t m_dstAddrMode
Destination address mode.
Definition: lr-wpan-mac.h:436
uint16_t m_dstPanId
Destination PAN identifier.
Definition: lr-wpan-mac.h:437
uint8_t m_dsn
The DSN of the received data frame.
Definition: lr-wpan-mac.h:441
uint8_t m_mpduLinkQuality
LQI value measured during reception of the MPDU.
Definition: lr-wpan-mac.h:440
uint16_t m_srcPanId
Source PAN identifier.
Definition: lr-wpan-mac.h:433
Mac64Address m_dstExtAddr
Destination extended address.
Definition: lr-wpan-mac.h:439
uint8_t m_srcAddrMode
Source address mode.
Definition: lr-wpan-mac.h:432
Mac64Address m_srcExtAddr
Source extended address.
Definition: lr-wpan-mac.h:435
Mac16Address m_srcAddr
Source address.
Definition: lr-wpan-mac.h:434
MCPS-DATA.request params.
Definition: lr-wpan-mac.h:403
LrWpanAddressMode m_srcAddrMode
Source address mode.
Definition: lr-wpan-mac.h:404
Mac64Address m_dstExtAddr
Destination extended address.
Definition: lr-wpan-mac.h:408
LrWpanAddressMode m_dstAddrMode
Destination address mode.
Definition: lr-wpan-mac.h:405
uint16_t m_dstPanId
Destination PAN identifier.
Definition: lr-wpan-mac.h:406
Mac16Address m_dstAddr
Destination address.
Definition: lr-wpan-mac.h:407
uint8_t m_msduHandle
MSDU handle.
Definition: lr-wpan-mac.h:409
uint8_t m_txOptions
Tx Options (bitfield)
Definition: lr-wpan-mac.h:410
MLME-ASSOCIATE.confirm params.
Definition: lr-wpan-mac.h:589
LrWpanMlmeAssociateConfirmStatus m_status
The status of a MLME-associate.request.
Definition: lr-wpan-mac.h:591
Mac16Address m_assocShortAddr
The short address used in the association request.
Definition: lr-wpan-mac.h:590
MLME-ASSOCIATE.indication params.
Definition: lr-wpan-mac.h:450
uint8_t lqi
The link quality indicator of the received associate request command (Not officially supported in the...
Definition: lr-wpan-mac.h:454
Mac64Address m_extDevAddr
The extended address of the device requesting association.
Definition: lr-wpan-mac.h:451
CapabilityField capabilityInfo
The operational capabilities of the device requesting association.
Definition: lr-wpan-mac.h:452
MLME-ASSOCIATE.request params.
Definition: lr-wpan-mac.h:569
uint8_t m_chNum
The channel number on which to attempt association.
Definition: lr-wpan-mac.h:570
CapabilityField m_capabilityInfo
Specifies the operational capabilities of the associating device.
Definition: lr-wpan-mac.h:580
uint8_t m_coordAddrMode
The coordinator addressing mode for this primitive and subsequent MPDU.
Definition: lr-wpan-mac.h:572
uint32_t m_chPage
The channel page on which to attempt association.
Definition: lr-wpan-mac.h:571
Mac64Address m_coordExtAddr
The extended address of the coordinator with which to associate.
Definition: lr-wpan-mac.h:578
Mac16Address m_coordShortAddr
The short address of the coordinator with which to associate.
Definition: lr-wpan-mac.h:576
uint16_t m_coordPanId
The identifier of the PAN with which to associate.
Definition: lr-wpan-mac.h:574
MLME-ASSOCIATE.response params.
Definition: lr-wpan-mac.h:464
LrWpanAssociationStatus m_status
The status of the association attempt (As defined on Table 83 IEEE 802.15.4-2006)
Definition: lr-wpan-mac.h:468
Mac16Address m_assocShortAddr
The short address allocated by the coordinator on successful assoc.
Definition: lr-wpan-mac.h:466
Mac64Address m_extDevAddr
The extended address of the device requesting association.
Definition: lr-wpan-mac.h:465
MLME-BEACON-NOTIFY.indication params.
Definition: lr-wpan-mac.h:612
uint32_t m_sduLength
The number of octets contained in the beacon payload.
Definition: lr-wpan-mac.h:615
uint8_t m_bsn
The beacon sequence number.
Definition: lr-wpan-mac.h:613
Ptr< Packet > m_sdu
The set of octets comprising the beacon payload.
Definition: lr-wpan-mac.h:616
PanDescriptor m_panDescriptor
The PAN descriptor for the received beacon.
Definition: lr-wpan-mac.h:614
MLME-COMM-STATUS.indication params.
Definition: lr-wpan-mac.h:640
Mac16Address m_srcShortAddr
The short address of the entity from which the frame causing the error originated.
Definition: lr-wpan-mac.h:644
LrWpanMlmeCommStatus m_status
The communication status.
Definition: lr-wpan-mac.h:653
Mac16Address m_dstShortAddr
The short address of the device for which the frame was intended.
Definition: lr-wpan-mac.h:649
Mac64Address m_dstExtAddr
The extended address of the device for which the frame was intended.
Definition: lr-wpan-mac.h:651
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:641
Mac64Address m_srcExtAddr
The extended address of the entity from which the frame causing the error originated.
Definition: lr-wpan-mac.h:646
uint8_t m_dstAddrMode
The destination addressing mode for this primitive.
Definition: lr-wpan-mac.h:648
uint8_t m_srcAddrMode
The source addressing mode for this primitive.
Definition: lr-wpan-mac.h:643
MLME-ORPHAN.indication params.
Definition: lr-wpan-mac.h:662
Mac64Address m_orphanAddr
The address of the orphaned device.
Definition: lr-wpan-mac.h:663
MLME-ORPHAN.response params.
Definition: lr-wpan-mac.h:672
Mac16Address m_shortAddr
The short address allocated.
Definition: lr-wpan-mac.h:674
Mac64Address m_orphanAddr
The address of the orphaned device.
Definition: lr-wpan-mac.h:673
bool m_assocMember
T = allocated with this coord | F = otherwise.
Definition: lr-wpan-mac.h:675
MLME-START.confirm params.
Definition: lr-wpan-mac.h:684
LrWpanMlmePollConfirmStatus m_status
The confirmation status resulting from a MLME-poll.request.
Definition: lr-wpan-mac.h:685
MLME-POLL.request params.
Definition: lr-wpan-mac.h:514
Mac16Address m_coorShortAddr
Coordinator short address.
Definition: lr-wpan-mac.h:518
uint16_t m_coorPanId
The PAN id of the coordinator to which the poll is intended.
Definition: lr-wpan-mac.h:517
Mac64Address m_coorExtAddr
Coordinator extended address.
Definition: lr-wpan-mac.h:519
LrWpanAddressMode m_coorAddrMode
The addressing mode of the coordinator to which the pool is intended.
Definition: lr-wpan-mac.h:515
MLME-SCAN.confirm params.
Definition: lr-wpan-mac.h:547
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:559
LrWpanMlmeScanType m_scanType
Indicates the type of scan performed (ED,ACTIVE,PASSIVE,ORPHAN).
Definition: lr-wpan-mac.h:549
uint32_t m_chPage
The channel page on which the scan was performed.
Definition: lr-wpan-mac.h:551
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:552
LrWpanMlmeScanConfirmStatus m_status
The status the request.
Definition: lr-wpan-mac.h:548
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:556
uint8_t m_resultListSize
The number of elements returned in the appropriate result list.
Definition: lr-wpan-mac.h:554
MLME-SCAN.request params.
Definition: lr-wpan-mac.h:528
uint32_t m_scanChannels
The channel numbers to be scanned.
Definition: lr-wpan-mac.h:531
uint32_t m_chPage
The channel page on which to perform scan.
Definition: lr-wpan-mac.h:538
uint8_t m_scanDuration
The factor (0-14) used to calculate the length of time to spend scanning.
Definition: lr-wpan-mac.h:534
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:529
MLME-SET.confirm params.
Definition: lr-wpan-mac.h:696
LrWpanMlmeSetConfirmStatus m_status
The result of the request to write the PIB attribute.
Definition: lr-wpan-mac.h:697
LrWpanMacPibAttributeIdentifier id
The id of the PIB attribute that was written.
Definition: lr-wpan-mac.h:700
MLME-START.confirm params.
Definition: lr-wpan-mac.h:601
LrWpanMlmeStartConfirmStatus m_status
The status of a MLME-start.request.
Definition: lr-wpan-mac.h:602
MLME-START.request params.
Definition: lr-wpan-mac.h:478
uint32_t m_logChPage
Logical channel page on which to start using the new superframe configuration.
Definition: lr-wpan-mac.h:482
uint8_t m_logCh
Logical channel on which to start using the new superframe configuration.
Definition: lr-wpan-mac.h:480
bool m_panCoor
On true this device will become coordinator.
Definition: lr-wpan-mac.h:489
bool m_coorRealgn
True if a realignment request command is to be transmitted prior changing the superframe.
Definition: lr-wpan-mac.h:492
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:486
uint32_t m_startTime
Time at which to begin transmitting beacons (Used by Coordinator not PAN Coordinators).
Definition: lr-wpan-mac.h:484
uint16_t m_PanId
Pan Identifier used by the device.
Definition: lr-wpan-mac.h:479
uint8_t m_sfrmOrd
Superframe Order, indicates the length of the CAP in time slots.
Definition: lr-wpan-mac.h:488
bool m_battLifeExt
Flag indicating whether or not the Battery life extension (BLE) features are used.
Definition: lr-wpan-mac.h:490
MLME-SYNC-LOSS.indication params.
Definition: lr-wpan-mac.h:625
uint16_t m_panId
The PAN identifier with which the device lost synchronization or to which it was realigned.
Definition: lr-wpan-mac.h:628
uint8_t m_logCh
The channel number on which the device lost synchronization or to which it was realigned.
Definition: lr-wpan-mac.h:630
LrWpanSyncLossReason m_lossReason
The reason for the lost of synchronization.
Definition: lr-wpan-mac.h:626
MLME-SYNC.request params.
Definition: lr-wpan-mac.h:502
bool m_trackBcn
True if the mlme sync with the next beacon and attempts to track future beacons.
Definition: lr-wpan-mac.h:504
uint8_t m_logCh
The channel number on which to attempt coordinator synchronization.
Definition: lr-wpan-mac.h:503
PAN Descriptor, Table 17 IEEE 802.15.4-2011.
Definition: lr-wpan-mac.h:376
LrWpanAddressMode m_coorAddrMode
The coordinator addressing mode corresponding to the received beacon frame.
Definition: lr-wpan-mac.h:377
Mac64Address m_coorExtAddr
The coordinator extended address as specified in the coordinator address mode.
Definition: lr-wpan-mac.h:383
Mac16Address m_coorShortAddr
The coordinator short address as specified in the coordinator address mode.
Definition: lr-wpan-mac.h:381
uint8_t m_logChPage
The current channel page occupied by the network.
Definition: lr-wpan-mac.h:386
uint16_t m_coorPanId
The PAN ID of the coordinator as specified in the received beacon frame.
Definition: lr-wpan-mac.h:379
bool m_gtsPermit
TRUE if the beacon is from the PAN coordinator that is accepting GTS requests.
Definition: lr-wpan-mac.h:389
SuperframeField m_superframeSpec
The superframe specification as specified in the received beacon frame.
Definition: lr-wpan-mac.h:387
uint8_t m_linkQuality
The LQI at which the network beacon was received.
Definition: lr-wpan-mac.h:391
Time m_timeStamp
Beacon frame reception time.
Definition: lr-wpan-mac.h:393
uint8_t m_logCh
The current channel number occupied by the network.
Definition: lr-wpan-mac.h:385