A Discrete-Event Network Simulator
API
lr-wpan-bootstrap.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2022 Tokushima University, Japan.
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 * Author: Alberto Gallegos Ramonet <alramonet@is.tokushima-u.ac.jp>
18 */
19
20/*
21 * This example demonstrates the use of lr-wpan bootstrap (i.e. IEEE 802.15.4 Scan & Association).
22 * For a full description of this process check IEEE 802.15.4-2011 Section 5.1.3.1 and Figure 18.
23 *
24 * In this example, we create a grid topology of 100 nodes.
25 * Additionally, 2 coordinators are created and set in beacon-enabled mode.
26 * Coordinator 1 = Channel 14, Pan ID 5 , Coordinator 2 = Channel 12, Pan ID 7.
27 * Nodes start scanning channels 11-14 looking for beacons for a defined duration (PASSIVE SCAN).
28 * The scanning start time is slightly different for each node to avoid a storm of association
29 * requests. When a node scan is completed, an association request is send to one coordinator based
30 * on the LQI results of the scan. A node may not find any beacons if the coordinator is outside its
31 * communication range. An association request may not be send if LQI is too low for an association.
32 *
33 * At the end of the simulation, an animation is generated (lrwpan-bootstrap.xml), showing the
34 * results of the association with each coordinator. This simulation can take a few seconds to
35 * complete.
36 */
37
38#include <ns3/core-module.h>
39#include <ns3/lr-wpan-module.h>
40#include <ns3/mobility-module.h>
41#include <ns3/netanim-module.h>
42#include <ns3/network-module.h>
43#include <ns3/propagation-module.h>
44#include <ns3/spectrum-module.h>
45
46#include <iostream>
47
48using namespace ns3;
49
53
54static void
56{
57 std::cout << Simulator::Now().As(Time::S) << " | Animation Updated, End of simulation.\n";
58 for (uint32_t i = 0; i < nodes.GetN(); ++i)
59 {
60 anim->UpdateNodeSize(i, 5, 5);
61 Ptr<Node> node = nodes.Get(i);
62 Ptr<NetDevice> netDevice = node->GetDevice(0);
63 Ptr<LrWpanNetDevice> lrwpanDevice = DynamicCast<LrWpanNetDevice>(netDevice);
64 int panId = lrwpanDevice->GetMac()->GetPanId();
65
66 switch (panId)
67 {
68 case 5:
69 anim->UpdateNodeColor(node, 0, 0, 255);
70 break;
71 case 7:
72 anim->UpdateNodeColor(node, 0, 51, 102);
73 break;
74 default:
75 break;
76 }
77 }
78}
79
80static void
82{
83 // The algorithm to select which coordinator to associate is not
84 // covered by the standard. In this case, we use the coordinator
85 // with the highest LQI value obtained from a passive scan and make
86 // sure this coordinator allows association.
87
88 if (params.m_status == MLMESCAN_SUCCESS)
89 {
90 // Select the coordinator with the highest LQI from the PAN Descriptor List
91 int maxLqi = 0;
92 int panDescIndex = 0;
93 if (params.m_panDescList.size() > 0)
94 {
95 for (uint32_t i = 0; i < params.m_panDescList.size(); i++)
96 {
97 if (params.m_panDescList[i].m_linkQuality > maxLqi)
98 {
99 maxLqi = params.m_panDescList[i].m_linkQuality;
100 panDescIndex = i;
101 }
102 }
103
104 // Only request association if the coordinator is permitting association at this moment.
105 if (params.m_panDescList[panDescIndex].m_superframeSpec.IsAssocPermit())
106 {
107 std::cout << Simulator::Now().As(Time::S) << " Node " << device->GetNode()->GetId()
108 << " [" << device->GetMac()->GetShortAddress() << " | "
109 << device->GetMac()->GetExtendedAddress() << "]"
110 << " MLME-scan.confirm: Selected PAN ID "
111 << params.m_panDescList[panDescIndex].m_coorPanId << " | LQI "
112 << static_cast<int>(params.m_panDescList[panDescIndex].m_linkQuality)
113 << "\n";
114
115 if (params.m_panDescList[panDescIndex].m_linkQuality >= 127)
116 {
117 MlmeAssociateRequestParams assocParams;
118 assocParams.m_chNum = params.m_panDescList[panDescIndex].m_logCh;
119 assocParams.m_chPage = params.m_panDescList[panDescIndex].m_logChPage;
120 assocParams.m_coordPanId = params.m_panDescList[panDescIndex].m_coorPanId;
121 assocParams.m_coordAddrMode = params.m_panDescList[panDescIndex].m_coorAddrMode;
122
123 if (params.m_panDescList[panDescIndex].m_coorAddrMode ==
125 {
127 assocParams.m_coordShortAddr =
128 params.m_panDescList[panDescIndex].m_coorShortAddr;
129 }
130 else if (assocParams.m_coordAddrMode == LrWpanAddressMode::EXT_ADDR)
131 {
133 assocParams.m_coordExtAddr =
134 params.m_panDescList[panDescIndex].m_coorExtAddr;
135 assocParams.m_coordShortAddr = Mac16Address("ff:fe");
136 }
137
138 Simulator::ScheduleNow(&LrWpanMac::MlmeAssociateRequest,
139 device->GetMac(),
140 assocParams);
141 }
142 else
143 {
144 std::cout << Simulator::Now().As(Time::S) << " Node "
145 << device->GetNode()->GetId() << " ["
146 << device->GetMac()->GetShortAddress() << " | "
147 << device->GetMac()->GetExtendedAddress() << "]"
148 << " MLME-scan.confirm: Beacon found but link quality too low for "
149 "association.\n";
150 }
151 }
152 }
153 else
154 {
155 std::cout << Simulator::Now().As(Time::S) << " Node " << device->GetNode()->GetId()
156 << " [" << device->GetMac()->GetShortAddress() << " | "
157 << device->GetMac()->GetExtendedAddress()
158 << "] MLME-scan.confirm: Beacon not found.\n";
159 }
160 }
161 else
162 {
163 std::cout << Simulator::Now().As(Time::S) << " [" << device->GetMac()->GetShortAddress()
164 << " | " << device->GetMac()->GetExtendedAddress()
165 << "] error occurred, scan failed.\n";
166 }
167}
168
169static void
171{
172 // This is typically implemented by the Coordinator next layer (3rd layer or higher).
173 // The steps described below are out of the scope of the standard.
174
175 // Here the 3rd layer should check:
176 // a) Whether or not the device was previously associated with this PAN (the coordinator
177 // keeps a list). b) The coordinator have sufficient resources available to allow the
178 // association.
179 // If the association fails, status = 1 or 2 and assocShortAddr = FFFF.
180
181 // In this example, the coordinator accepts every association request and have no association
182 // limits. Furthermore, previous associated devices are not checked.
183
184 // When short address allocation is on (set initially in the association request), the
185 // coordinator is supposed to assign a short address. In here, we just do a dummy address
186 // assign. The assigned short address is just a truncated version of the device existing
187 // extended address (i.e the default short address).
188
189 MlmeAssociateResponseParams assocRespParams;
190
191 assocRespParams.m_extDevAddr = params.m_extDevAddr;
194 {
195 // Truncate the extended address and make an assigned
196 // short address based on this. This mechanism is not described by the standard.
197 // It is just implemented here as a quick and dirty way to assign short addresses.
198 uint8_t buffer64MacAddr[8];
199 uint8_t buffer16MacAddr[2];
200
201 params.m_extDevAddr.CopyTo(buffer64MacAddr);
202 buffer16MacAddr[1] = buffer64MacAddr[7];
203 buffer16MacAddr[0] = buffer64MacAddr[6];
204
205 Mac16Address shortAddr;
206 shortAddr.CopyFrom(buffer16MacAddr);
207 assocRespParams.m_assocShortAddr = shortAddr;
208 }
209 else
210 {
211 // If Short Address allocation flag is false, the device will
212 // use its extended address to send data packets and short address will be
213 // equal to ff:fe. See 802.15.4-2011 (Section 5.3.2.2)
214 assocRespParams.m_assocShortAddr = Mac16Address("ff:fe");
215 }
216
217 Simulator::ScheduleNow(&LrWpanMac::MlmeAssociateResponse, device->GetMac(), assocRespParams);
218}
219
220static void
222{
223 // Used by coordinator higher layer to inform results of a
224 // association procedure from its mac layer.This is implemented by other protocol stacks
225 // and is only here for demonstration purposes.
226 switch (params.m_status)
227 {
229 std::cout << Simulator::Now().As(Time::S) << " Coordinator " << device->GetNode()->GetId()
230 << " [" << device->GetMac()->GetShortAddress() << " | "
231 << device->GetMac()->GetExtendedAddress() << "]"
232 << " MLME-comm-status.indication: Transaction for device " << params.m_dstExtAddr
233 << " EXPIRED in pending transaction list\n";
234 break;
236 std::cout << Simulator::Now().As(Time::S) << " Coordinator " << device->GetNode()->GetId()
237 << " [" << device->GetMac()->GetShortAddress() << " | "
238 << device->GetMac()->GetExtendedAddress() << "]"
239 << " MLME-comm-status.indication: NO ACK from " << params.m_dstExtAddr
240 << " device registered in the pending transaction list\n";
241 break;
242
244 std::cout << Simulator::Now().As(Time::S) << " Coordinator " << device->GetNode()->GetId()
245 << " [" << device->GetMac()->GetShortAddress() << " | "
246 << device->GetMac()->GetExtendedAddress() << "]"
247 << " MLME-comm-status.indication: CHANNEL ACCESS problem in transaction for "
248 << params.m_dstExtAddr << " registered in the pending transaction list\n";
249 break;
250
251 default:
252 break;
253 }
254}
255
256static void
258{
259 // Used by device higher layer to inform the results of a
260 // association procedure from its mac layer.This is implemented by other protocol stacks
261 // and is only here for demonstration purposes.
263 {
264 std::cout << Simulator::Now().As(Time::S) << " Node " << device->GetNode()->GetId() << " ["
265 << device->GetMac()->GetShortAddress() << " | "
266 << device->GetMac()->GetExtendedAddress() << "]"
267 << " MLME-associate.confirm: Association with coordinator successful."
268 << " (PAN: " << device->GetMac()->GetPanId()
269 << " | CoordShort: " << device->GetMac()->GetCoordShortAddress()
270 << " | CoordExt: " << device->GetMac()->GetCoordExtAddress() << ")\n";
271 }
273 {
274 std::cout << Simulator::Now().As(Time::S) << " Node " << device->GetNode()->GetId() << " ["
275 << device->GetMac()->GetShortAddress() << " | "
276 << device->GetMac()->GetExtendedAddress() << "]"
277 << " MLME-associate.confirm: Association with coordinator FAILED (NO ACK).\n";
278 }
279 else
280 {
281 std::cout << Simulator::Now().As(Time::S) << " Node " << device->GetNode()->GetId() << " ["
282 << device->GetMac()->GetShortAddress() << " | "
283 << device->GetMac()->GetExtendedAddress() << "]"
284 << " MLME-associate.confirm: Association with coordinator FAILED.\n";
285 }
286}
287
288static void
290{
292 {
293 std::cout
294 << Simulator::Now().As(Time::S) << " Node " << device->GetNode()->GetId() << " ["
295 << device->GetMac()->GetShortAddress() << " | "
296 << device->GetMac()->GetExtendedAddress() << "]"
297 << " MLME-poll.confirm: CHANNEL ACCESS problem when sending a data request command.\n";
298 }
300 {
301 std::cout << Simulator::Now().As(Time::S) << " Node " << device->GetNode()->GetId() << " ["
302 << device->GetMac()->GetShortAddress() << " | "
303 << device->GetMac()->GetExtendedAddress() << "]"
304 << " MLME-poll.confirm: Data Request Command FAILED (NO ACK).\n";
305 }
307 {
308 std::cout << Simulator::Now().As(Time::S) << " Node " << device->GetNode()->GetId() << " ["
309 << device->GetMac()->GetShortAddress() << " | "
310 << device->GetMac()->GetExtendedAddress() << "]"
311 << " MLME-poll.confirm: Data Request command FAILED.\n";
312 }
313}
314
315int
316main(int argc, char* argv[])
317{
319
320 nodes.Create(100);
322
324 mobility.SetMobilityModel("ns3::ConstantPositionMobilityModel");
325 mobility.SetPositionAllocator("ns3::GridPositionAllocator",
326 "MinX",
327 DoubleValue(0.0),
328 "MinY",
329 DoubleValue(0.0),
330 "DeltaX",
331 DoubleValue(30.0),
332 "DeltaY",
333 DoubleValue(30.0),
334 "GridWidth",
335 UintegerValue(20),
336 "LayoutType",
337 StringValue("RowFirst"));
338
339 mobility.Install(nodes);
340
341 Ptr<ListPositionAllocator> listPositionAlloc = CreateObject<ListPositionAllocator>();
342 listPositionAlloc->Add(Vector(210, 50, 0)); // Coordinator 1 mobility (210,50,0)
343 listPositionAlloc->Add(Vector(360, 50, 0)); // Coordinator 2 mobility (360,50,0)
344
345 mobility.SetPositionAllocator(listPositionAlloc);
346 mobility.Install(coordinators);
347
348 Ptr<SingleModelSpectrumChannel> channel = CreateObject<SingleModelSpectrumChannel>();
350 CreateObject<LogDistancePropagationLossModel>();
352 CreateObject<ConstantSpeedPropagationDelayModel>();
353
354 channel->AddPropagationLossModel(propModel);
355 channel->SetPropagationDelayModel(delayModel);
356
357 LrWpanHelper lrWpanHelper;
358 lrWpanHelper.SetChannel(channel);
359
360 NetDeviceContainer lrwpanDevices = lrWpanHelper.Install(nodes);
361 lrwpanDevices.Add(lrWpanHelper.Install(coordinators));
362
363 lrWpanHelper.AssociateToPan(lrwpanDevices, 0xffff);
364
365 // Devices hooks & MAC MLME-scan primitive set
366 for (NodeContainer::Iterator i = nodes.Begin(); i != nodes.End(); i++)
367 {
368 Ptr<Node> node = *i;
369 Ptr<NetDevice> netDevice = node->GetDevice(0);
370 Ptr<LrWpanNetDevice> lrwpanDevice = DynamicCast<LrWpanNetDevice>(netDevice);
371 lrwpanDevice->GetMac()->SetMlmeScanConfirmCallback(
372 MakeBoundCallback(&ScanConfirm, lrwpanDevice));
373 lrwpanDevice->GetMac()->SetMlmeAssociateConfirmCallback(
374 MakeBoundCallback(&AssociateConfirm, lrwpanDevice));
375 lrwpanDevice->GetMac()->SetMlmePollConfirmCallback(
376 MakeBoundCallback(&PollConfirm, lrwpanDevice));
377
378 // Devices initiate channels scan on channels 11, 12, 13, and 14 looking for beacons
379 // Scan Channels represented by bits 0-26 (27 LSB)
380 // ch 14 ch 11
381 // | |
382 // 0x7800 = 0000000000000000111100000000000
383
384 MlmeScanRequestParams scanParams;
385 scanParams.m_chPage = 0;
386 scanParams.m_scanChannels = 0x7800;
387 scanParams.m_scanDuration = 14;
388 scanParams.m_scanType = MLMESCAN_PASSIVE;
389
390 // We start the scanning process 100 milliseconds apart for each device
391 // to avoid a storm of association requests with the coordinators
392 Time jitter = Seconds(2) + MilliSeconds(std::distance(nodes.Begin(), i) * 100);
393 Simulator::ScheduleWithContext(node->GetId(),
394 jitter,
395 &LrWpanMac::MlmeScanRequest,
396 lrwpanDevice->GetMac(),
397 scanParams);
398 }
399
400 // Coordinator hooks
402 {
403 Ptr<Node> coor = *i;
404 Ptr<NetDevice> netDevice = coor->GetDevice(0);
405 Ptr<LrWpanNetDevice> lrwpanDevice = DynamicCast<LrWpanNetDevice>(netDevice);
406 lrwpanDevice->GetMac()->SetMlmeAssociateIndicationCallback(
407 MakeBoundCallback(&AssociateIndication, lrwpanDevice));
408 lrwpanDevice->GetMac()->SetMlmeCommStatusIndicationCallback(
410 }
411
412 Ptr<Node> coor1 = coordinators.Get(0);
413 Ptr<NetDevice> netDeviceCoor1 = coor1->GetDevice(0);
414 Ptr<LrWpanNetDevice> coor1Device = DynamicCast<LrWpanNetDevice>(netDeviceCoor1);
415
416 Ptr<Node> coor2 = coordinators.Get(1);
417 Ptr<NetDevice> netDeviceCoor2 = coor2->GetDevice(0);
418 Ptr<LrWpanNetDevice> coor2Device = DynamicCast<LrWpanNetDevice>(netDeviceCoor2);
419
420 // PAN coordinator 1 (PAN 5) transmits beacons on channel 12
422 params.m_panCoor = true;
423 params.m_PanId = 5;
424 params.m_bcnOrd = 3;
425 params.m_sfrmOrd = 3;
426 params.m_logCh = 12;
427
428 Simulator::ScheduleWithContext(coor1Device->GetNode()->GetId(),
429 Seconds(2.0),
430 &LrWpanMac::MlmeStartRequest,
431 coor1Device->GetMac(),
432 params);
433
434 // PAN coordinator N2 (PAN 7) transmits beacons on channel 14
436 params2.m_panCoor = true;
437 params2.m_PanId = 7;
438 params2.m_bcnOrd = 3;
439 params2.m_sfrmOrd = 3;
440 params2.m_logCh = 14;
441
442 Simulator::ScheduleWithContext(coor2Device->GetNode()->GetId(),
443 Seconds(2.0),
444 &LrWpanMac::MlmeStartRequest,
445 coor2Device->GetMac(),
446 params2);
447
448 anim = new AnimationInterface("lrwpan-bootstrap.xml");
450 anim->UpdateNodeDescription(coordinators.Get(0), "Coordinator (PAN 5)");
451 anim->UpdateNodeDescription(coordinators.Get(1), "Coordinator (PAN 7)");
452 anim->UpdateNodeColor(coordinators.Get(0), 0, 0, 255);
453 anim->UpdateNodeColor(coordinators.Get(1), 0, 51, 102);
454 anim->UpdateNodeSize(nodes.GetN(), 9, 9);
455 anim->UpdateNodeSize(nodes.GetN() + 1, 9, 9);
456
457 Simulator::Schedule(Seconds(1499), &UpdateAnimation);
458 Simulator::Stop(Seconds(1500));
459 Simulator::Run();
460
461 Simulator::Destroy();
462 delete anim;
463 return 0;
464}
Interface to network animator.
void SkipPacketTracing()
Do not trace packets.
void UpdateNodeSize(uint32_t nodeId, double width, double height)
Helper function to update the size of a node.
void UpdateNodeDescription(Ptr< Node > n, std::string descr)
Helper function to update the description for a given node.
void UpdateNodeColor(Ptr< Node > n, uint8_t r, uint8_t g, uint8_t b)
Helper function to update the node color.
bool IsShortAddrAllocOn() const
True if the device wishes the coordinator to allocate a short address as result of the association pr...
This class can be used to hold variables of floating point type such as 'double' or 'float'.
Definition: double.h:42
helps to manage and create IEEE 802.15.4 NetDevice objects
void SetChannel(Ptr< SpectrumChannel > channel)
Set the channel associated to this helper.
void AssociateToPan(NetDeviceContainer c, uint16_t panId)
Associate the nodes to the same PAN.
NetDeviceContainer Install(NodeContainer c)
Install a LrWpanNetDevice and the associated structures (e.g., channel) in the nodes.
Ptr< Node > GetNode() const override
Ptr< LrWpanMac > GetMac() const
Get the MAC used by this NetDevice.
This class can contain 16 bit addresses.
Definition: mac16-address.h:44
void CopyFrom(const uint8_t buffer[2])
void CopyTo(uint8_t buffer[8]) const
Helper class used to assign positions and mobility models to nodes.
holds a vector of ns3::NetDevice pointers
void Add(NetDeviceContainer other)
Append the contents of another NetDeviceContainer to the end of this container.
keep track of a set of node pointers.
std::vector< Ptr< Node > >::const_iterator Iterator
Node container iterator.
Iterator End() const
Get an iterator which indicates past-the-last Node in the container.
uint32_t GetN() const
Get the number of Ptr<Node> stored in this container.
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
Iterator Begin() const
Get an iterator which refers to the first Node in the container.
Ptr< Node > Get(uint32_t i) const
Get the Ptr<Node> stored in this container at a given index.
uint32_t GetId() const
Definition: node.cc:117
Ptr< NetDevice > GetDevice(uint32_t index) const
Retrieve the index-th NetDevice associated to this node.
Definition: node.cc:152
Hold variables of type string.
Definition: string.h:42
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
TimeWithUnit As(const enum Unit unit=Time::AUTO) const
Attach a unit to a Time, to facilitate output in a specific unit.
Definition: time.cc:417
Hold an unsigned integer type.
Definition: uinteger.h:45
Vector3D Vector
Vector alias typedef for compatibility with mobility models.
Definition: vector.h:324
@ MLMEPOLL_SUCCESS
Definition: lr-wpan-mac.h:301
@ MLMEPOLL_NO_ACK
Definition: lr-wpan-mac.h:303
@ MLMEPOLL_CHANNEL_ACCESS_FAILURE
Definition: lr-wpan-mac.h:302
@ MLMESCAN_PASSIVE
Definition: lr-wpan-mac.h:183
@ MLMESCAN_SUCCESS
Definition: lr-wpan-mac.h:234
@ ASSOCIATED
Definition: lr-wpan-mac.h:167
@ SHORT_ADDR
Definition: lr-wpan-mac.h:156
@ EXT_ADDR
Definition: lr-wpan-mac.h:157
@ MLMEASSOC_SUCCESS
Definition: lr-wpan-mac.h:252
@ MLMEASSOC_NO_ACK
Definition: lr-wpan-mac.h:256
@ 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
auto MakeBoundCallback(R(*fnPtr)(Args...), BArgs... bargs)
Make Callbacks with varying number of bound arguments.
Definition: callback.h:752
Time Now()
create an ns3::Time instance which contains the current simulation time.
Definition: simulator.cc:296
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:1338
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition: nstime.h:1350
static void UpdateAnimation()
static void AssociateIndication(Ptr< LrWpanNetDevice > device, MlmeAssociateIndicationParams params)
NodeContainer coordinators
static void PollConfirm(Ptr< LrWpanNetDevice > device, MlmePollConfirmParams params)
static void AssociateConfirm(Ptr< LrWpanNetDevice > device, MlmeAssociateConfirmParams params)
AnimationInterface * anim
static void ScanConfirm(Ptr< LrWpanNetDevice > device, MlmeScanConfirmParams params)
NodeContainer nodes
static void CommStatusIndication(Ptr< LrWpanNetDevice > device, MlmeCommStatusIndicationParams params)
Every class exported by the ns3 library is enclosed in the ns3 namespace.
LogLevel
Logging severity classes and levels.
Definition: log.h:94
@ LOG_PREFIX_FUNC
Prefix all trace prints with function.
Definition: log.h:118
@ LOG_PREFIX_TIME
Prefix all trace prints with simulation time.
Definition: log.h:119
@ LOG_PREFIX_NODE
Prefix all trace prints with simulation node.
Definition: log.h:120
void LogComponentEnableAll(enum LogLevel level)
Enable the logging output for all registered log components.
Definition: log.cc:380
channel
Definition: third.py:81
mobility
Definition: third.py:96
MLME-ASSOCIATE.confirm params.
Definition: lr-wpan-mac.h:524
LrWpanMlmeAssociateConfirmStatus m_status
The status of a MLME-associate.request.
Definition: lr-wpan-mac.h:526
MLME-ASSOCIATE.indication params.
Definition: lr-wpan-mac.h:392
Mac64Address m_extDevAddr
The extended address of the device requesting association.
Definition: lr-wpan-mac.h:393
CapabilityField capabilityInfo
The operational capabilities of the device requesting association.
Definition: lr-wpan-mac.h:395
MLME-ASSOCIATE.request params.
Definition: lr-wpan-mac.h:504
uint8_t m_chNum
The channel number on which to attempt association.
Definition: lr-wpan-mac.h:505
uint8_t m_coordAddrMode
The coordinator addressing mode for this primitive and subsequent MPDU.
Definition: lr-wpan-mac.h:507
uint32_t m_chPage
The channel page on which to attempt association.
Definition: lr-wpan-mac.h:506
Mac64Address m_coordExtAddr
The extended address of the coordinator with which to associate.
Definition: lr-wpan-mac.h:513
Mac16Address m_coordShortAddr
The short address of the coordinator with which to associate.
Definition: lr-wpan-mac.h:511
uint16_t m_coordPanId
The identifier of the PAN with which to associate.
Definition: lr-wpan-mac.h:509
MLME-ASSOCIATE.response params.
Definition: lr-wpan-mac.h:404
LrWpanAssociationStatus m_status
The status of the association attempt (As defined on Table 83 IEEE 802.15.4-2006)
Definition: lr-wpan-mac.h:408
Mac16Address m_assocShortAddr
The short address allocated by the coordinator on successful assoc.
Definition: lr-wpan-mac.h:406
Mac64Address m_extDevAddr
The extended address of the device requesting association.
Definition: lr-wpan-mac.h:405
MLME-COMM-STATUS.indication params.
Definition: lr-wpan-mac.h:575
LrWpanMlmeCommStatus m_status
The communication status.
Definition: lr-wpan-mac.h:588
Mac64Address m_dstExtAddr
The extended address of the device for which the frame was intended.
Definition: lr-wpan-mac.h:587
MLME-START.confirm params.
Definition: lr-wpan-mac.h:597
LrWpanMlmePollConfirmStatus m_status
The confirmation status resulting from a MLME-poll.request.
Definition: lr-wpan-mac.h:598
MLME-SCAN.confirm params.
Definition: lr-wpan-mac.h:483
std::vector< PanDescriptor > m_panDescList
A list of PAN descriptor, one for each beacon found (Not valid for ED and Orphan scans).
Definition: lr-wpan-mac.h:494
LrWpanMlmeScanConfirmStatus m_status
The status of the scan request.
Definition: lr-wpan-mac.h:484
MLME-SCAN.request params.
Definition: lr-wpan-mac.h:468
uint32_t m_scanChannels
The channel numbers to be scanned.
Definition: lr-wpan-mac.h:471
uint32_t m_chPage
The channel page on which to perform scan.
Definition: lr-wpan-mac.h:474
uint8_t m_scanDuration
A value used to calculate the length of time to spend scanning [aBaseSuperframeDuration * (2^m_scanDu...
Definition: lr-wpan-mac.h:472
LrWpanMlmeScanType m_scanType
Indicates the type of scan performed as described in IEEE 802.15.4-2011 (5.1.2.1).
Definition: lr-wpan-mac.h:469
MLME-START.request params.
Definition: lr-wpan-mac.h:418
uint8_t m_logCh
Logical channel on which to start using the new superframe configuration.
Definition: lr-wpan-mac.h:420
bool m_panCoor
On true this device will become coordinator.
Definition: lr-wpan-mac.h:429
uint8_t m_bcnOrd
Beacon Order, Used to calculate the beacon interval, a value of 15 indicates no periodic beacons will...
Definition: lr-wpan-mac.h:426
uint16_t m_PanId
Pan Identifier used by the device.
Definition: lr-wpan-mac.h:419
uint8_t m_sfrmOrd
Superframe Order, indicates the length of the CAP in time slots.
Definition: lr-wpan-mac.h:428