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 <ns3/event-id.h>
29#include <ns3/lr-wpan-fields.h>
30#include <ns3/lr-wpan-phy.h>
31#include <ns3/mac16-address.h>
32#include <ns3/mac64-address.h>
33#include <ns3/object.h>
34#include <ns3/sequence-number.h>
35#include <ns3/traced-callback.h>
36#include <ns3/traced-value.h>
37
38#include <deque>
39#include <memory>
40
41namespace ns3
42{
43
44class Packet;
45class LrWpanCsmaCa;
46
60{
65};
66
73{
84};
85
92{
97};
98
105{
107 INCOMING = 1
109
116{
121 MLME_SYNC_REQ = 4
123
124namespace TracedValueCallback
125{
126
134typedef void (*LrWpanMacState)(LrWpanMacState oldValue, LrWpanMacState newValue);
135
143typedef void (*SuperframeStatus)(SuperframeStatus oldValue, SuperframeStatus newValue);
144
145} // namespace TracedValueCallback
146
153{
157 EXT_ADDR = 3
159
166{
171 DISASSOCIATED = 0xff
173
180{
184 MLMESCAN_ORPHAN = 0x03
186
193{
207
214{
226
233{
244
251{
263
270{
276
283{
293
300{
311
318{
325
332{
336
344{
350 unsupported = 255
351 // TODO: complete other MAC pib attributes
353
359struct LrWpanMacPibAttributes : public SimpleRefCount<LrWpanMacPibAttributes>
360{
365 uint16_t macPanId;
366 // TODO: complete other MAC pib attributes
367};
368
375{
378 uint16_t m_coorPanId{0xffff};
384 uint8_t m_logCh{11};
385 uint8_t m_logChPage{0};
388 bool m_gtsPermit{false};
390 uint8_t m_linkQuality{0};
394};
395
402{
405 uint16_t m_dstPanId{0};
408 uint8_t m_msduHandle{0};
409 uint8_t m_txOptions{0};
410};
411
418{
419 uint8_t m_msduHandle{0};
422};
423
430{
432 uint16_t m_srcPanId{0};
436 uint16_t m_dstPanId{0};
439 uint8_t m_mpduLinkQuality{0};
440 uint8_t m_dsn{0};
441};
442
449{
453};
454
461{
467};
468
475{
476 uint16_t m_PanId{0};
477 uint8_t m_logCh{11};
483 uint8_t m_bcnOrd{15};
485 uint8_t m_sfrmOrd{15};
486 bool m_panCoor{false};
487 bool m_battLifeExt{false};
489 bool m_coorRealgn{false};
491};
492
499{
500 uint8_t m_logCh{11};
501 bool m_trackBcn{false};
503};
504
511{
513 SHORT_ADDR};
514 uint16_t m_coorPanId{0};
517};
518
525{
531 uint8_t m_scanDuration{14};
536};
537
544{
549 std::vector<uint8_t> m_unscannedCh;
551 uint8_t m_resultListSize{0};
553 std::vector<uint8_t> m_energyDetList;
556 std::vector<PanDescriptor> m_panDescList;
558};
559
566{
567 uint8_t m_chNum{11};
570 SHORT_ADDR};
571 uint16_t m_coordPanId{0};
578};
579
586{
590};
591
598{
601};
602
609{
610 uint8_t m_bsn{0};
614};
615
622{
625 uint16_t m_panId{0};
627 uint8_t m_logCh{11};
629};
630
637{
638 uint16_t m_panId{0};
651};
652
659{
661};
662
669{
672 bool m_assocMember{false};
673};
674
681{
685};
686
693{
698};
699
708
719
728
739
750
759
767
776
787
798
809
818
826typedef Callback<void,
831
837class LrWpanMac : public Object
838{
839 public:
845 static TypeId GetTypeId();
846
850 LrWpanMac();
851 ~LrWpanMac() override;
852
858 bool GetRxOnWhenIdle() const;
859
865 void SetRxOnWhenIdle(bool rxOnWhenIdle);
866
867 // XXX these setters will become obsolete if we use the attribute system
873 void SetShortAddress(Mac16Address address);
874
881
887 void SetExtendedAddress(Mac64Address address);
888
895
901 void SetPanId(uint16_t panId);
902
908 uint16_t GetPanId() const;
909
916
923
933
943
952
962
972
982
992
1001
1011
1020
1026 void SetCsmaCa(Ptr<LrWpanCsmaCa> csmaCa);
1027
1033 void SetPhy(Ptr<LrWpanPhy> phy);
1034
1041
1050
1059
1068
1077
1086
1095
1104
1113
1122
1131
1140
1149
1158
1159 // interfaces between MAC and PHY
1160
1169 void PdDataIndication(uint32_t psduLength, Ptr<Packet> p, uint8_t lqi);
1170
1178
1185
1192 void PlmeEdConfirm(LrWpanPhyEnumeration status, uint8_t energyLevel);
1193
1204 Ptr<LrWpanPhyPibAttributes> attribute);
1205
1213
1222
1228 void SetLrWpanMacState(LrWpanMacState macState);
1229
1236
1243
1249 void SetTxQMaxSize(uint32_t queueSize);
1250
1256 void SetIndTxQMaxSize(uint32_t queueSize);
1257
1258 // MAC PIB attributes
1259
1266
1274
1281
1289
1298
1305
1311
1319
1327
1338
1344
1349
1356
1364
1369
1376
1382 uint16_t m_macPanId;
1383
1389
1395
1401
1408
1414
1420
1427
1433
1439
1446
1455
1460
1465
1470
1475
1481
1487
1493
1499
1504
1509
1514
1520 uint64_t GetMacAckWaitDuration() const;
1521
1527 uint8_t GetMacMaxFrameRetries() const;
1528
1533
1539 void SetMacMaxFrameRetries(uint8_t retries);
1540
1546 bool isCoordDest();
1547
1554
1561
1568
1574 uint64_t GetTxPacketSymbols();
1575
1581 bool isTxAckReq();
1582
1587 void PrintPendTxQ(std::ostream& os) const;
1588
1593 void PrintTxQueue(std::ostream& os) const;
1594
1602 typedef void (*SentTracedCallback)(Ptr<const Packet> packet, uint8_t retries, uint8_t backoffs);
1603
1613 typedef void (*StateTracedCallback)(LrWpanMacState oldState, LrWpanMacState newState);
1614
1615 protected:
1616 // Inherited from Object.
1617 void DoInitialize() override;
1618 void DoDispose() override;
1619
1620 private:
1624 struct TxQueueElement : public SimpleRefCount<TxQueueElement>
1625 {
1628 };
1629
1633 struct IndTxQueueElement : public SimpleRefCount<IndTxQueueElement>
1634 {
1635 uint8_t seqNum;
1640 };
1641
1645 void SendOneBeacon();
1646
1651
1657
1664 void SendAssocResponseCommand(Ptr<Packet> rxDataReqPkt);
1665
1670 void LostAssocRespCommand();
1671
1676
1683
1687 void EndStartRequest();
1688
1692 void EndChannelScan();
1693
1697 void EndChannelEnergyScan();
1698
1702 void EndAssociateRequest();
1703
1710 void StartCFP(SuperframeType superframeType);
1711
1718 void StartCAP(SuperframeType superframeType);
1719
1726 void StartInactivePeriod(SuperframeType superframeType);
1727
1732 void AwaitBeacon();
1733
1737 void BeaconSearchTimeout();
1738
1744 void SendAck(uint8_t seqno);
1745
1751 void EnqueueTxQElement(Ptr<TxQueueElement> txQElement);
1752
1757 void RemoveFirstTxQElement();
1758
1764 void ChangeMacState(LrWpanMacState newState);
1765
1770 void AckWaitTimeout();
1771
1779 void IfsWaitTimeout(Time ifsTime);
1780
1787 bool PrepareRetransmission();
1788
1794 void EnqueueInd(Ptr<Packet> p);
1795
1804
1808 void PurgeInd();
1809
1816
1822 void CheckQueue();
1823
1831
1839
1847
1852
1864
1872
1880
1888
1896
1903
1912
1920
1928
1937
1946
1955
1975
1995
2005
2010
2015
2022
2029
2035
2041
2048
2055
2062
2069
2075
2081
2087
2093
2100
2105
2110
2115
2120
2125
2131
2138
2143
2147 std::deque<Ptr<TxQueueElement>> m_txQueue;
2148
2153 std::deque<Ptr<IndTxQueueElement>> m_indTxQueue;
2154
2159
2164
2169 std::vector<PanDescriptor> m_panDescriptorList;
2170
2174 std::vector<uint8_t> m_energyDetectList;
2175
2179 std::vector<uint8_t> m_unscannedChannels;
2180
2186
2192
2198
2203
2209
2215
2220
2226
2231
2236
2241
2246
2251
2256
2261
2266
2271
2276
2281
2286
2291};
2292} // namespace ns3
2293
2294#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:838
uint32_t m_incomingBeaconInterval
Indication of the interval a node should receive a superframe expressed in symbols.
Definition: lr-wpan-mac.h:1492
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:2014
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:1288
McpsDataConfirmCallback m_mcpsDataConfirmCallback
This callback is used to report data transmission request status to the upper layers.
Definition: lr-wpan-mac.h:2099
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:1273
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:224
bool m_macRxOnWhenIdle
Indication of whether the MAC sublayer is to enable its receiver during idle periods.
Definition: lr-wpan-mac.h:1426
bool m_macAssociationPermit
Indication of whether a coordinator is currently allowing association.
Definition: lr-wpan-mac.h:1445
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:1911
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:1343
void SetRxOnWhenIdle(bool rxOnWhenIdle)
Set if the receiver should be enabled when the MAC is idle.
Definition: lr-wpan-mac.cc:302
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:944
bool m_panCoor
Indication of whether the current device is the PAN coordinator.
Definition: lr-wpan-mac.h:1469
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:2219
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:845
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:2068
uint8_t m_deviceCapability
Indication of current device capability (FFD or RFD)
Definition: lr-wpan-mac.h:1503
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:1474
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:2275
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:2163
EventId m_assocResCmdWaitTimeout
Scheduler event for the lost of a association response command frame.
Definition: lr-wpan-mac.h:2235
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:1945
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:1994
void SetExtendedAddress(Mac64Address address)
Set the extended address of this MAC.
Definition: lr-wpan-mac.cc:328
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:549
uint32_t m_macLIFSPeriod
The minimum time forming a Long InterFrame Spacing (LIFS) period.
Definition: lr-wpan-mac.h:1432
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:1919
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:1895
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:1927
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:2047
Mac16Address GetShortAddress() const
Get the short address of this MAC.
Definition: lr-wpan-mac.cc:335
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:2260
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:1419
Mac64Address m_macCoordExtendedAddress
The extended address of the coordinator through which the device is associated.
Definition: lr-wpan-mac.h:1304
MlmeSyncLossIndicationCallback m_mlmeSyncLossIndicationCallback
This callback is used to indicate the loss of synchronization with a coordinator.
Definition: lr-wpan-mac.h:2040
PendingPrimitiveStatus m_pendPrimitive
Indicates the pending primitive when PLME.SET operation (page or channel switch) is called from withi...
Definition: lr-wpan-mac.h:2208
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:2061
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:2202
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:2169
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:2230
uint32_t m_maxTxQueueSize
The maximum size of the transmit queue.
Definition: lr-wpan-mac.h:2158
Ptr< Packet > m_macBeaconPayload
The contents of the beacon payload.
Definition: lr-wpan-mac.h:1407
std::deque< Ptr< TxQueueElement > > m_txQueue
The transmit queue used by the MAC.
Definition: lr-wpan-mac.h:2147
SequenceNumber8 m_macBsn
Sequence number added to transmitted beacon frame, 00-ff.
Definition: lr-wpan-mac.h:1400
LrWpanAssociationStatus m_associationStatus
The current association status of the MAC layer.
Definition: lr-wpan-mac.h:2119
Ptr< Packet > m_rxPkt
The command request packet received.
Definition: lr-wpan-mac.h:2130
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:1887
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:2137
uint8_t m_macSuperframeOrder
Used by a PAN coordinator or coordinator.
Definition: lr-wpan-mac.h:1326
void(* StateTracedCallback)(LrWpanMacState oldState, LrWpanMacState newState)
TracedCallback signature for LrWpanMacState change events.
Definition: lr-wpan-mac.h:1613
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:2174
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:978
Time m_macBeaconTxTime
The time that the device transmitted its last beacon frame.
Definition: lr-wpan-mac.h:1265
MlmeBeaconNotifyIndicationCallback m_mlmeBeaconNotifyIndicationCallback
This callback is used to notify incoming beacon packets to the upper layers.
Definition: lr-wpan-mac.h:2034
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:2004
Mac64Address GetExtendedAddress() const
Get the extended address of this MAC.
Definition: lr-wpan-mac.cc:342
EventId m_setMacState
Scheduler event for a deferred MAC state change.
Definition: lr-wpan-mac.h:2240
uint64_t m_macResponseWaitTime
The maximum time, in multiples of aBaseSuperframeDuration, a device shall wait for a response command...
Definition: lr-wpan-mac.h:1280
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:2290
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:648
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:2280
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:1974
uint8_t m_incomingBeaconOrder
The beaconOrder value of the INCOMING frame.
Definition: lr-wpan-mac.h:1355
SequenceNumber8 m_macDsn
Sequence number added to transmitted data or MAC command frame, 00-ff.
Definition: lr-wpan-mac.h:1394
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:1464
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:1337
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:1602
MlmeStartRequestParams m_startParams
The parameters used during a MLME-START.request.
Definition: lr-wpan-mac.h:2191
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:588
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:2179
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:1318
TracedCallback< Time > m_macIfsEndTrace
The trace source is fired at the end of any Interframe Space (IFS).
Definition: lr-wpan-mac.h:1851
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:2114
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:2092
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:2197
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:2225
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:2054
bool m_macPromiscuousMode
Indicates if MAC sublayer is in receive all mode.
Definition: lr-wpan-mac.h:1375
uint8_t m_fnlCapSlot
Indication of the Slot where the CAP portion of the OUTGOING Superframe ends.
Definition: lr-wpan-mac.h:1348
uint32_t m_macSIFSPeriod
The minimum time forming a Short InterFrame Spacing (SIFS) period.
Definition: lr-wpan-mac.h:1438
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:2153
uint32_t m_beaconInterval
Indication of the Interval used by the coordinator to transmit beacon frames expressed in symbols.
Definition: lr-wpan-mac.h:1480
TracedValue< LrWpanMacState > m_lrWpanMacState
The current state of the MAC layer.
Definition: lr-wpan-mac.h:2104
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:1871
EventId m_capEvent
Scheduler event for the end of the outgoing superframe CAP.
Definition: lr-wpan-mac.h:2255
TracedCallback< Ptr< const Packet > > m_macTxTrace
The trace source fired when packets are being sent down to L1.
Definition: lr-wpan-mac.h:1902
uint16_t m_macPanId
16 bits id of PAN on which this device is operating.
Definition: lr-wpan-mac.h:1382
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:229
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:723
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:1954
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:1454
uint8_t m_incomingSuperframeOrder
Used by all devices that have a parent.
Definition: lr-wpan-mac.h:1363
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:1388
uint32_t m_macBeaconPayloadLength
The length, in octets, of the beacon payload.
Definition: lr-wpan-mac.h:1413
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:1879
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:1513
Ptr< Packet > m_txPkt
The packet which is currently being sent by the MAC layer.
Definition: lr-wpan-mac.h:2124
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:349
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:1459
void DoDispose() override
Destructor implementation.
Definition: lr-wpan-mac.cc:244
MlmeScanRequestParams m_scanParams
The parameters used during a MLME-SCAN.request.
Definition: lr-wpan-mac.h:2185
MlmeAssociateIndicationCallback m_mlmeAssociateIndicationCallback
This callback is used to indicate the reception of an association request command.
Definition: lr-wpan-mac.h:2080
void SetPhy(Ptr< LrWpanPhy > phy)
Set the underlying PHY for the MAC.
Ptr< LrWpanPhy > GetPhy()
Get the underlying PHY of the MAC.
EventId m_scanOrphanEvent
Scheduler event for the end of an ORPHAN channel scan.
Definition: lr-wpan-mac.h:2285
void EndAssociateRequest()
Called to end an MLME-ASSOCIATE.request after changing the page and channel number.
Definition: lr-wpan-mac.cc:703
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:2021
Mac64Address m_selfExt
The extended 64 address (IEEE EUI-64) used by this MAC.
Definition: lr-wpan-mac.h:2142
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:2028
EventId m_incCapEvent
Scheduler event for the end of the incoming superframe CAP.
Definition: lr-wpan-mac.h:2265
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:2074
bool m_beaconTrackingOn
Indication of whether the current device is tracking incoming beacons.
Definition: lr-wpan-mac.h:1508
uint32_t m_superframeDuration
Indication of the superframe duration in symbols.
Definition: lr-wpan-mac.h:1486
bool GetRxOnWhenIdle() const
Check if the receiver will be enabled when the MAC is idle.
Definition: lr-wpan-mac.cc:296
Mac16Address m_macCoordShortAddress
The short address of the coordinator through which the device is associated.
Definition: lr-wpan-mac.h:1297
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:785
Ptr< LrWpanPhy > m_phy
The PHY associated with this MAC.
Definition: lr-wpan-mac.h:2009
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:1310
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:900
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:1936
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:885
EventId m_ifsEvent
Scheduler event for Interframe spacing wait time.
Definition: lr-wpan-mac.h:2245
EventId m_beaconEvent
Scheduler event for generation of one beacon.
Definition: lr-wpan-mac.h:2250
uint32_t m_incomingSuperframeDuration
Indication of the superframe duration in symbols (e.g.
Definition: lr-wpan-mac.h:1498
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:1863
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:321
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:2214
EventId m_incCfpEvent
Scheduler event for the end of the incoming superframe CFP.
Definition: lr-wpan-mac.h:2270
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:1368
MlmeCommStatusIndicationCallback m_mlmeCommStatusIndicationCallback
This callback is instigated through a response primitive.
Definition: lr-wpan-mac.h:2086
TracedValue< SuperframeStatus > m_incSuperframeStatus
The current period of the incoming superframe.
Definition: lr-wpan-mac.h:2109
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:707
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:718
Callback< void, MlmeStartConfirmParams > MlmeStartConfirmCallback
This callback is called after a MlmeStartRequest has been called from the higher layer.
Definition: lr-wpan-mac.h:727
Callback< void, MlmeScanConfirmParams > MlmeScanConfirmCallback
This callback is called after a MlmeScanRequest has been called from the higher layer.
Definition: lr-wpan-mac.h:766
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
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:808
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:738
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:786
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:758
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:775
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:817
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:344
Callback< void, MlmeSyncLossIndicationParams > MlmeSyncLossIndicationCallback
This callback is called to indicate the loss of synchronization with a coordinator.
Definition: lr-wpan-mac.h:749
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:830
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:797
LrWpanSyncLossReason
Table 37 of IEEE 802.15.4-2011.
Definition: lr-wpan-mac.h:270
LrWpanMlmeGetConfirmStatus
Table 20 of IEEE 802.15.4-2011.
Definition: lr-wpan-mac.h:332
@ 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
@ unsupported
Definition: lr-wpan-mac.h:350
@ macBeaconPayloadLength
Definition: lr-wpan-mac.h:346
@ macShortAddress
Definition: lr-wpan-mac.h:347
@ macPanId
Definition: lr-wpan-mac.h:349
@ macBeaconPayload
Definition: lr-wpan-mac.h:345
@ macExtendedAddress
Definition: lr-wpan-mac.h:348
@ 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
@ MLMEGET_SUCCESS
Definition: lr-wpan-mac.h:333
@ MLMEGET_UNSUPPORTED_ATTRIBUTE
Definition: lr-wpan-mac.h:334
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:1634
Time expireTime
The expiration time of the packet in the indirect transmission queue.
Definition: lr-wpan-mac.h:1639
Mac64Address dstExtAddress
The destination extended Mac Address.
Definition: lr-wpan-mac.h:1637
uint8_t seqNum
The sequence number of the queued packet.
Definition: lr-wpan-mac.h:1635
Mac16Address dstShortAddress
The destination short Mac Address.
Definition: lr-wpan-mac.h:1636
Ptr< Packet > txQPkt
Queued packet.
Definition: lr-wpan-mac.h:1638
Helper structure for managing transmission queue elements.
Definition: lr-wpan-mac.h:1625
Ptr< Packet > txQPkt
Queued packet.
Definition: lr-wpan-mac.h:1627
uint8_t txQMsduHandle
MSDU Handle.
Definition: lr-wpan-mac.h:1626
IEEE802.15.4-2011 PHY PIB Attributes Table 52 in section 6.4.2.
Definition: lr-wpan-mac.h:360
Mac64Address macExtendedAddress
The EUI-64 bit address.
Definition: lr-wpan-mac.h:364
uint8_t macBeaconPayloadLength
The length in octets of the beacon payload.
Definition: lr-wpan-mac.h:362
Ptr< Packet > macBeaconPayload
The contents of the beacon payload.
Definition: lr-wpan-mac.h:361
Mac16Address macShortAddress
The 16 bit mac short address.
Definition: lr-wpan-mac.h:363
uint16_t macPanId
The identifier of the PAN.
Definition: lr-wpan-mac.h:365
MCPS-DATA.confirm params.
Definition: lr-wpan-mac.h:418
LrWpanMcpsDataConfirmStatus m_status
The status of the last MSDU transmission.
Definition: lr-wpan-mac.h:420
uint8_t m_msduHandle
MSDU handle.
Definition: lr-wpan-mac.h:419
MCPS-DATA.indication params.
Definition: lr-wpan-mac.h:430
Mac16Address m_dstAddr
Destination address.
Definition: lr-wpan-mac.h:437
uint8_t m_dstAddrMode
Destination address mode.
Definition: lr-wpan-mac.h:435
uint16_t m_dstPanId
Destination PAN identifier.
Definition: lr-wpan-mac.h:436
uint8_t m_dsn
The DSN of the received data frame.
Definition: lr-wpan-mac.h:440
uint8_t m_mpduLinkQuality
LQI value measured during reception of the MPDU.
Definition: lr-wpan-mac.h:439
uint16_t m_srcPanId
Source PAN identifier.
Definition: lr-wpan-mac.h:432
Mac64Address m_dstExtAddr
Destination extended address.
Definition: lr-wpan-mac.h:438
uint8_t m_srcAddrMode
Source address mode.
Definition: lr-wpan-mac.h:431
Mac64Address m_srcExtAddr
Source extended address.
Definition: lr-wpan-mac.h:434
Mac16Address m_srcAddr
Source address.
Definition: lr-wpan-mac.h:433
MCPS-DATA.request params.
Definition: lr-wpan-mac.h:402
LrWpanAddressMode m_srcAddrMode
Source address mode.
Definition: lr-wpan-mac.h:403
Mac64Address m_dstExtAddr
Destination extended address.
Definition: lr-wpan-mac.h:407
LrWpanAddressMode m_dstAddrMode
Destination address mode.
Definition: lr-wpan-mac.h:404
uint16_t m_dstPanId
Destination PAN identifier.
Definition: lr-wpan-mac.h:405
Mac16Address m_dstAddr
Destination address.
Definition: lr-wpan-mac.h:406
uint8_t m_msduHandle
MSDU handle.
Definition: lr-wpan-mac.h:408
uint8_t m_txOptions
Tx Options (bitfield)
Definition: lr-wpan-mac.h:409
MLME-ASSOCIATE.confirm params.
Definition: lr-wpan-mac.h:586
LrWpanMlmeAssociateConfirmStatus m_status
The status of a MLME-associate.request.
Definition: lr-wpan-mac.h:588
Mac16Address m_assocShortAddr
The short address used in the association request.
Definition: lr-wpan-mac.h:587
MLME-ASSOCIATE.indication params.
Definition: lr-wpan-mac.h:449
Mac64Address m_extDevAddr
The extended address of the device requesting association.
Definition: lr-wpan-mac.h:450
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:566
uint8_t m_chNum
The channel number on which to attempt association.
Definition: lr-wpan-mac.h:567
CapabilityField m_capabilityInfo
Specifies the operational capabilities of the associating device.
Definition: lr-wpan-mac.h:577
uint8_t m_coordAddrMode
The coordinator addressing mode for this primitive and subsequent MPDU.
Definition: lr-wpan-mac.h:569
uint32_t m_chPage
The channel page on which to attempt association.
Definition: lr-wpan-mac.h:568
Mac64Address m_coordExtAddr
The extended address of the coordinator with which to associate.
Definition: lr-wpan-mac.h:575
Mac16Address m_coordShortAddr
The short address of the coordinator with which to associate.
Definition: lr-wpan-mac.h:573
uint16_t m_coordPanId
The identifier of the PAN with which to associate.
Definition: lr-wpan-mac.h:571
MLME-ASSOCIATE.response params.
Definition: lr-wpan-mac.h:461
LrWpanAssociationStatus m_status
The status of the association attempt (As defined on Table 83 IEEE 802.15.4-2006)
Definition: lr-wpan-mac.h:465
Mac16Address m_assocShortAddr
The short address allocated by the coordinator on successful assoc.
Definition: lr-wpan-mac.h:463
Mac64Address m_extDevAddr
The extended address of the device requesting association.
Definition: lr-wpan-mac.h:462
MLME-BEACON-NOTIFY.indication params.
Definition: lr-wpan-mac.h:609
uint32_t m_sduLength
The number of octets contained in the beacon payload.
Definition: lr-wpan-mac.h:612
uint8_t m_bsn
The beacon sequence number.
Definition: lr-wpan-mac.h:610
Ptr< Packet > m_sdu
The set of octets comprising the beacon payload.
Definition: lr-wpan-mac.h:613
PanDescriptor m_panDescriptor
The PAN descriptor for the received beacon.
Definition: lr-wpan-mac.h:611
MLME-COMM-STATUS.indication params.
Definition: lr-wpan-mac.h:637
Mac16Address m_srcShortAddr
The short address of the entity from which the frame causing the error originated.
Definition: lr-wpan-mac.h:641
LrWpanMlmeCommStatus m_status
The communication status.
Definition: lr-wpan-mac.h:650
Mac16Address m_dstShortAddr
The short address of the device for which the frame was intended.
Definition: lr-wpan-mac.h:646
Mac64Address m_dstExtAddr
The extended address of the device for which the frame was intended.
Definition: lr-wpan-mac.h:648
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:638
Mac64Address m_srcExtAddr
The extended address of the entity from which the frame causing the error originated.
Definition: lr-wpan-mac.h:643
uint8_t m_dstAddrMode
The destination addressing mode for this primitive.
Definition: lr-wpan-mac.h:645
uint8_t m_srcAddrMode
The source addressing mode for this primitive.
Definition: lr-wpan-mac.h:640
MLME-ORPHAN.indication params.
Definition: lr-wpan-mac.h:659
Mac64Address m_orphanAddr
The address of the orphaned device.
Definition: lr-wpan-mac.h:660
MLME-ORPHAN.response params.
Definition: lr-wpan-mac.h:669
Mac16Address m_shortAddr
The short address allocated.
Definition: lr-wpan-mac.h:671
Mac64Address m_orphanAddr
The address of the orphaned device.
Definition: lr-wpan-mac.h:670
bool m_assocMember
T = allocated with this coord | F = otherwise.
Definition: lr-wpan-mac.h:672
MLME-START.confirm params.
Definition: lr-wpan-mac.h:681
LrWpanMlmePollConfirmStatus m_status
The confirmation status resulting from a MLME-poll.request.
Definition: lr-wpan-mac.h:682
MLME-POLL.request params.
Definition: lr-wpan-mac.h:511
Mac16Address m_coorShortAddr
Coordinator short address.
Definition: lr-wpan-mac.h:515
uint16_t m_coorPanId
The PAN id of the coordinator to which the poll is intended.
Definition: lr-wpan-mac.h:514
Mac64Address m_coorExtAddr
Coordinator extended address.
Definition: lr-wpan-mac.h:516
LrWpanAddressMode m_coorAddrMode
The addressing mode of the coordinator to which the pool is intended.
Definition: lr-wpan-mac.h:512
MLME-SCAN.confirm params.
Definition: lr-wpan-mac.h:544
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:556
LrWpanMlmeScanType m_scanType
Indicates the type of scan performed (ED,ACTIVE,PASSIVE,ORPHAN).
Definition: lr-wpan-mac.h:546
uint32_t m_chPage
The channel page on which the scan was performed.
Definition: lr-wpan-mac.h:548
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:549
LrWpanMlmeScanConfirmStatus m_status
The status the request.
Definition: lr-wpan-mac.h:545
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:553
uint8_t m_resultListSize
The number of elements returned in the appropriate result list.
Definition: lr-wpan-mac.h:551
MLME-SCAN.request params.
Definition: lr-wpan-mac.h:525
uint32_t m_scanChannels
The channel numbers to be scanned.
Definition: lr-wpan-mac.h:528
uint32_t m_chPage
The channel page on which to perform scan.
Definition: lr-wpan-mac.h:535
uint8_t m_scanDuration
The factor (0-14) used to calculate the length of time to spend scanning.
Definition: lr-wpan-mac.h:531
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:526
MLME-SET.confirm params.
Definition: lr-wpan-mac.h:693
LrWpanMlmeSetConfirmStatus m_status
The result of the request to write the PIB attribute.
Definition: lr-wpan-mac.h:694
LrWpanMacPibAttributeIdentifier id
The id of the PIB attribute that was written.
Definition: lr-wpan-mac.h:697
MLME-START.confirm params.
Definition: lr-wpan-mac.h:598
LrWpanMlmeStartConfirmStatus m_status
The status of a MLME-start.request.
Definition: lr-wpan-mac.h:599
MLME-START.request params.
Definition: lr-wpan-mac.h:475
uint32_t m_logChPage
Logical channel page on which to start using the new superframe configuration.
Definition: lr-wpan-mac.h:479
uint8_t m_logCh
Logical channel on which to start using the new superframe configuration.
Definition: lr-wpan-mac.h:477
bool m_panCoor
On true this device will become coordinator.
Definition: lr-wpan-mac.h:486
bool m_coorRealgn
True if a realignment request command is to be transmitted prior changing the superframe.
Definition: lr-wpan-mac.h:489
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:483
uint32_t m_startTime
Time at which to begin transmitting beacons (Used by Coordinator not PAN Coordinators).
Definition: lr-wpan-mac.h:481
uint16_t m_PanId
Pan Identifier used by the device.
Definition: lr-wpan-mac.h:476
uint8_t m_sfrmOrd
Superframe Order, indicates the length of the CAP in time slots.
Definition: lr-wpan-mac.h:485
bool m_battLifeExt
Flag indicating whether or not the Battery life extension (BLE) features are used.
Definition: lr-wpan-mac.h:487
MLME-SYNC-LOSS.indication params.
Definition: lr-wpan-mac.h:622
uint16_t m_panId
The PAN identifier with which the device lost synchronization or to which it was realigned.
Definition: lr-wpan-mac.h:625
uint8_t m_logCh
The channel number on which the device lost synchronization or to which it was realigned.
Definition: lr-wpan-mac.h:627
LrWpanSyncLossReason m_lossReason
The reason for the lost of synchronization.
Definition: lr-wpan-mac.h:623
MLME-SYNC.request params.
Definition: lr-wpan-mac.h:499
bool m_trackBcn
True if the mlme sync with the next beacon and attempts to track future beacons.
Definition: lr-wpan-mac.h:501
uint8_t m_logCh
The channel number on which to attempt coordinator synchronization.
Definition: lr-wpan-mac.h:500
PAN Descriptor, Table 17 IEEE 802.15.4-2011.
Definition: lr-wpan-mac.h:375
LrWpanAddressMode m_coorAddrMode
The coordinator addressing mode corresponding to the received beacon frame.
Definition: lr-wpan-mac.h:376
Mac64Address m_coorExtAddr
The coordinator extended address as specified in the coordinator address mode.
Definition: lr-wpan-mac.h:382
Mac16Address m_coorShortAddr
The coordinator short address as specified in the coordinator address mode.
Definition: lr-wpan-mac.h:380
uint8_t m_logChPage
The current channel page occupied by the network.
Definition: lr-wpan-mac.h:385
uint16_t m_coorPanId
The PAN ID of the coordinator as specified in the received beacon frame.
Definition: lr-wpan-mac.h:378
bool m_gtsPermit
TRUE if the beacon is from the PAN coordinator that is accepting GTS requests.
Definition: lr-wpan-mac.h:388
SuperframeField m_superframeSpec
The superframe specification as specified in the received beacon frame.
Definition: lr-wpan-mac.h:386
uint8_t m_linkQuality
The LQI at which the network beacon was received.
Definition: lr-wpan-mac.h:390
Time m_timeStamp
Beacon frame reception time.
Definition: lr-wpan-mac.h:392
uint8_t m_logCh
The current channel number occupied by the network.
Definition: lr-wpan-mac.h:384