A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
zigbee-helper.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2023 Tokushima University, Japan
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author:
7
* Alberto Gallegos Ramonet <alramonet@is.tokushima-u.ac.jp>
8
*/
9
10
#ifndef ZIGBEE_HELPER_H
11
#define ZIGBEE_HELPER_H
12
13
#include "
zigbee-stack-container.h
"
14
15
#include "ns3/net-device-container.h"
16
#include "ns3/object-factory.h"
17
18
#include <string>
19
20
namespace
ns3
21
{
22
23
class
Node;
24
class
AttributeValue;
25
class
Time
;
26
27
/**
28
* @ingroup zigbee
29
*
30
* Setup a Zigbee stack to be used with LrWpanNetDevice.
31
*/
32
class
ZigbeeHelper
33
{
34
public
:
35
/*
36
* Construct a ZigbeeHelper
37
*/
38
ZigbeeHelper
();
39
/**
40
* Set an attribute on each ns3::ZigbeeStack created by
41
* ZigbeeHelper::Install.
42
*
43
* @param n1 [in] The name of the attribute to set.
44
* @param v1 [in] The value of the attribute to set.
45
*/
46
void
SetDeviceAttribute
(std::string n1,
const
AttributeValue
& v1);
47
48
/**
49
* Install the Zigbee stack on top of an existing LrWpanNetDevice.
50
*
51
* This function requires a set of properly configured LrWpanNetDevices
52
* passed in as the parameter "c". After the installation,
53
* the set Zigbee stack contains the upper layers that communicate
54
* directly with the application.
55
*
56
* Note that Zigbee is specific designed to be used on top of
57
* LrWpanDevice (IEEE 802.15.4).
58
* Any other protocol will be discarded by Zigbee.
59
*
60
*
61
* @param [in] c The NetDevice container with LrWpanNetDevices.
62
* @return A container with the newly created ZigbeeStacks.
63
*/
64
zigbee::ZigbeeStackContainer
Install
(
NetDeviceContainer
c);
65
66
/**
67
* Assign a fixed random variable stream number to the random variables
68
* used by this model. Return the number of streams (possibly zero) that
69
* have been assigned. The Install() method should have previously been
70
* called by the user.
71
*
72
* @param [in] c NetDeviceContainer of the set of net devices for which the
73
* ZigbeeStack should be modified to use a fixed stream.
74
* @param [in] stream First stream index to use.
75
* @return The number of stream indices assigned by this helper.
76
*/
77
int64_t
AssignStreams
(
NetDeviceContainer
c, int64_t stream);
78
79
private
:
80
ObjectFactory
m_stackFactory
;
//!< Zigbee stack object factory.
81
};
82
83
}
// namespace ns3
84
85
#endif
/* ZIGBEE_HELPER_H */
ns3::AttributeValue
Hold a value for an Attribute.
Definition
attribute.h:59
ns3::NetDeviceContainer
holds a vector of ns3::NetDevice pointers
Definition
net-device-container.h:32
ns3::ObjectFactory
Instantiate subclasses of ns3::Object.
Definition
object-factory.h:37
ns3::ZigbeeHelper
Setup a Zigbee stack to be used with LrWpanNetDevice.
Definition
zigbee-helper.h:33
ns3::ZigbeeHelper::ZigbeeHelper
ZigbeeHelper()
Definition
zigbee-helper.cc:23
ns3::ZigbeeHelper::Install
zigbee::ZigbeeStackContainer Install(NetDeviceContainer c)
Install the Zigbee stack on top of an existing LrWpanNetDevice.
Definition
zigbee-helper.cc:37
ns3::ZigbeeHelper::AssignStreams
int64_t AssignStreams(NetDeviceContainer c, int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model.
ns3::ZigbeeHelper::m_stackFactory
ObjectFactory m_stackFactory
Zigbee stack object factory.
Definition
zigbee-helper.h:80
ns3::ZigbeeHelper::SetDeviceAttribute
void SetDeviceAttribute(std::string n1, const AttributeValue &v1)
Set an attribute on each ns3::ZigbeeStack created by ZigbeeHelper::Install.
Definition
zigbee-helper.cc:30
ns3::zigbee::ZigbeeStackContainer
Holds a vector of ns3::ZigbeeStack pointers.
Definition
zigbee-stack-container.h:37
ns3::TracedValueCallback::Time
void(* Time)(Time oldValue, Time newValue)
TracedValue callback signature for Time.
Definition
nstime.h:864
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
zigbee-stack-container.h
src
zigbee
helper
zigbee-helper.h
Generated on Tue Feb 18 2025 18:20:56 for ns-3 by
1.11.0