ns3::LoraSubBand Class Reference

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"

+ Inheritance diagram for ns3::LoraSubBand:
+ Collaboration diagram for ns3::LoraSubBand:

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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ LoraSubBand() [1/2]

ns3::LoraSubBand::LoraSubBand ( )

Definition at line 41 of file lora-sub-band.cc.

◆ LoraSubBand() [2/2]

ns3::LoraSubBand::LoraSubBand ( double  firstFrequency,
double  lastFrequency,
double  dutyCycle,
double  maxTxPowerDbm 
)

Create a new LoraSubBand by specifying all of its properties.

Parameters
firstFrequencyThe LoraSubBand's lowest frequency.
lastFrequencyThe LoraSubBand's highest frequency.
dutyCycleThe duty cycle (as a fraction) allowed on this LoraSubBand.
maxTxPowerDbmThe maximum transmission power [dBm] allowed on this LoraSubBand.

Definition at line 46 of file lora-sub-band.cc.

◆ ~LoraSubBand()

ns3::LoraSubBand::~LoraSubBand ( )
virtual

Definition at line 59 of file lora-sub-band.cc.

Member Function Documentation

◆ BelongsToLoraSubBand() [1/2]

bool ns3::LoraSubBand::BelongsToLoraSubBand ( double  frequency)

Return whether or not a frequency belongs to this LoraSubBand.

Parameters
frequencythe frequency we want to test against the current LoraSubBand
Returns
True if the frequency is between firstFrequency and lastFrequency, false otherwise.

Definition at line 77 of file lora-sub-band.cc.

References m_firstFrequency, and m_lastFrequency.

Referenced by BelongsToLoraSubBand().

+ Here is the caller graph for this function:

◆ BelongsToLoraSubBand() [2/2]

bool ns3::LoraSubBand::BelongsToLoraSubBand ( Ptr< LoraLogicalChannel channel)

Return whether or not a channel belongs to this LoraSubBand.

Parameters
channelthe channel we want to test against the current LoraSubBand
Returns
True if the channel's center frequency is between firstFrequency and lastFrequency, false otherwise.

Definition at line 83 of file lora-sub-band.cc.

References BelongsToLoraSubBand().

+ Here is the call graph for this function:

◆ GetDutyCycle()

double ns3::LoraSubBand::GetDutyCycle ( void  )

Get the last frequency of the LoraSubBand.

Returns
The lowest frequency of the LoraSubBand. Get the duty cycle of the LoraSubBand.
The duty cycle (as a fraction) that needs to be enforced on this LoraSubBand.

Definition at line 71 of file lora-sub-band.cc.

References m_dutyCycle.

◆ GetFirstFrequency()

double ns3::LoraSubBand::GetFirstFrequency ( void  )

Get the lowest frequency of the LoraSubBand.

Returns
The lowest frequency of the LoraSubBand.

Definition at line 65 of file lora-sub-band.cc.

References m_firstFrequency.

◆ GetMaxTxPowerDbm()

double ns3::LoraSubBand::GetMaxTxPowerDbm ( void  )

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

Returns
The maximum transmission power, in dBm.

Definition at line 108 of file lora-sub-band.cc.

References m_maxTxPowerDbm.

◆ GetNextTransmissionTime()

Time ns3::LoraSubBand::GetNextTransmissionTime ( void  )

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

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

Definition at line 96 of file lora-sub-band.cc.

References m_nextTransmissionTime.

◆ GetTypeId()

TypeId ns3::LoraSubBand::GetTypeId ( void  )
static

Definition at line 35 of file lora-sub-band.cc.

◆ SetMaxTxPowerDbm()

void ns3::LoraSubBand::SetMaxTxPowerDbm ( double  maxTxPowerDbm)

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

Parameters
maxTxPowerDbmThe maximum transmission power [dBm] to set.

Definition at line 102 of file lora-sub-band.cc.

References m_maxTxPowerDbm.

◆ SetNextTransmissionTime()

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.

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

Definition at line 90 of file lora-sub-band.cc.

References m_nextTransmissionTime.

Member Data Documentation

◆ m_dutyCycle

double ns3::LoraSubBand::m_dutyCycle
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().

◆ m_firstFrequency

double ns3::LoraSubBand::m_firstFrequency
private

Starting frequency of the LoraSubBand, in MHz.

Definition at line 137 of file lora-sub-band.h.

Referenced by BelongsToLoraSubBand(), and GetFirstFrequency().

◆ m_lastFrequency

double ns3::LoraSubBand::m_lastFrequency
private

Ending frequency of the LoraSubBand, in MHz.

Definition at line 138 of file lora-sub-band.h.

Referenced by BelongsToLoraSubBand().

◆ m_maxTxPowerDbm

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

◆ m_nextTransmissionTime

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


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