13#include "ns3/double.h"
47 TypeId(
"ns3::LinearLoraTxCurrentModel")
52 "The efficiency of the power amplifier.",
57 .AddAttribute(
"Voltage",
58 "The supply voltage (in Volts).",
63 .AddAttribute(
"StandbyCurrent",
64 "The current in the STANDBY state (in Watts).",
134 TypeId(
"ns3::ConstantLoraTxCurrentModel")
136 .SetGroupName(
"Lora")
138 .AddAttribute(
"TxCurrent",
139 "The radio Tx current in Ampere.",
This class can be used to hold variables of floating point type such as 'double' or 'float'.
A base class which provides memory management and object aggregation.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
A constant model of the transmission current for a LoRa device, always yielding the same current inde...
double m_txCurrent
The transmission current [Ampere].
double CalcTxCurrent(double txPowerDbm) const override
Get the current for transmission at this power.
void SetTxCurrent(double txCurrent)
Set the current in the TX state.
~ConstantLoraTxCurrentModel() override
Destructor.
ConstantLoraTxCurrentModel()
Default constructor.
static TypeId GetTypeId()
Register this type.
double GetTxCurrent() const
Get the current of the TX state.
A linear model of the transmission current for a LoRa device, based on the WiFi model.
double GetStandbyCurrent() const
Get the current in the STANDBY state.
double m_idleCurrent
Standby current.
void SetStandbyCurrent(double idleCurrent)
Set the current in the STANDBY state.
static TypeId GetTypeId()
Register this type.
LinearLoraTxCurrentModel()
Default constructor.
double GetEta() const
Get the power amplifier efficiency.
void SetVoltage(double voltage)
Set the supply voltage.
~LinearLoraTxCurrentModel() override
Destructor.
double GetVoltage() const
Get the supply voltage.
double CalcTxCurrent(double txPowerDbm) const override
Get the current for transmission at this power.
void SetEta(double eta)
Set the power amplifier efficiency.
Model the transmit current as a function of the transmit power and mode.
LoraTxCurrentModel()
Default constructor.
static TypeId GetTypeId()
Register this type.
~LoraTxCurrentModel() override
Destructor.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
double DbmToW(double dBm)
Convert from dBm to Watts.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Ptr< const AttributeChecker > MakeDoubleChecker()
Ptr< const AttributeAccessor > MakeDoubleAccessor(T1 a1)