A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
zigbee-aps-data.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2025 Tokushima University, Japan
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Authors:
7 *
8 * Alberto Gallegos Ramonet <alramonet@is.tokushima-u.ac.jp>
9 */
10
11/**
12 * Mesh routing example with APS layer data transmission in a simple topology.
13 *
14 * This example use a Zigbee stack formed by NWK and APS layers.
15 * The APS layer is used to transmit data, the creation of the necessary routes is
16 * handle automatically by the NWK layer. There is no ZDO, therefore we need to manually
17 * use the NWK to form the network and establish the router devices.
18 *
19 *
20 * Network Extended PAN id: 0X000000000000CA:FE (based on the PAN coordinator address)
21 *
22 * Devices Addresses:
23 *
24 * [Coordinator] ZC (dev0 | Node 0): [00:00:00:00:00:00:CA:FE] [00:00]
25 * [Router 1] ZR1 (dev1 | Node 1): [00:00:00:00:00:00:00:01] [short addr assigned by ZC]
26 * [Router 2] ZR2 (dev2 | Node 2): [00:00:00:00:00:00:00:02] [short addr assigned by ZR1]
27 * [Router 3] ZR3 (dev3 | Node 3): [00:00:00:00:00:00:00:03] [short addr assigned by ZR2]
28 * [Router 4] ZR4 (dev4 | Node 4): [00:00:00:00:00:00:00:04] [short addr assigned by ZR1]
29 *
30 * Topology:
31 *
32 * ZC--------ZR1------------ZR2----------ZR3
33 * |
34 * |
35 * ZR4
36 */
37
38#include "ns3/constant-position-mobility-model.h"
39#include "ns3/core-module.h"
40#include "ns3/log.h"
41#include "ns3/lr-wpan-module.h"
42#include "ns3/packet.h"
43#include "ns3/propagation-delay-model.h"
44#include "ns3/propagation-loss-model.h"
45#include "ns3/simulator.h"
46#include "ns3/single-model-spectrum-channel.h"
47#include "ns3/zigbee-module.h"
48
49#include <iostream>
50
51using namespace ns3;
52using namespace ns3::lrwpan;
53using namespace ns3::zigbee;
54
55NS_LOG_COMPONENT_DEFINE("ZigbeeRouting");
56
58
59static void
61{
62 std::cout << "\nTime " << Simulator::Now().As(Time::S) << " | "
63 << "Traceroute to destination [" << dst << "]:\n";
64 Mac16Address target = src;
65 uint32_t count = 1;
66 while (target != Mac16Address("FF:FF") && target != dst)
67 {
68 Ptr<ZigbeeStack> zstack;
69
70 for (auto i = zigbeeStacks.Begin(); i != zigbeeStacks.End(); i++)
71 {
72 zstack = *i;
73 if (zstack->GetNwk()->GetNetworkAddress() == target)
74 {
75 break;
76 }
77 }
78
79 bool neighbor = false;
80 target = zstack->GetNwk()->FindRoute(dst, neighbor);
81 if (target == Mac16Address("FF:FF"))
82 {
83 std::cout << count << ". Node " << zstack->GetNode()->GetId() << " ["
84 << zstack->GetNwk()->GetNetworkAddress() << " | "
85 << zstack->GetNwk()->GetIeeeAddress() << "]: "
86 << " Destination Unreachable\n";
87 }
88 else
89 {
90 std::cout << count << ". Node " << zstack->GetNode()->GetId() << " ["
91 << zstack->GetNwk()->GetNetworkAddress() << " | "
92 << zstack->GetNwk()->GetIeeeAddress() << "]: "
93 << "NextHop [" << target << "] ";
94 if (neighbor)
95 {
96 std::cout << "(*Neighbor)\n";
97 }
98 else
99 {
100 std::cout << "\n";
101 }
102 count++;
103 }
104 }
105 std::cout << "\n";
106}
107
108static void
110{
111 std::cout << Simulator::Now().As(Time::S) << " Node " << stack->GetNode()->GetId() << " | "
112 << "ApsdeDataIndication: Received packet of size " << p->GetSize()
113 << " for destination EndPoint " << params.m_dstEndPoint << "\n";
114}
115
116static void
118{
119 std::cout << "NlmeNetworkFormationConfirmStatus = " << params.m_status << "\n";
120}
121
122static void
124{
125 // See Zigbee Specification r22.1.0, 3.6.1.4.1
126 // This method implements a simplistic version of the method implemented
127 // in a zigbee APL layer. In this layer a candidate Extended PAN Id must
128 // be selected and a NLME-JOIN.request must be issued.
129
130 if (params.m_status == NwkStatus::SUCCESS)
131 {
132 std::cout << " Network discovery confirm Received. Networks found ("
133 << params.m_netDescList.size() << "):\n";
134
135 for (const auto& netDescriptor : params.m_netDescList)
136 {
137 std::cout << " ExtPanID: 0x" << std::hex << netDescriptor.m_extPanId << "\n"
138 << std::dec << " CH: " << static_cast<uint32_t>(netDescriptor.m_logCh)
139 << "\n"
140 << std::hex << " Pan ID: 0x" << netDescriptor.m_panId << "\n"
141 << " Stack profile: " << std::dec
142 << static_cast<uint32_t>(netDescriptor.m_stackProfile) << "\n"
143 << "--------------------\n";
144 }
145
146 NlmeJoinRequestParams joinParams;
147
149 capaInfo.SetDeviceType(ROUTER);
150 capaInfo.SetAllocateAddrOn(true);
151
152 joinParams.m_rejoinNetwork = zigbee::JoiningMethod::ASSOCIATION;
153 joinParams.m_capabilityInfo = capaInfo.GetCapability();
154 joinParams.m_extendedPanId = params.m_netDescList[0].m_extPanId;
155
156 Simulator::ScheduleNow(&ZigbeeNwk::NlmeJoinRequest, stack->GetNwk(), joinParams);
157 }
158 else
159 {
160 NS_ABORT_MSG("Unable to discover networks | status: " << params.m_status);
161 }
162}
163
164static void
166{
167 if (params.m_status == NwkStatus::SUCCESS)
168 {
169 std::cout << Simulator::Now().As(Time::S) << " Node " << stack->GetNode()->GetId() << " | "
170 << " The device joined the network SUCCESSFULLY with short address " << std::hex
171 << params.m_networkAddress << " on the Extended PAN Id: " << std::hex
172 << params.m_extendedPanId << "\n"
173 << std::dec;
174
175 // 3 - After dev 1 is associated, it should be started as a router
176 // (i.e. it becomes able to accept request from other devices to join the network)
177 NlmeStartRouterRequestParams startRouterParams;
179 stack->GetNwk(),
180 startRouterParams);
181 }
182 else
183 {
184 std::cout << " The device FAILED to join the network with status " << params.m_status
185 << "\n";
186 }
187}
188
189static void
191{
192 std::cout << "NlmeRouteDiscoveryConfirmStatus = " << params.m_status << "\n";
193}
194
195static void
197{
198 // Send data from a device with stackSrc to device with stackDst.
199
200 // We do not know what network address will be assigned after the JOIN procedure
201 // but we can request the network address from stackDst (the destination device) when
202 // we intend to send data. If a route do not exist, we will search for a route
203 // before transmitting data (Mesh routing).
204
206 // Src and Dst Endpoints must not be 0, because this is reserved for the ZDO.
207 // Other Endpoint numbers can help to differentiate between different applications
208 // running in the same node (similar to the concept of a port in TCP/IP).
209 // Likewise, because we currently do not have ZDO or ZCL or AF, clusterId
210 // and profileId numbers are non-sensical.
211 ApsdeDataRequestParams dataReqParams;
212 ZigbeeApsTxOptions txOptions;
213 dataReqParams.m_useAlias = false;
214 // Default, use 16 bit address destination (No option), equivalent to 0x00
215 dataReqParams.m_txOptions = txOptions.GetTxOptions();
216 dataReqParams.m_srcEndPoint = 3;
217 dataReqParams.m_clusterId = 5; // Arbitrary value
218 dataReqParams.m_profileId = 2; // Arbitrary value
219
220 dataReqParams.m_dstAddrMode = ApsDstAddressMode::DST_ADDR16_DST_ENDPOINT_PRESENT;
221 dataReqParams.m_dstAddr16 = stackDst->GetNwk()->GetNetworkAddress();
222 dataReqParams.m_dstEndPoint = 4;
223
224 Simulator::ScheduleNow(&ZigbeeAps::ApsdeDataRequest, stackSrc->GetAps(), dataReqParams, p);
225
226 // Give a few seconds to allow the creation of the route and
227 // then print the route trace and tables from the source
229 &TraceRoute,
230 stackSrc->GetNwk()->GetNetworkAddress(),
231 stackDst->GetNwk()->GetNetworkAddress());
232
234 Simulator::Schedule(Seconds(4), &ZigbeeNwk::PrintNeighborTable, stackSrc->GetNwk(), stream);
235
236 Simulator::Schedule(Seconds(4), &ZigbeeNwk::PrintRoutingTable, stackSrc->GetNwk(), stream);
237
240 stackSrc->GetNwk(),
241 stream);
242}
243
244int
245main(int argc, char* argv[])
246{
248 // Enable logs for further details
249 // LogComponentEnable("ZigbeeNwk", LOG_LEVEL_DEBUG);
250
253
255 nodes.Create(5);
256
257 //// Configure MAC
258
259 LrWpanHelper lrWpanHelper;
260 NetDeviceContainer lrwpanDevices = lrWpanHelper.Install(nodes);
261 Ptr<LrWpanNetDevice> dev0 = lrwpanDevices.Get(0)->GetObject<LrWpanNetDevice>();
262 Ptr<LrWpanNetDevice> dev1 = lrwpanDevices.Get(1)->GetObject<LrWpanNetDevice>();
263 Ptr<LrWpanNetDevice> dev2 = lrwpanDevices.Get(2)->GetObject<LrWpanNetDevice>();
264 Ptr<LrWpanNetDevice> dev3 = lrwpanDevices.Get(3)->GetObject<LrWpanNetDevice>();
265 Ptr<LrWpanNetDevice> dev4 = lrwpanDevices.Get(4)->GetObject<LrWpanNetDevice>();
266
267 // Device must ALWAYS have IEEE Address (Extended address) assigned.
268 // Network address (short address) are assigned by the the JOIN mechanism
269 dev0->GetMac()->SetExtendedAddress("00:00:00:00:00:00:CA:FE");
270 dev1->GetMac()->SetExtendedAddress("00:00:00:00:00:00:00:01");
271 dev2->GetMac()->SetExtendedAddress("00:00:00:00:00:00:00:02");
272 dev3->GetMac()->SetExtendedAddress("00:00:00:00:00:00:00:03");
273 dev4->GetMac()->SetExtendedAddress("00:00:00:00:00:00:00:04");
274
278
281
282 channel->AddPropagationLossModel(propModel);
283 channel->SetPropagationDelayModel(delayModel);
284
285 dev0->SetChannel(channel);
286 dev1->SetChannel(channel);
287 dev2->SetChannel(channel);
288 dev3->SetChannel(channel);
289 dev4->SetChannel(channel);
290
291 // Configure the Zigbee stack, by default both the NWK and the APS are present
292
293 ZigbeeHelper zigbeeHelper;
294 ZigbeeStackContainer zigbeeStackContainer = zigbeeHelper.Install(lrwpanDevices);
295
296 Ptr<ZigbeeStack> zstack0 = zigbeeStackContainer.Get(0)->GetObject<ZigbeeStack>();
297 Ptr<ZigbeeStack> zstack1 = zigbeeStackContainer.Get(1)->GetObject<ZigbeeStack>();
298 Ptr<ZigbeeStack> zstack2 = zigbeeStackContainer.Get(2)->GetObject<ZigbeeStack>();
299 Ptr<ZigbeeStack> zstack3 = zigbeeStackContainer.Get(3)->GetObject<ZigbeeStack>();
300 Ptr<ZigbeeStack> zstack4 = zigbeeStackContainer.Get(4)->GetObject<ZigbeeStack>();
301
302 // Add the stacks to a container to later on print routes.
303 zigbeeStacks.Add(zstack0);
304 zigbeeStacks.Add(zstack1);
305 zigbeeStacks.Add(zstack2);
306 zigbeeStacks.Add(zstack3);
307 zigbeeStacks.Add(zstack4);
308
309 // Assign streams to the zigbee stacks to obtain
310 // reprodusable results from random events occurring inside the stack.
311 zstack0->GetNwk()->AssignStreams(0);
312 zstack1->GetNwk()->AssignStreams(10);
313 zstack2->GetNwk()->AssignStreams(20);
314 zstack3->GetNwk()->AssignStreams(30);
315 zstack4->GetNwk()->AssignStreams(40);
316
317 //// Configure Nodes Mobility
318
320 dev0Mobility->SetPosition(Vector(0, 0, 0));
321 dev0->GetPhy()->SetMobility(dev0Mobility);
322
324 dev1Mobility->SetPosition(Vector(90, 0, 0));
325 dev1->GetPhy()->SetMobility(dev1Mobility);
326
328 dev2Mobility->SetPosition(Vector(170, 0, 0));
329 dev2->GetPhy()->SetMobility(dev2Mobility);
330
332 dev3Mobility->SetPosition(Vector(250, 0, 0));
333 dev3->GetPhy()->SetMobility(dev3Mobility);
334
336 dev4Mobility->SetPosition(Vector(90, 50, 0));
337 dev4->GetPhy()->SetMobility(dev4Mobility);
338
339 // NWK callbacks hooks
340 // These hooks are usually directly connected to the ZDO.
341 // In this case, there is no ZDO, therefore, we connect the event outputs
342 // of all devices directly to our static functions in this example.
343
344 zstack0->GetNwk()->SetNlmeNetworkFormationConfirmCallback(
346 zstack0->GetNwk()->SetNlmeRouteDiscoveryConfirmCallback(
348
349 zstack1->GetNwk()->SetNlmeNetworkDiscoveryConfirmCallback(
351 zstack2->GetNwk()->SetNlmeNetworkDiscoveryConfirmCallback(
353 zstack3->GetNwk()->SetNlmeNetworkDiscoveryConfirmCallback(
355 zstack4->GetNwk()->SetNlmeNetworkDiscoveryConfirmCallback(
357
358 zstack1->GetNwk()->SetNlmeJoinConfirmCallback(MakeBoundCallback(&NwkJoinConfirm, zstack1));
359 zstack2->GetNwk()->SetNlmeJoinConfirmCallback(MakeBoundCallback(&NwkJoinConfirm, zstack2));
360 zstack3->GetNwk()->SetNlmeJoinConfirmCallback(MakeBoundCallback(&NwkJoinConfirm, zstack3));
361 zstack4->GetNwk()->SetNlmeJoinConfirmCallback(MakeBoundCallback(&NwkJoinConfirm, zstack4));
362
363 // APS callback hooks
364
365 zstack0->GetAps()->SetApsdeDataIndicationCallback(
367 zstack1->GetAps()->SetApsdeDataIndicationCallback(
369 zstack2->GetAps()->SetApsdeDataIndicationCallback(
371 zstack3->GetAps()->SetApsdeDataIndicationCallback(
373 zstack4->GetAps()->SetApsdeDataIndicationCallback(
375
376 // 1 - Initiate the Zigbee coordinator, start the network
377 // ALL_CHANNELS = 0x07FFF800 (Channels 11~26)
379 netFormParams.m_scanChannelList.channelPageCount = 1;
381 netFormParams.m_scanDuration = 0;
382 netFormParams.m_superFrameOrder = 15;
383 netFormParams.m_beaconOrder = 15;
384
385 Simulator::ScheduleWithContext(zstack0->GetNode()->GetId(),
386 Seconds(1),
388 zstack0->GetNwk(),
389 netFormParams);
390
391 // 2- Schedule devices sequentially find and join the network.
392 // After this procedure, each device make a NLME-START-ROUTER.request to become a router
393
395 netDiscParams.m_scanChannelList.channelPageCount = 1;
396 netDiscParams.m_scanChannelList.channelsField[0] = 0x00007800; // BitMap: Channels 11~14
397 netDiscParams.m_scanDuration = 2;
398 Simulator::ScheduleWithContext(zstack1->GetNode()->GetId(),
399 Seconds(3),
401 zstack1->GetNwk(),
402 netDiscParams);
403
405 netDiscParams2.m_scanChannelList.channelPageCount = 1;
406 netDiscParams2.m_scanChannelList.channelsField[0] = 0x00007800; // BitMap: Channels 11~14
407 netDiscParams2.m_scanDuration = 2;
408 Simulator::ScheduleWithContext(zstack2->GetNode()->GetId(),
409 Seconds(4),
411 zstack2->GetNwk(),
412 netDiscParams2);
413
415 netDiscParams2.m_scanChannelList.channelPageCount = 1;
416 netDiscParams2.m_scanChannelList.channelsField[0] = 0x00007800; // BitMap: Channels 11~14
417 netDiscParams2.m_scanDuration = 2;
418 Simulator::ScheduleWithContext(zstack3->GetNode()->GetId(),
419 Seconds(5),
421 zstack3->GetNwk(),
422 netDiscParams3);
423
425 netDiscParams4.m_scanChannelList.channelPageCount = 1;
426 netDiscParams4.m_scanChannelList.channelsField[0] = 0x00007800; // BitMap: Channels 11~14
427 netDiscParams4.m_scanDuration = 2;
428 Simulator::ScheduleWithContext(zstack4->GetNode()->GetId(),
429 Seconds(6),
431 zstack4->GetNwk(),
432 netDiscParams4);
433
434 // 5- Find Route and Send data (Call to APS layer)
435
436 Simulator::Schedule(Seconds(8), &SendData, zstack0, zstack3);
437
441 return 0;
442}
helps to manage and create IEEE 802.15.4 NetDevice objects
NetDeviceContainer Install(NodeContainer c)
Install a LrWpanNetDevice and the associated structures (e.g., channel) in the nodes.
This class can contain 16 bit addresses.
holds a vector of ns3::NetDevice pointers
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr<NetDevice> stored in this container at a given index.
keep track of a set of node pointers.
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
Smart pointer class similar to boost::intrusive_ptr.
static void SetRun(uint64_t run)
Set the run number of simulation.
static void SetSeed(uint32_t seed)
Set the seed.
static EventId Schedule(const Time &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
Definition simulator.h:561
static void Destroy()
Execute the events scheduled with ScheduleDestroy().
Definition simulator.cc:131
static void ScheduleWithContext(uint32_t context, const Time &delay, FUNC f, Ts &&... args)
Schedule an event with the given context.
Definition simulator.h:578
static Time Now()
Return the current simulation virtual time.
Definition simulator.cc:197
static void Run()
Run the simulation.
Definition simulator.cc:167
static EventId ScheduleNow(FUNC f, Ts &&... args)
Schedule an event to expire Now.
Definition simulator.h:595
static void Stop()
Tell the Simulator the calling event should be the last one executed.
Definition simulator.cc:175
TimeWithUnit As(const Unit unit=Time::AUTO) const
Attach a unit to a Time, to facilitate output in a specific unit.
Definition time.cc:403
@ S
second
Definition nstime.h:105
Setup a Zigbee stack to be used with LrWpanNetDevice.
zigbee::ZigbeeStackContainer Install(NetDeviceContainer c)
Install the Zigbee stack on top of an existing LrWpanNetDevice.
Network layer to device interface.
Represent the the Capability Information Bit fields See zigbe Specification r22.1....
uint8_t GetCapability() const
Used to obtain the complete capability information bit map.
void SetDeviceType(MacDeviceType devType)
Set the device type bit for the capability information field.
void SetAllocateAddrOn(bool value)
Set the Allocate Addr On for the capability information field.
void ApsdeDataRequest(ApsdeDataRequestParams params, Ptr< Packet > asdu)
Zigbee Specification r22.1.0, Section 2.2.4.1.1 APSDE-DATA.request Request the transmission of data t...
Definition zigbee-aps.cc:81
Helper class used to craft the transmission options bitmap used by the APSDE-DATA....
Definition zigbee-aps.h:442
uint8_t GetTxOptions() const
Get the complete bitmap containing the Tx options.
void PrintRoutingTable(Ptr< OutputStreamWrapper > stream) const
Print the entries in the routing table.
void NlmeStartRouterRequest(NlmeStartRouterRequestParams params)
Zigbee Specification r22.1.0, section 3.2.2.9 NLME-START-ROUTER.request This primitive allows the nex...
void PrintNeighborTable(Ptr< OutputStreamWrapper > stream) const
Print the entries in the neighbor table.
void NlmeNetworkDiscoveryRequest(NlmeNetworkDiscoveryRequestParams params)
Zigbee Specification r22.1.0, section 3.2.2.3 NLME-NETWORK-DISCOVERY.request Allows the next higher l...
void NlmeJoinRequest(NlmeJoinRequestParams params)
Zigbee Specification r22.1.0, section 3.2.2.13 NLME-JOIN.request This primitive allows the next highe...
void PrintRouteDiscoveryTable(Ptr< OutputStreamWrapper > stream)
Print the entries in the route discovery table.
void NlmeNetworkFormationRequest(NlmeNetworkFormationRequestParams params)
Zigbee Specification r22.1.0, Section 3.2.2.5 and 3.6.1.1 NLME-NETWORK-FORMATION.request Request the ...
Holds a vector of ns3::ZigbeeStack pointers.
Iterator End() const
Get an iterator which indicates past the last ZigbeeStack in the container.
Iterator Begin() const
Get and iterator which refers to the first ZigbeeStack in the container.
Ptr< ZigbeeStack > Get(uint32_t i) const
Get a stack element from the container.
void Add(ZigbeeStackContainer other)
Append the contents of another ZigbeeStackContainer to the end of this container.
Zigbee protocol stack to device interface.
#define NS_ABORT_MSG(msg)
Unconditional abnormal program termination with a message.
Definition abort.h:38
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition log.h:191
auto MakeBoundCallback(R(*fnPtr)(Args...), BArgs &&... bargs)
Make Callbacks with varying number of bound arguments.
Definition callback.h:745
Ptr< T > CreateObject(Args &&... args)
Create an object by type, with varying number of constructor parameters.
Definition object.h:619
Ptr< T > Create(Ts &&... args)
Create class instances by constructors with varying numbers of arguments and return them by Ptr.
Definition ptr.h:439
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition nstime.h:1345
@ ROUTER
Router device.
NodeContainer nodes
static constexpr uint32_t ALL_CHANNELS
Bitmap representing all channels (11~26) LSB b0-b26, b27-b31 MSB Page 0 in Zigbee (250kbps O-QPSK)
Definition zigbee-nwk.h:47
Every class exported by the ns3 library is enclosed in the ns3 namespace.
LogLevel
Logging severity classes and levels.
Definition log.h:83
@ LOG_PREFIX_FUNC
Prefix all trace prints with function.
Definition log.h:107
@ LOG_PREFIX_TIME
Prefix all trace prints with simulation time.
Definition log.h:108
@ LOG_PREFIX_NODE
Prefix all trace prints with simulation node.
Definition log.h:109
void LogComponentEnableAll(LogLevel level)
Enable the logging output for all registered log components.
Definition log.cc:302
channel
Definition third.py:77
Zigbee Specification r22.1.0, Section 2.2.4.1.3 APSDE-DATA.indications params.
Definition zigbee-aps.h:165
Zigbee Specification r22.1.0, Section 2.2.4.1.1 APSDE-DATA.request params.
Definition zigbee-aps.h:123
uint16_t m_profileId
The application profile ID.
Definition zigbee-aps.h:129
uint16_t m_clusterId
The application cluster ID.
Definition zigbee-aps.h:130
Mac16Address m_dstAddr16
The destination 16-bit address.
Definition zigbee-aps.h:126
uint8_t m_txOptions
Transmission options.
Definition zigbee-aps.h:133
uint8_t m_srcEndPoint
The source endpoint.
Definition zigbee-aps.h:131
bool m_useAlias
Indicates if alias is used in this transmission.
Definition zigbee-aps.h:134
ApsDstAddressMode m_dstAddrMode
Destination address mode.
Definition zigbee-aps.h:124
uint8_t m_dstEndPoint
The destination endpoint.
Definition zigbee-aps.h:128
uint8_t channelPageCount
The number of the channel page structures contained in the channel list structure.
Definition zigbee-nwk.h:274
std::vector< uint32_t > channelsField
The set of channels for a given page.
Definition zigbee-nwk.h:276
NLME-JOIN.confirm params.
Definition zigbee-nwk.h:537
NLME-JOIN.request params.
Definition zigbee-nwk.h:515
JoiningMethod m_rejoinNetwork
This parameter controls the method of joining the network.
Definition zigbee-nwk.h:518
uint8_t m_capabilityInfo
The operating capabilities of the device being directly joined (Bit map).
Definition zigbee-nwk.h:524
uint64_t m_extendedPanId
The 64 bit PAN identifier of the the network to join.
Definition zigbee-nwk.h:516
NLME-NETWORK-DISCOVERY.confirm params.
Definition zigbee-nwk.h:500
NLME-NETWORK-DISCOVERY.request params.
Definition zigbee-nwk.h:461
uint8_t m_scanDuration
A value used to calculate the length of time to spend.
Definition zigbee-nwk.h:464
ChannelList m_scanChannelList
The list of all channel pages and the associated channels that shall be scanned.
Definition zigbee-nwk.h:462
NLME-NETWORK-FORMATION.confirm params.
Definition zigbee-nwk.h:393
NLME-NETWORK-FORMATION.request params.
Definition zigbee-nwk.h:348
uint8_t m_superFrameOrder
The superframe order.
Definition zigbee-nwk.h:355
ChannelList m_scanChannelList
A structure that contain a description on the pages and their channels to be scanned.
Definition zigbee-nwk.h:349
uint8_t m_scanDuration
The time spent of each channel in symbols: aBaseSuperframeDuriantion * (2n+1).
Definition zigbee-nwk.h:352
NLME-ROUTE-DISCOVERY.confirm params.
Definition zigbee-nwk.h:419
NLME-START-ROUTER.request params.
Definition zigbee-nwk.h:588
static void NwkNetworkDiscoveryConfirm(Ptr< ZigbeeStack > stack, NlmeNetworkDiscoveryConfirmParams params)
static void SendData(Ptr< ZigbeeStack > stackSrc, Ptr< ZigbeeStack > stackDst)
static void ApsDataIndication(Ptr< ZigbeeStack > stack, ApsdeDataIndicationParams params, Ptr< Packet > p)
static void TraceRoute(Mac16Address src, Mac16Address dst)
static void NwkJoinConfirm(Ptr< ZigbeeStack > stack, NlmeJoinConfirmParams params)
ZigbeeStackContainer zigbeeStacks
static void NwkRouteDiscoveryConfirm(Ptr< ZigbeeStack > stack, NlmeRouteDiscoveryConfirmParams params)
static void NwkNetworkFormationConfirm(Ptr< ZigbeeStack > stack, NlmeNetworkFormationConfirmParams params)