A Discrete-Event Network Simulator
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
14
15#include "ns3/net-device-container.h"
16#include "ns3/object-factory.h"
17
18#include <string>
19
20namespace ns3
21{
22
23class Node;
24class AttributeValue;
25class Time;
26
27/**
28 * @ingroup zigbee
29 *
30 * Setup a Zigbee stack to be used with LrWpanNetDevice.
31 */
33{
34 public:
35 /*
36 * Construct a ZigbeeHelper
37 */
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 */
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 */
Hold a value for an Attribute.
Definition attribute.h:59
holds a vector of ns3::NetDevice pointers
Instantiate subclasses of ns3::Object.
Setup a Zigbee stack to be used with LrWpanNetDevice.
zigbee::ZigbeeStackContainer Install(NetDeviceContainer c)
Install the Zigbee stack on top of an existing LrWpanNetDevice.
int64_t AssignStreams(NetDeviceContainer c, int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model.
ObjectFactory m_stackFactory
Zigbee stack object factory.
void SetDeviceAttribute(std::string n1, const AttributeValue &v1)
Set an attribute on each ns3::ZigbeeStack created by ZigbeeHelper::Install.
Holds a vector of ns3::ZigbeeStack pointers.
void(* Time)(Time oldValue, Time newValue)
TracedValue callback signature for Time.
Definition nstime.h:864
Every class exported by the ns3 library is enclosed in the ns3 namespace.