Class representing a SubBand, i.e., a frequency band subject to some regulations on duty cycle and transmission power. More...
#include "sub-band.h"
Public Member Functions | |
SubBand (uint32_t firstFrequencyHz, uint32_t lastFrequencyHz, double dutyCycle, double maxTxPowerDbm) | |
Create a new SubBand by specifying all of its properties. | |
bool | Contains (Ptr< const LogicalLoraChannel > channel) const |
Return whether or not a channel belongs to this SubBand. | |
bool | Contains (uint32_t frequencyHz) const |
Return whether or not a frequency belongs to this SubBand. | |
double | GetDutyCycle () const |
Get the duty cycle of the subband. | |
uint32_t | GetFirstFrequency () const |
Get the lowest frequency of the SubBand. | |
uint32_t | GetLastFrequency () const |
Get the highest frequency of the SubBand. | |
double | GetMaxTxPowerDbm () const |
Return the maximum transmission power that is allowed on this SubBand. | |
Time | GetNextTransmissionTime () |
Returns the next time from which transmission on this subband will be possible. | |
void | SetMaxTxPowerDbm (double maxTxPowerDbm) |
Set the maximum transmission power that is allowed on this SubBand. | |
void | SetNextTransmissionTime (Time nextTime) |
Update the next transmission time. | |
![]() | |
SimpleRefCount () | |
Default constructor. | |
SimpleRefCount (const SimpleRefCount &o) | |
Copy constructor. | |
uint32_t | GetReferenceCount () const |
Get the reference count of the object. | |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
Assignment operator. | |
void | Ref () const |
Increment the reference count. | |
void | Unref () const |
Decrement the reference count. | |
Private Attributes | |
double | m_dutyCycle |
The duty cycle that needs to be enforced on this subband. | |
uint32_t | m_firstFrequencyHz |
Starting frequency of the subband, in Hz. | |
uint32_t | m_lastFrequencyHz |
Ending frequency of the subband, in Hz. | |
double | m_maxTxPowerDbm |
The maximum transmission power that is admitted on this subband. | |
Time | m_nextTransmissionTime |
The next time a transmission will be allowed in this subband. | |
Class representing a SubBand, i.e., a frequency band subject to some regulations on duty cycle and transmission power.
Definition at line 28 of file sub-band.h.
ns3::lorawan::SubBand::SubBand | ( | uint32_t | firstFrequencyHz, |
uint32_t | lastFrequencyHz, | ||
double | dutyCycle, | ||
double | maxTxPowerDbm ) |
Create a new SubBand by specifying all of its properties.
firstFrequencyHz | The SubBand's lowest frequency [Hz]. |
lastFrequencyHz | The SubBand's highest frequency [Hz]. |
dutyCycle | The duty cycle (as a fraction) allowed on this SubBand. |
maxTxPowerDbm | The maximum transmission power [dBm] allowed on this SubBand. |
Definition at line 18 of file sub-band.cc.
References NS_LOG_FUNCTION.
bool ns3::lorawan::SubBand::Contains | ( | Ptr< const LogicalLoraChannel > | channel | ) | const |
Return whether or not a channel belongs to this SubBand.
channel | The channel we want to test against the current subband. |
Definition at line 56 of file sub-band.cc.
References Contains().
bool ns3::lorawan::SubBand::Contains | ( | uint32_t | frequencyHz | ) | const |
Return whether or not a frequency belongs to this SubBand.
frequencyHz | The frequency [Hz] we want to test against the current subband. |
Definition at line 50 of file sub-band.cc.
References m_firstFrequencyHz, and m_lastFrequencyHz.
Referenced by Contains().
double ns3::lorawan::SubBand::GetDutyCycle | ( | ) | const |
Get the duty cycle of the subband.
Definition at line 44 of file sub-band.cc.
References m_dutyCycle.
uint32_t ns3::lorawan::SubBand::GetFirstFrequency | ( | ) | const |
Get the lowest frequency of the SubBand.
Definition at line 32 of file sub-band.cc.
References m_firstFrequencyHz.
uint32_t ns3::lorawan::SubBand::GetLastFrequency | ( | ) | const |
Get the highest frequency of the SubBand.
Definition at line 38 of file sub-band.cc.
References m_lastFrequencyHz.
double ns3::lorawan::SubBand::GetMaxTxPowerDbm | ( | ) | const |
Return the maximum transmission power that is allowed on this SubBand.
Definition at line 80 of file sub-band.cc.
References m_maxTxPowerDbm.
Time ns3::lorawan::SubBand::GetNextTransmissionTime | ( | ) |
Returns the next time from which transmission on this subband will be possible.
Definition at line 68 of file sub-band.cc.
References m_nextTransmissionTime.
void ns3::lorawan::SubBand::SetMaxTxPowerDbm | ( | double | maxTxPowerDbm | ) |
Set the maximum transmission power that is allowed on this SubBand.
maxTxPowerDbm | The maximum transmission power [dBm] to set. |
Definition at line 74 of file sub-band.cc.
References m_maxTxPowerDbm.
void ns3::lorawan::SubBand::SetNextTransmissionTime | ( | Time | nextTime | ) |
Update the next transmission time.
This function is used by LogicalLoraChannelHelper, which computes the time based on the SubBand's duty cycle and on the transmission duration.
nextTime | The future time from which transmission should be allowed again. |
Definition at line 62 of file sub-band.cc.
References m_nextTransmissionTime.
|
private |
The duty cycle that needs to be enforced on this subband.
Definition at line 121 of file sub-band.h.
Referenced by GetDutyCycle().
|
private |
Starting frequency of the subband, in Hz.
Definition at line 119 of file sub-band.h.
Referenced by Contains(), and GetFirstFrequency().
|
private |
Ending frequency of the subband, in Hz.
Definition at line 120 of file sub-band.h.
Referenced by Contains(), and GetLastFrequency().
|
private |
The maximum transmission power that is admitted on this subband.
Definition at line 123 of file sub-band.h.
Referenced by GetMaxTxPowerDbm(), and SetMaxTxPowerDbm().
|
private |
The next time a transmission will be allowed in this subband.
Definition at line 122 of file sub-band.h.
Referenced by GetNextTransmissionTime(), and SetNextTransmissionTime().