30 NS_LOG_COMPONENT_DEFINE(
"LoraLogicalChannel");
32 NS_OBJECT_ENSURE_REGISTERED(LoraLogicalChannel);
37 static TypeId tid = TypeId(
"ns3::LoraLogicalChannel").SetParent<Object>();
45 m_enabledForUplink(true)
47 NS_LOG_FUNCTION(
this);
52 NS_LOG_FUNCTION(
this);
56 : m_frequency(frequency),
57 m_enabledForUplink(true)
59 NS_LOG_FUNCTION(
this);
63 : m_frequency(frequency),
64 m_minDataRate(minDataRate),
65 m_maxDataRate(maxDataRate),
66 m_enabledForUplink(true)
68 NS_LOG_FUNCTION(
this);
120 operator==(
const Ptr<LoraLogicalChannel>& first,
const Ptr<LoraLogicalChannel>& second)
122 double thisFreq = first->GetFrequency();
123 double otherFreq = second->GetFrequency();
125 NS_LOG_DEBUG(
"Checking equality between logical lora channels: " << thisFreq <<
" "
128 NS_LOG_DEBUG(
"Result:" << (thisFreq == otherFreq));
129 return (thisFreq == otherFreq);
133 operator!=(
const Ptr<LoraLogicalChannel>& first,
const Ptr<LoraLogicalChannel>& second)
135 return !(first == second);
bool m_enabledForUplink
Whether this channel can be used for uplink or not.
uint8_t GetMaximumDataRate(void)
Get the maximum Data Rate that is allowed on this channel.
virtual ~LoraLogicalChannel()
static TypeId GetTypeId(void)
bool IsEnabledForUplink(void)
Test whether this channel is marked as enabled for uplink.
void SetEnabledForUplink(void)
Set this channel as enabled for uplink.
void SetMinimumDataRate(uint8_t minDataRate)
Set the frequency (MHz).
uint8_t GetMinimumDataRate(void)
Get the minimum Data Rate that is allowed on this channel.
uint8_t m_maxDataRate
The maximum Data Rate that is allowed on this channel.
double GetFrequency(void) const
Get the frequency (MHz).
void DisableForUplink(void)
Set this channel as disabled for uplink.
double m_frequency
The central frequency of this channel, in MHz.
uint8_t m_minDataRate
The minimum Data Rate that is allowed on this channel.
void SetMaximumDataRate(uint8_t maxDataRate)
Set the maximum Data Rate that is allowed on this channel.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.
bool operator==(const Ptr< LoraLogicalChannel > &first, const Ptr< LoraLogicalChannel > &second)
Overload of the == operator to compare different instances of the same LoraLogicalChannel.
bool operator!=(const Ptr< LoraLogicalChannel > &first, const Ptr< LoraLogicalChannel > &second)
Overload the != operator to compare different instances of the same LoraLogicalChannel.