Class representing a LoraSubBand, i.e., a frequency band subject to some regulations on duty cycle and transmission power. More...
#include "lora-sub-band.h"
Public Member Functions | |
LoraSubBand () | |
LoraSubBand (double firstFrequency, double lastFrequency, double dutyCycle, double maxTxPowerDbm) | |
Create a new LoraSubBand by specifying all of its properties. More... | |
virtual | ~LoraSubBand () |
bool | BelongsToLoraSubBand (double frequency) |
Return whether or not a frequency belongs to this LoraSubBand. More... | |
bool | BelongsToLoraSubBand (Ptr< LoraLogicalChannel > channel) |
Return whether or not a channel belongs to this LoraSubBand. More... | |
double | GetDutyCycle (void) |
Get the last frequency of the LoraSubBand. More... | |
double | GetFirstFrequency (void) |
Get the lowest frequency of the LoraSubBand. More... | |
double | GetMaxTxPowerDbm (void) |
Return the maximum transmission power that is allowed on this LoraSubBand. More... | |
Time | GetNextTransmissionTime (void) |
Returns the next time from which transmission on this LoraSubBand will be possible. More... | |
void | SetMaxTxPowerDbm (double maxTxPowerDbm) |
Set the maximum transmission power that is allowed on this LoraSubBand. More... | |
void | SetNextTransmissionTime (Time nextTime) |
Update the next transmission time. More... | |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
Private Attributes | |
double | m_dutyCycle |
The duty cycle that needs to be enforced on this LoraSubBand. More... | |
double | m_firstFrequency |
Starting frequency of the LoraSubBand, in MHz. More... | |
double | m_lastFrequency |
Ending frequency of the LoraSubBand, in MHz. More... | |
double | m_maxTxPowerDbm |
The maximum transmission power that is admitted on this LoraSubBand. More... | |
Time | m_nextTransmissionTime |
The next time a transmission will be allowed in this LoraSubBand. More... | |
Class representing a LoraSubBand, i.e., a frequency band subject to some regulations on duty cycle and transmission power.
Definition at line 40 of file lora-sub-band.h.
ns3::LoraSubBand::LoraSubBand | ( | ) |
Definition at line 43 of file lora-sub-band.cc.
ns3::LoraSubBand::LoraSubBand | ( | double | firstFrequency, |
double | lastFrequency, | ||
double | dutyCycle, | ||
double | maxTxPowerDbm | ||
) |
Create a new LoraSubBand by specifying all of its properties.
firstFrequency | The LoraSubBand's lowest frequency. |
lastFrequency | The LoraSubBand's highest frequency. |
dutyCycle | The duty cycle (as a fraction) allowed on this LoraSubBand. |
maxTxPowerDbm | The maximum transmission power [dBm] allowed on this LoraSubBand. |
Definition at line 48 of file lora-sub-band.cc.
|
virtual |
Definition at line 61 of file lora-sub-band.cc.
bool ns3::LoraSubBand::BelongsToLoraSubBand | ( | double | frequency | ) |
Return whether or not a frequency belongs to this LoraSubBand.
frequency | the frequency we want to test against the current LoraSubBand |
Definition at line 79 of file lora-sub-band.cc.
References m_firstFrequency, and m_lastFrequency.
Referenced by BelongsToLoraSubBand().
bool ns3::LoraSubBand::BelongsToLoraSubBand | ( | Ptr< LoraLogicalChannel > | channel | ) |
Return whether or not a channel belongs to this LoraSubBand.
channel | the channel we want to test against the current LoraSubBand |
Definition at line 85 of file lora-sub-band.cc.
References BelongsToLoraSubBand().
double ns3::LoraSubBand::GetDutyCycle | ( | void | ) |
Get the last frequency of the LoraSubBand.
Definition at line 73 of file lora-sub-band.cc.
References m_dutyCycle.
double ns3::LoraSubBand::GetFirstFrequency | ( | void | ) |
Get the lowest frequency of the LoraSubBand.
Definition at line 67 of file lora-sub-band.cc.
References m_firstFrequency.
double ns3::LoraSubBand::GetMaxTxPowerDbm | ( | void | ) |
Return the maximum transmission power that is allowed on this LoraSubBand.
Definition at line 110 of file lora-sub-band.cc.
References m_maxTxPowerDbm.
Time ns3::LoraSubBand::GetNextTransmissionTime | ( | void | ) |
Returns the next time from which transmission on this LoraSubBand will be possible.
Definition at line 98 of file lora-sub-band.cc.
References m_nextTransmissionTime.
|
static |
Definition at line 37 of file lora-sub-band.cc.
void ns3::LoraSubBand::SetMaxTxPowerDbm | ( | double | maxTxPowerDbm | ) |
Set the maximum transmission power that is allowed on this LoraSubBand.
maxTxPowerDbm | The maximum transmission power [dBm] to set. |
Definition at line 104 of file lora-sub-band.cc.
References m_maxTxPowerDbm.
void ns3::LoraSubBand::SetNextTransmissionTime | ( | Time | nextTime | ) |
Update the next transmission time.
This function is used by LoraLogicalChannelHelper, which computes the time based on the LoraSubBand's duty cycle and on the transmission duration.
nextTime | The future time from which transmission should be allowed again. |
Definition at line 92 of file lora-sub-band.cc.
References m_nextTransmissionTime.
|
private |
The duty cycle that needs to be enforced on this LoraSubBand.
Definition at line 139 of file lora-sub-band.h.
Referenced by GetDutyCycle().
|
private |
Starting frequency of the LoraSubBand, in MHz.
Definition at line 137 of file lora-sub-band.h.
Referenced by BelongsToLoraSubBand(), and GetFirstFrequency().
|
private |
Ending frequency of the LoraSubBand, in MHz.
Definition at line 138 of file lora-sub-band.h.
Referenced by BelongsToLoraSubBand().
|
private |
The maximum transmission power that is admitted on this LoraSubBand.
Definition at line 142 of file lora-sub-band.h.
Referenced by GetMaxTxPowerDbm(), and SetMaxTxPowerDbm().
|
private |
The next time a transmission will be allowed in this LoraSubBand.
Definition at line 140 of file lora-sub-band.h.
Referenced by GetNextTransmissionTime(), and SetNextTransmissionTime().