A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::lorawan::SubBand Class Reference

Class representing a SubBand, i.e., a frequency band subject to some regulations on duty cycle and transmission power. More...

#include "sub-band.h"

+ Inheritance diagram for ns3::lorawan::SubBand:
+ Collaboration diagram for ns3::lorawan::SubBand:

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.
 
- Public Member Functions inherited from ns3::SimpleRefCount< SubBand >
 SimpleRefCount ()
 Default constructor.
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor.
 
uint32_t GetReferenceCount () const
 Get the reference count of the object.
 
SimpleRefCountoperator= (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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ SubBand()

ns3::lorawan::SubBand::SubBand ( uint32_t firstFrequencyHz,
uint32_t lastFrequencyHz,
double dutyCycle,
double maxTxPowerDbm )

Create a new SubBand by specifying all of its properties.

Parameters
firstFrequencyHzThe SubBand's lowest frequency [Hz].
lastFrequencyHzThe SubBand's highest frequency [Hz].
dutyCycleThe duty cycle (as a fraction) allowed on this SubBand.
maxTxPowerDbmThe maximum transmission power [dBm] allowed on this SubBand.

Definition at line 18 of file sub-band.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

◆ Contains() [1/2]

bool ns3::lorawan::SubBand::Contains ( Ptr< const LogicalLoraChannel > channel) const

Return whether or not a channel belongs to this SubBand.

Parameters
channelThe channel we want to test against the current subband.
Returns
Whether the channel's center frequency is between the first and last frequency of the sub-band, margins excluded.

Definition at line 56 of file sub-band.cc.

References Contains().

+ Here is the call graph for this function:

◆ Contains() [2/2]

bool ns3::lorawan::SubBand::Contains ( uint32_t frequencyHz) const

Return whether or not a frequency belongs to this SubBand.

Parameters
frequencyHzThe frequency [Hz] we want to test against the current subband.
Returns
True if the frequency is between firstFrequencyHz and lastFrequencyHz, false otherwise.

Definition at line 50 of file sub-band.cc.

References m_firstFrequencyHz, and m_lastFrequencyHz.

Referenced by Contains().

+ Here is the caller graph for this function:

◆ GetDutyCycle()

double ns3::lorawan::SubBand::GetDutyCycle ( ) const

Get the duty cycle of the subband.

Returns
The duty cycle (as a fraction) that needs to be enforced on this SubBand.

Definition at line 44 of file sub-band.cc.

References m_dutyCycle.

◆ GetFirstFrequency()

uint32_t ns3::lorawan::SubBand::GetFirstFrequency ( ) const

Get the lowest frequency of the SubBand.

Returns
The lowest frequency [Hz] of the SubBand.

Definition at line 32 of file sub-band.cc.

References m_firstFrequencyHz.

◆ GetLastFrequency()

uint32_t ns3::lorawan::SubBand::GetLastFrequency ( ) const

Get the highest frequency of the SubBand.

Returns
The highest frequency [Hz] of the SubBand.

Definition at line 38 of file sub-band.cc.

References m_lastFrequencyHz.

◆ GetMaxTxPowerDbm()

double ns3::lorawan::SubBand::GetMaxTxPowerDbm ( ) const

Return the maximum transmission power that is allowed on this SubBand.

Returns
The maximum transmission power, in dBm.

Definition at line 80 of file sub-band.cc.

References m_maxTxPowerDbm.

◆ GetNextTransmissionTime()

Time ns3::lorawan::SubBand::GetNextTransmissionTime ( )

Returns the next time from which transmission on this subband will be possible.

Returns
The next time at which transmission in this SubBand will be allowed.

Definition at line 68 of file sub-band.cc.

References m_nextTransmissionTime.

◆ SetMaxTxPowerDbm()

void ns3::lorawan::SubBand::SetMaxTxPowerDbm ( double maxTxPowerDbm)

Set the maximum transmission power that is allowed on this SubBand.

Parameters
maxTxPowerDbmThe maximum transmission power [dBm] to set.

Definition at line 74 of file sub-band.cc.

References m_maxTxPowerDbm.

◆ SetNextTransmissionTime()

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.

Parameters
nextTimeThe future time from which transmission should be allowed again.

Definition at line 62 of file sub-band.cc.

References m_nextTransmissionTime.

Member Data Documentation

◆ m_dutyCycle

double ns3::lorawan::SubBand::m_dutyCycle
private

The duty cycle that needs to be enforced on this subband.

Definition at line 121 of file sub-band.h.

Referenced by GetDutyCycle().

◆ m_firstFrequencyHz

uint32_t ns3::lorawan::SubBand::m_firstFrequencyHz
private

Starting frequency of the subband, in Hz.

Definition at line 119 of file sub-band.h.

Referenced by Contains(), and GetFirstFrequency().

◆ m_lastFrequencyHz

uint32_t ns3::lorawan::SubBand::m_lastFrequencyHz
private

Ending frequency of the subband, in Hz.

Definition at line 120 of file sub-band.h.

Referenced by Contains(), and GetLastFrequency().

◆ m_maxTxPowerDbm

double ns3::lorawan::SubBand::m_maxTxPowerDbm
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().

◆ m_nextTransmissionTime

Time ns3::lorawan::SubBand::m_nextTransmissionTime
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().


The documentation for this class was generated from the following files: