A Discrete-Event Network Simulator
API
lr-wpan-helper.cc
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 * Tom Henderson <thomas.r.henderson@boeing.com>
20 */
21#include "lr-wpan-helper.h"
22
23#include "ns3/names.h"
24#include <ns3/log.h>
25#include <ns3/lr-wpan-csmaca.h>
26#include <ns3/lr-wpan-error-model.h>
27#include <ns3/lr-wpan-net-device.h>
28#include <ns3/mobility-model.h>
29#include <ns3/multi-model-spectrum-channel.h>
30#include <ns3/propagation-delay-model.h>
31#include <ns3/propagation-loss-model.h>
32#include <ns3/single-model-spectrum-channel.h>
33
34namespace ns3
35{
36
37NS_LOG_COMPONENT_DEFINE("LrWpanHelper");
38
45static void
47 std::string context,
49{
50 *stream->GetStream() << "t " << Simulator::Now().As(Time::S) << " " << context << " " << *p
51 << std::endl;
52}
53
59static void
61{
62 *stream->GetStream() << "t " << Simulator::Now().As(Time::S) << " " << *p << std::endl;
63}
64
66{
67 m_channel = CreateObject<SingleModelSpectrumChannel>();
68
70 CreateObject<LogDistancePropagationLossModel>();
71 m_channel->AddPropagationLossModel(lossModel);
72
74 CreateObject<ConstantSpeedPropagationDelayModel>();
75 m_channel->SetPropagationDelayModel(delayModel);
76}
77
78LrWpanHelper::LrWpanHelper(bool useMultiModelSpectrumChannel)
79{
80 if (useMultiModelSpectrumChannel)
81 {
82 m_channel = CreateObject<MultiModelSpectrumChannel>();
83 }
84 else
85 {
86 m_channel = CreateObject<SingleModelSpectrumChannel>();
87 }
89 CreateObject<LogDistancePropagationLossModel>();
90 m_channel->AddPropagationLossModel(lossModel);
91
93 CreateObject<ConstantSpeedPropagationDelayModel>();
94 m_channel->SetPropagationDelayModel(delayModel);
95}
96
98{
99 m_channel->Dispose();
100 m_channel = nullptr;
101}
102
103void
105{
108 LogComponentEnable("LrWpanCsmaCa", LOG_LEVEL_ALL);
109 LogComponentEnable("LrWpanErrorModel", LOG_LEVEL_ALL);
110 LogComponentEnable("LrWpanInterferenceHelper", LOG_LEVEL_ALL);
111 LogComponentEnable("LrWpanMac", LOG_LEVEL_ALL);
112 LogComponentEnable("LrWpanNetDevice", LOG_LEVEL_ALL);
113 LogComponentEnable("LrWpanPhy", LOG_LEVEL_ALL);
114 LogComponentEnable("LrWpanSpectrumSignalParameters", LOG_LEVEL_ALL);
115 LogComponentEnable("LrWpanSpectrumValueHelper", LOG_LEVEL_ALL);
116}
117
118std::string
120{
121 switch (e)
122 {
124 return std::string("BUSY");
126 return std::string("BUSY_RX");
128 return std::string("BUSY_TX");
130 return std::string("FORCE_TRX_OFF");
132 return std::string("IDLE");
134 return std::string("INVALID_PARAMETER");
136 return std::string("RX_ON");
138 return std::string("SUCCESS");
140 return std::string("TRX_OFF");
142 return std::string("TX_ON");
144 return std::string("UNSUPPORTED_ATTRIBUTE");
146 return std::string("READ_ONLY");
148 return std::string("UNSPECIFIED");
149 default:
150 return std::string("INVALID");
151 }
152}
153
154std::string
156{
157 switch (e)
158 {
159 case MAC_IDLE:
160 return std::string("MAC_IDLE");
162 return std::string("CHANNEL_ACCESS_FAILURE");
163 case CHANNEL_IDLE:
164 return std::string("CHANNEL_IDLE");
165 case SET_PHY_TX_ON:
166 return std::string("SET_PHY_TX_ON");
167 default:
168 return std::string("INVALID");
169 }
170}
171
172void
174{
175 phy->SetMobility(m);
176}
177
180{
182 for (NodeContainer::Iterator i = c.Begin(); i != c.End(); i++)
183 {
184 Ptr<Node> node = *i;
185
186 Ptr<LrWpanNetDevice> netDevice = CreateObject<LrWpanNetDevice>();
187 netDevice->SetChannel(m_channel);
188 node->AddDevice(netDevice);
189 netDevice->SetNode(node);
190 // \todo add the capability to change short address, extended
191 // address and panId. Right now they are hardcoded in LrWpanMac::LrWpanMac ()
192 devices.Add(netDevice);
193 }
194 return devices;
195}
196
199{
200 return m_channel;
201}
202
203void
205{
207}
208
209void
210LrWpanHelper::SetChannel(std::string channelName)
211{
212 Ptr<SpectrumChannel> channel = Names::Find<SpectrumChannel>(channelName);
214}
215
216int64_t
218{
219 int64_t currentStream = stream;
220 Ptr<NetDevice> netDevice;
221 for (NetDeviceContainer::Iterator i = c.Begin(); i != c.End(); ++i)
222 {
223 netDevice = (*i);
224 Ptr<LrWpanNetDevice> lrwpan = DynamicCast<LrWpanNetDevice>(netDevice);
225 if (lrwpan)
226 {
227 currentStream += lrwpan->AssignStreams(currentStream);
228 }
229 }
230 return (currentStream - stream);
231}
232
233void
235{
237 uint16_t id = 1;
238 uint8_t idBuf[2];
239
240 for (NetDeviceContainer::Iterator i = c.Begin(); i != c.End(); i++)
241 {
242 Ptr<LrWpanNetDevice> device = DynamicCast<LrWpanNetDevice>(*i);
243 if (device)
244 {
245 idBuf[0] = (id >> 8) & 0xff;
246 idBuf[1] = (id >> 0) & 0xff;
248 address.CopyFrom(idBuf);
249
250 device->GetMac()->SetPanId(panId);
251 device->GetMac()->SetShortAddress(address);
252 id++;
253 }
254 }
255}
256
257void
259 uint16_t panId,
260 Mac16Address coor,
261 uint8_t bcnOrd,
262 uint8_t sfrmOrd)
263{
265 uint16_t id = 1;
266 uint8_t idBuf[2];
268
269 if (bcnOrd > 14)
270 {
271 NS_LOG_DEBUG("The Beacon Order must be an int between 0 and 14");
272 return;
273 }
274
275 if ((sfrmOrd > 14) || (sfrmOrd > bcnOrd))
276 {
277 NS_LOG_DEBUG("The Superframe Order must be an int between 0 and 14, and less or equal to "
278 "Beacon Order");
279 return;
280 }
281
282 for (NetDeviceContainer::Iterator i = c.Begin(); i != c.End(); i++)
283 {
284 Ptr<LrWpanNetDevice> device = DynamicCast<LrWpanNetDevice>(*i);
285 if (device)
286 {
287 idBuf[0] = (id >> 8) & 0xff;
288 idBuf[1] = (id >> 0) & 0xff;
289 address.CopyFrom(idBuf);
290
291 device->GetMac()->SetShortAddress(address);
292
293 if (address == coor)
294 {
296 params.m_panCoor = true;
297 params.m_PanId = panId;
298 params.m_bcnOrd = bcnOrd;
299 params.m_sfrmOrd = sfrmOrd;
300
301 Ptr<UniformRandomVariable> uniformRandomVariable =
302 CreateObject<UniformRandomVariable>();
303 ;
304 Time jitter = Time(MilliSeconds(uniformRandomVariable->GetInteger(0, 10)));
305
306 Simulator::Schedule(jitter, &LrWpanMac::MlmeStartRequest, device->GetMac(), params);
307 }
308 else
309 {
310 device->GetMac()->SetPanId(panId);
311 device->GetMac()->SetAssociatedCoor(coor);
312 }
313 id++;
314 }
315 }
316}
317
323static void
325{
326 file->Write(Simulator::Now(), packet);
327}
328
329void
332 bool promiscuous,
333 bool explicitFilename)
334{
335 NS_LOG_FUNCTION(this << prefix << nd << promiscuous << explicitFilename);
336 //
337 // All of the Pcap enable functions vector through here including the ones
338 // that are wandering through all of devices on perhaps all of the nodes in
339 // the system.
340 //
341
342 // In the future, if we create different NetDevice types, we will
343 // have to switch on each type below and insert into the right
344 // NetDevice type
345 //
346 Ptr<LrWpanNetDevice> device = nd->GetObject<LrWpanNetDevice>();
347 if (!device)
348 {
349 NS_LOG_INFO("LrWpanHelper::EnablePcapInternal(): Device "
350 << device << " not of type ns3::LrWpanNetDevice");
351 return;
352 }
353
354 PcapHelper pcapHelper;
355
356 std::string filename;
357 if (explicitFilename)
358 {
359 filename = prefix;
360 }
361 else
362 {
363 filename = pcapHelper.GetFilenameFromDevice(prefix, device);
364 }
365
367 pcapHelper.CreateFile(filename, std::ios::out, PcapHelper::DLT_IEEE802_15_4);
368
369 if (promiscuous == true)
370 {
371 device->GetMac()->TraceConnectWithoutContext("PromiscSniffer",
373 }
374 else
375 {
376 device->GetMac()->TraceConnectWithoutContext("Sniffer",
378 }
379}
380
381void
383 std::string prefix,
385 bool explicitFilename)
386{
387 uint32_t nodeid = nd->GetNode()->GetId();
388 uint32_t deviceid = nd->GetIfIndex();
389 std::ostringstream oss;
390
391 Ptr<LrWpanNetDevice> device = nd->GetObject<LrWpanNetDevice>();
392 if (!device)
393 {
394 NS_LOG_INFO("LrWpanHelper::EnableAsciiInternal(): Device "
395 << device << " not of type ns3::LrWpanNetDevice");
396 return;
397 }
398
399 //
400 // Our default trace sinks are going to use packet printing, so we have to
401 // make sure that is turned on.
402 //
404
405 //
406 // If we are not provided an OutputStreamWrapper, we are expected to create
407 // one using the usual trace filename conventions and do a Hook*WithoutContext
408 // since there will be one file per context and therefore the context would
409 // be redundant.
410 //
411 if (!stream)
412 {
413 //
414 // Set up an output stream object to deal with private ofstream copy
415 // constructor and lifetime issues. Let the helper decide the actual
416 // name of the file given the prefix.
417 //
418 AsciiTraceHelper asciiTraceHelper;
419
420 std::string filename;
421 if (explicitFilename)
422 {
423 filename = prefix;
424 }
425 else
426 {
427 filename = asciiTraceHelper.GetFilenameFromDevice(prefix, device);
428 }
429
430 Ptr<OutputStreamWrapper> theStream = asciiTraceHelper.CreateFileStream(filename);
431
432 // Ascii traces typically have "+", '-", "d", "r", and sometimes "t"
433 // The Mac and Phy objects have the trace sources for these
434 //
435
436 asciiTraceHelper.HookDefaultReceiveSinkWithoutContext<LrWpanMac>(device->GetMac(),
437 "MacRx",
438 theStream);
439
440 device->GetMac()->TraceConnectWithoutContext(
441 "MacTx",
443
444 asciiTraceHelper.HookDefaultEnqueueSinkWithoutContext<LrWpanMac>(device->GetMac(),
445 "MacTxEnqueue",
446 theStream);
447 asciiTraceHelper.HookDefaultDequeueSinkWithoutContext<LrWpanMac>(device->GetMac(),
448 "MacTxDequeue",
449 theStream);
450 asciiTraceHelper.HookDefaultDropSinkWithoutContext<LrWpanMac>(device->GetMac(),
451 "MacTxDrop",
452 theStream);
453
454 return;
455 }
456
457 //
458 // If we are provided an OutputStreamWrapper, we are expected to use it, and
459 // to provide a context. We are free to come up with our own context if we
460 // want, and use the AsciiTraceHelper Hook*WithContext functions, but for
461 // compatibility and simplicity, we just use Config::Connect and let it deal
462 // with the context.
463 //
464 // Note that we are going to use the default trace sinks provided by the
465 // ascii trace helper. There is actually no AsciiTraceHelper in sight here,
466 // but the default trace sinks are actually publicly available static
467 // functions that are always there waiting for just such a case.
468 //
469
470 oss.str("");
471 oss << "/NodeList/" << nodeid << "/DeviceList/" << deviceid
472 << "/$ns3::LrWpanNetDevice/Mac/MacRx";
473 device->GetMac()->TraceConnect(
474 "MacRx",
475 oss.str(),
477
478 oss.str("");
479 oss << "/NodeList/" << nodeid << "/DeviceList/" << deviceid
480 << "/$ns3::LrWpanNetDevice/Mac/MacTx";
481 device->GetMac()->TraceConnect(
482 "MacTx",
483 oss.str(),
485
486 oss.str("");
487 oss << "/NodeList/" << nodeid << "/DeviceList/" << deviceid
488 << "/$ns3::LrWpanNetDevice/Mac/MacTxEnqueue";
489 device->GetMac()->TraceConnect(
490 "MacTxEnqueue",
491 oss.str(),
493
494 oss.str("");
495 oss << "/NodeList/" << nodeid << "/DeviceList/" << deviceid
496 << "/$ns3::LrWpanNetDevice/Mac/MacTxDequeue";
497 device->GetMac()->TraceConnect(
498 "MacTxDequeue",
499 oss.str(),
501
502 oss.str("");
503 oss << "/NodeList/" << nodeid << "/DeviceList/" << deviceid
504 << "/$ns3::LrWpanNetDevice/Mac/MacTxDrop";
505 device->GetMac()->TraceConnect(
506 "MacTxDrop",
507 oss.str(),
509}
510
511} // namespace ns3
Manage ASCII trace files for device models.
Definition: trace-helper.h:173
void HookDefaultDropSinkWithoutContext(Ptr< T > object, std::string traceName, Ptr< OutputStreamWrapper > stream)
Hook a trace source to the default drop operation trace sink that does not accept nor log a trace con...
Definition: trace-helper.h:533
std::string GetFilenameFromDevice(std::string prefix, Ptr< NetDevice > device, bool useObjectNames=true)
Let the ascii trace helper figure out a reasonable filename to use for an ascii trace file associated...
static void DefaultDropSinkWithContext(Ptr< OutputStreamWrapper > file, std::string context, Ptr< const Packet > p)
Basic Drop default trace sink.
static void DefaultReceiveSinkWithContext(Ptr< OutputStreamWrapper > file, std::string context, Ptr< const Packet > p)
Basic Receive default trace sink.
Ptr< OutputStreamWrapper > CreateFileStream(std::string filename, std::ios::openmode filemode=std::ios::out)
Create and initialize an output stream object we'll use to write the traced bits.
void HookDefaultEnqueueSinkWithoutContext(Ptr< T > object, std::string traceName, Ptr< OutputStreamWrapper > stream)
Hook a trace source to the default enqueue operation trace sink that does not accept nor log a trace ...
Definition: trace-helper.h:504
void HookDefaultReceiveSinkWithoutContext(Ptr< T > object, std::string traceName, Ptr< OutputStreamWrapper > stream)
Hook a trace source to the default receive operation trace sink that does not accept nor log a trace ...
Definition: trace-helper.h:591
static void DefaultEnqueueSinkWithContext(Ptr< OutputStreamWrapper > file, std::string context, Ptr< const Packet > p)
Basic Enqueue default trace sink.
void HookDefaultDequeueSinkWithoutContext(Ptr< T > object, std::string traceName, Ptr< OutputStreamWrapper > stream)
Hook a trace source to the default dequeue operation trace sink that does not accept nor log a trace ...
Definition: trace-helper.h:562
static void DefaultDequeueSinkWithContext(Ptr< OutputStreamWrapper > file, std::string context, Ptr< const Packet > p)
Basic Dequeue default trace sink.
Ptr< SpectrumChannel > GetChannel()
Get the channel associated to this helper.
Ptr< SpectrumChannel > m_channel
channel to be used for the devices
void SetChannel(Ptr< SpectrumChannel > channel)
Set the channel associated to this helper.
static std::string LrWpanPhyEnumerationPrinter(LrWpanPhyEnumeration e)
Transform the LrWpanPhyEnumeration enumeration into a printable string.
void EnablePcapInternal(std::string prefix, Ptr< NetDevice > nd, bool promiscuous, bool explicitFilename) override
Enable pcap output on the indicated net device.
void AssociateToPan(NetDeviceContainer c, uint16_t panId)
Associate the nodes to the same PAN.
void EnableLogComponents()
Helper to enable all LrWpan log components with one statement.
void AssociateToBeaconPan(NetDeviceContainer c, uint16_t panId, Mac16Address coor, uint8_t bcnOrd, uint8_t sfrmOrd)
Associate the nodes to the same PAN and initiate beacon enabled mode.
~LrWpanHelper() override
NetDeviceContainer Install(NodeContainer c)
Install a LrWpanNetDevice and the associated structures (e.g., channel) in the nodes.
void EnableAsciiInternal(Ptr< OutputStreamWrapper > stream, std::string prefix, Ptr< NetDevice > nd, bool explicitFilename) override
Enable ascii trace output on the indicated net device.
LrWpanHelper()
Create a LrWpan helper in an empty state.
void AddMobility(Ptr< LrWpanPhy > phy, Ptr< MobilityModel > m)
Add mobility model to a physical device.
static std::string LrWpanMacStatePrinter(LrWpanMacState e)
Transform the LrWpanMacState enumeration into a printable string.
int64_t AssignStreams(NetDeviceContainer c, int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model.
Class that implements the LR-WPAN MAC state machine.
Definition: lr-wpan-mac.h:709
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:537
Network layer to device interface.
void SetChannel(Ptr< SpectrumChannel > channel)
Set the channel to which the NetDevice, and therefore the PHY, should be attached to.
Ptr< LrWpanMac > GetMac() const
Get the MAC used by this NetDevice.
void SetNode(Ptr< Node > node) override
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model.
This class can contain 16 bit addresses.
Definition: mac16-address.h:44
holds a vector of ns3::NetDevice pointers
std::vector< Ptr< NetDevice > >::const_iterator Iterator
NetDevice container iterator.
Iterator Begin() const
Get an iterator which refers to the first NetDevice in the container.
Iterator End() const
Get an iterator which indicates past-the-last NetDevice in the 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.
Iterator Begin() const
Get an iterator which refers to the first Node in the container.
uint32_t AddDevice(Ptr< NetDevice > device)
Associate a NetDevice to this node.
Definition: node.cc:138
std::ostream * GetStream()
Return a pointer to an ostream previously set in the wrapper.
static void EnablePrinting()
Enable printing packets metadata.
Definition: packet.cc:596
Manage pcap files for device models.
Definition: trace-helper.h:39
std::string GetFilenameFromDevice(std::string prefix, Ptr< NetDevice > device, bool useObjectNames=true)
Let the pcap helper figure out a reasonable filename to use for a pcap file associated with a device.
Definition: trace-helper.cc:79
Ptr< PcapFileWrapper > CreateFile(std::string filename, std::ios::openmode filemode, DataLinkType dataLinkType, uint32_t snapLen=std::numeric_limits< uint32_t >::max(), int32_t tzCorrection=0)
Create and initialize a pcap file.
Definition: trace-helper.cc:49
static EventId Schedule(const Time &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
Definition: simulator.h:568
static Time Now()
Return the current simulation virtual time.
Definition: simulator.cc:199
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
@ S
second
Definition: nstime.h:116
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
uint32_t GetInteger(uint32_t min, uint32_t max)
Get the next random value, as an unsigned integer in the specified range .
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:202
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Definition: log.h:268
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
Definition: log.h:275
LrWpanMacState
MAC states.
Definition: lr-wpan-mac.h:73
LrWpanPhyEnumeration
IEEE802.15.4-2006 PHY Emumerations Table 18 in section 6.2.3.
Definition: lr-wpan-phy.h:109
@ CHANNEL_ACCESS_FAILURE
CHANNEL_ACCESS_FAILURE.
Definition: lr-wpan-mac.h:78
@ MAC_IDLE
MAC_IDLE.
Definition: lr-wpan-mac.h:74
@ CHANNEL_IDLE
CHANNEL_IDLE.
Definition: lr-wpan-mac.h:79
@ SET_PHY_TX_ON
SET_PHY_TX_ON.
Definition: lr-wpan-mac.h:80
@ IEEE_802_15_4_PHY_BUSY_RX
Definition: lr-wpan-phy.h:111
@ IEEE_802_15_4_PHY_UNSUPPORTED_ATTRIBUTE
Definition: lr-wpan-phy.h:120
@ IEEE_802_15_4_PHY_BUSY
Definition: lr-wpan-phy.h:110
@ IEEE_802_15_4_PHY_SUCCESS
Definition: lr-wpan-phy.h:117
@ IEEE_802_15_4_PHY_UNSPECIFIED
Definition: lr-wpan-phy.h:122
@ IEEE_802_15_4_PHY_TRX_OFF
Definition: lr-wpan-phy.h:118
@ IEEE_802_15_4_PHY_FORCE_TRX_OFF
Definition: lr-wpan-phy.h:113
@ IEEE_802_15_4_PHY_BUSY_TX
Definition: lr-wpan-phy.h:112
@ IEEE_802_15_4_PHY_RX_ON
Definition: lr-wpan-phy.h:116
@ IEEE_802_15_4_PHY_TX_ON
Definition: lr-wpan-phy.h:119
@ IEEE_802_15_4_PHY_INVALID_PARAMETER
Definition: lr-wpan-phy.h:115
@ IEEE_802_15_4_PHY_READ_ONLY
Definition: lr-wpan-phy.h:121
@ IEEE_802_15_4_PHY_IDLE
Definition: lr-wpan-phy.h:114
auto MakeBoundCallback(R(*fnPtr)(Args...), BArgs... bargs)
Make Callbacks with varying number of bound arguments.
Definition: callback.h:752
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition: nstime.h:1350
address
Definition: first.py:40
devices
Definition: first.py:35
void(* Time)(Time oldValue, Time newValue)
TracedValue callback signature for Time.
Definition: nstime.h:850
Every class exported by the ns3 library is enclosed in the ns3 namespace.
static void AsciiLrWpanMacTransmitSinkWithContext(Ptr< OutputStreamWrapper > stream, std::string context, Ptr< const Packet > p)
Output an ascii line representing the Transmit event (with context)
static void AsciiLrWpanMacTransmitSinkWithoutContext(Ptr< OutputStreamWrapper > stream, Ptr< const Packet > p)
Output an ascii line representing the Transmit event (without context)
static void PcapSniffLrWpan(Ptr< PcapFileWrapper > file, Ptr< const Packet > packet)
Write a packet in a PCAP file.
@ LOG_LEVEL_ALL
Print everything.
Definition: log.h:116
@ 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
void LogComponentEnable(const char *name, enum LogLevel level)
Enable the logging output associated with that log component.
Definition: log.cc:358
void LogComponentEnableAll(enum LogLevel level)
Enable the logging output for all registered log components.
Definition: log.cc:380
channel
Definition: third.py:81
phy
Definition: third.py:82
MLME-START.request params.
Definition: lr-wpan-mac.h:418
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