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
lora-tx-current-model.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
* Authors: Romagnolo Stefano <romagnolostefano93@gmail.com>
7
* Davide Magrin <magrinda@dei.unipd.it>
8
*/
9
10
#ifndef LORA_TX_CURRENT_MODEL_H
11
#define LORA_TX_CURRENT_MODEL_H
12
13
#include "ns3/object.h"
14
15
namespace
ns3
16
{
17
namespace
lorawan
18
{
19
20
/**
21
* @ingroup lorawan
22
*
23
* @brief Model the transmit current as a function of the transmit power and mode
24
*/
25
class
LoraTxCurrentModel
:
public
Object
26
{
27
public
:
28
/**
29
* Register this type.
30
* @return The object TypeId.
31
*/
32
static
TypeId
GetTypeId
();
33
34
LoraTxCurrentModel
();
//!< Default constructor
35
~LoraTxCurrentModel
()
override
;
//!< Destructor
36
37
/**
38
* Get the current for transmission at this power.
39
*
40
* @param txPowerDbm The nominal tx power in dBm.
41
* @return The transmit current (in Ampere).
42
*/
43
virtual
double
CalcTxCurrent
(
double
txPowerDbm)
const
= 0;
44
};
45
46
/**
47
* @ingroup lorawan
48
*
49
* @brief A linear model of the transmission current for a LoRa device
50
*
51
* This model assumes that the transmit current is a linear function of the nominal transmit power
52
* used to send the frame. Adapted from LinearWifiTxCurrentModel, the default values are obtained by
53
* line interpolation of the (7dBm, 18mA) and (13dBm, 28mA) values for TX power (converted to Watt)
54
* and respective current found in the SX1272/73 Datasheet, Rev. 4, Jan. 2019.
55
*/
56
class
LinearLoraTxCurrentModel
:
public
LoraTxCurrentModel
57
{
58
public
:
59
/**
60
* Register this type.
61
* @return The object TypeId.
62
*/
63
static
TypeId
GetTypeId
();
64
65
LinearLoraTxCurrentModel
();
//!< Default constructor
66
~LinearLoraTxCurrentModel
()
override
;
//!< Destructor
67
68
double
CalcTxCurrent
(
double
txPowerDbm)
const override
;
69
70
private
:
71
double
m_eta
;
//!< ETA
72
double
m_voltage
;
//!< Voltage
73
double
m_baseCurrent
;
//!< Base current
74
};
75
76
}
// namespace lorawan
77
}
// namespace ns3
78
79
#endif
/* LORA_TX_CURRENT_MODEL_H */
ns3::Object::Object
Object()
Caller graph was not generated because of its size.
Definition
object.cc:93
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:50
ns3::lorawan::LinearLoraTxCurrentModel::GetTypeId
static TypeId GetTypeId()
Register this type.
Definition
lora-tx-current-model.cc:43
ns3::lorawan::LinearLoraTxCurrentModel::m_voltage
double m_voltage
Voltage.
Definition
lora-tx-current-model.h:72
ns3::lorawan::LinearLoraTxCurrentModel::LinearLoraTxCurrentModel
LinearLoraTxCurrentModel()
Default constructor.
Definition
lora-tx-current-model.cc:68
ns3::lorawan::LinearLoraTxCurrentModel::m_eta
double m_eta
ETA.
Definition
lora-tx-current-model.h:71
ns3::lorawan::LinearLoraTxCurrentModel::~LinearLoraTxCurrentModel
~LinearLoraTxCurrentModel() override
Destructor.
Definition
lora-tx-current-model.cc:73
ns3::lorawan::LinearLoraTxCurrentModel::CalcTxCurrent
double CalcTxCurrent(double txPowerDbm) const override
Get the current for transmission at this power.
Definition
lora-tx-current-model.cc:79
ns3::lorawan::LinearLoraTxCurrentModel::m_baseCurrent
double m_baseCurrent
Base current.
Definition
lora-tx-current-model.h:73
ns3::lorawan::LoraTxCurrentModel::LoraTxCurrentModel
LoraTxCurrentModel()
Default constructor.
Definition
lora-tx-current-model.cc:31
ns3::lorawan::LoraTxCurrentModel::GetTypeId
static TypeId GetTypeId()
Register this type.
Definition
lora-tx-current-model.cc:25
ns3::lorawan::LoraTxCurrentModel::CalcTxCurrent
virtual double CalcTxCurrent(double txPowerDbm) const =0
Get the current for transmission at this power.
ns3::lorawan::LoraTxCurrentModel::~LoraTxCurrentModel
~LoraTxCurrentModel() override
Destructor.
Definition
lora-tx-current-model.cc:35
ns3::lorawan
Definition
forwarder-helper.cc:19
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
lorawan
model
lora-tx-current-model.h
Generated on
for ns-3 by
1.16.1