A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
lr-wpan-helper.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 * Tom Henderson <thomas.r.henderson@boeing.com>
20 */
21#ifndef LR_WPAN_HELPER_H
22#define LR_WPAN_HELPER_H
23
24#include <ns3/lr-wpan-mac.h>
25#include <ns3/lr-wpan-phy.h>
26#include <ns3/node-container.h>
27#include <ns3/trace-helper.h>
28
29namespace ns3
30{
31
32class SpectrumChannel;
33class MobilityModel;
34
50{
51 public:
61
71 LrWpanHelper(bool useMultiModelSpectrumChannel);
72
73 ~LrWpanHelper() override;
74
75 // Delete copy constructor and assignment operator to avoid misuse
76 LrWpanHelper(const LrWpanHelper&) = delete;
78
84
89 void SetChannel(Ptr<SpectrumChannel> channel);
90
95 void SetChannel(std::string channelName);
96
103
110
119 void CreateAssociatedPan(NetDeviceContainer c, uint16_t panId);
120
129
133 void EnableLogComponents();
134
141
147 static std::string LrWpanMacStatePrinter(LrWpanMacState e);
148
160 int64_t AssignStreams(NetDeviceContainer c, int64_t stream);
161
162 private:
174 void EnablePcapInternal(std::string prefix,
176 bool promiscuous,
177 bool explicitFilename) override;
178
191 std::string prefix,
193 bool explicitFilename) override;
194
195 private:
197};
198
199} // namespace ns3
200
201#endif /* LR_WPAN_HELPER_H */
Base class providing common user-level ascii trace operations for helpers representing net devices.
Definition: trace-helper.h:728
helps to manage and create IEEE 802.15.4 NetDevice objects
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 CreateAssociatedPan(NetDeviceContainer c, uint16_t panId)
Creates an PAN with associated nodes and assigned addresses(16 and 64) from the nodes in the node con...
LrWpanHelper(const LrWpanHelper &)=delete
void SetExtendedAddresses(NetDeviceContainer c)
Set the extended 64 bit addresses (EUI-64) for a group of LrWpanNetDevices.
void EnableLogComponents()
Helper to enable all LrWpan log components with one statement.
LrWpanHelper & operator=(const LrWpanHelper &)=delete
~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.
holds a vector of ns3::NetDevice pointers
keep track of a set of node pointers.
Base class providing common user-level pcap operations for helpers representing net devices.
Definition: trace-helper.h:623
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:78
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
Every class exported by the ns3 library is enclosed in the ns3 namespace.