A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
lora-radio-energy-model-helper.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2017 University of Padova
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Romagnolo Stefano <romagnolostefano93@gmail.com>
7 */
8
9#ifndef LORA_RADIO_ENERGY_MODEL_HELPER_H
10#define LORA_RADIO_ENERGY_MODEL_HELPER_H
11
12#include "ns3/energy-model-helper.h"
13
14namespace ns3
15{
16namespace lorawan
17{
18
19/**
20 * @ingroup lorawan
21 *
22 * Installs LoraRadioEnergyModel on devices.
23 *
24 * This installer installs LoraRadioEnergyModel for only LoraNetDevice objects.
25 */
27{
28 public:
29 LoraRadioEnergyModelHelper(); //!< Default constructor
30 ~LoraRadioEnergyModelHelper() override; //!< Destructor
31
32 /**
33 * @param name The name of the attribute to set.
34 * @param v The value of the attribute.
35 *
36 * Sets an attribute of the underlying PHY object.
37 */
38 void Set(std::string name, const AttributeValue& v) override;
39
40 /**
41 * @param name The name of the model to set.
42 * @param n0 The name of the attribute to set.
43 * @param v0 The value of the attribute to set.
44 * @param n1 The name of the attribute to set.
45 * @param v1 The value of the attribute to set.
46 * @param n2 The name of the attribute to set.
47 * @param v2 The value of the attribute to set.
48 * @param n3 The name of the attribute to set.
49 * @param v3 The value of the attribute to set.
50 * @param n4 The name of the attribute to set.
51 * @param v4 The value of the attribute to set.
52 * @param n5 The name of the attribute to set.
53 * @param v5 The value of the attribute to set.
54 * @param n6 The name of the attribute to set.
55 * @param v6 The value of the attribute to set.
56 * @param n7 The name of the attribute to set.
57 * @param v7 The value of the attribute to set.
58 *
59 * Configure a Transmission Current model for this EnergySource.
60 */
61 void SetTxCurrentModel(std::string name,
62 std::string n0 = "",
64 std::string n1 = "",
66 std::string n2 = "",
68 std::string n3 = "",
70 std::string n4 = "",
72 std::string n5 = "",
74 std::string n6 = "",
76 std::string n7 = "",
78
79 private:
80 /**
81 * @param device Pointer to the NetDevice to install DeviceEnergyModel.
82 * @param source Pointer to EnergySource to install.
83 * @return Ptr<DeviceEnergyModel>.
84 *
85 * Implements DeviceEnergyModel::Install.
86 */
88 Ptr<energy::EnergySource> source) const override;
89
90 private:
91 ObjectFactory m_radioEnergy; ///< radio energy
92 ObjectFactory m_txCurrentModel; ///< transmit current model
93};
94
95} // namespace lorawan
96} // namespace ns3
97
98#endif /* LORA_RADIO_ENERGY_MODEL_HELPER_H */
uint32_t v
Hold a value for an Attribute.
Definition attribute.h:59
Creates DeviceEnergyModel objects.
A class for an empty attribute value.
Definition attribute.h:231
Instantiate subclasses of ns3::Object.
Smart pointer class similar to boost::intrusive_ptr.
Definition ptr.h:70
void Set(std::string name, const AttributeValue &v) override
ObjectFactory m_txCurrentModel
transmit current model
void SetTxCurrentModel(std::string name, std::string n0="", const AttributeValue &v0=EmptyAttributeValue(), std::string n1="", const AttributeValue &v1=EmptyAttributeValue(), std::string n2="", const AttributeValue &v2=EmptyAttributeValue(), std::string n3="", const AttributeValue &v3=EmptyAttributeValue(), std::string n4="", const AttributeValue &v4=EmptyAttributeValue(), std::string n5="", const AttributeValue &v5=EmptyAttributeValue(), std::string n6="", const AttributeValue &v6=EmptyAttributeValue(), std::string n7="", const AttributeValue &v7=EmptyAttributeValue())
Ptr< energy::DeviceEnergyModel > DoInstall(Ptr< NetDevice > device, Ptr< energy::EnergySource > source) const override
Every class exported by the ns3 library is enclosed in the ns3 namespace.