Loading...
Searching...
No Matches
lora-sub-band.h
Go to the documentation of this file.
1/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/*
3 * Copyright (c) 2017 University of Padova
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation;
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * Author: Davide Magrin <magrinda@dei.unipd.it>
19 *
20 * Modified by: Bastien Tauran <bastien.tauran@viveris.fr>
21 */
22
23#ifndef LORA_SUB_BAND_H
24#define LORA_SUB_BAND_H
25
27
28#include "ns3/nstime.h"
29#include "ns3/object.h"
30
31namespace ns3
32{
33
35
40class LoraSubBand : public Object
41{
42 public:
43 static TypeId GetTypeId(void);
44
46
55 LoraSubBand(double firstFrequency,
56 double lastFrequency,
57 double dutyCycle,
58 double maxTxPowerDbm);
59
60 virtual ~LoraSubBand();
61
67 double GetFirstFrequency(void);
68
74 // double GetLastFrequency (void);
75
82 double GetDutyCycle(void);
83
93 void SetNextTransmissionTime(Time nextTime);
94
102 Time GetNextTransmissionTime(void);
103
111 bool BelongsToLoraSubBand(double frequency);
112
120 bool BelongsToLoraSubBand(Ptr<LoraLogicalChannel> channel);
121
127 void SetMaxTxPowerDbm(double maxTxPowerDbm);
128
134 double GetMaxTxPowerDbm(void);
135
136 private:
139 double m_dutyCycle;
143};
144} /* namespace ns3 */
145#endif /* LORA_SUB_BAND_H */
This class represents a logical LoRaWAN channel.
double GetFirstFrequency(void)
Get the lowest frequency of the LoraSubBand.
void SetMaxTxPowerDbm(double maxTxPowerDbm)
Set the maximum transmission power that is allowed on this LoraSubBand.
double m_maxTxPowerDbm
The maximum transmission power that is admitted on this LoraSubBand.
Time GetNextTransmissionTime(void)
Returns the next time from which transmission on this LoraSubBand will be possible.
void SetNextTransmissionTime(Time nextTime)
Update the next transmission time.
double m_firstFrequency
Starting frequency of the LoraSubBand, in MHz.
virtual ~LoraSubBand()
Time m_nextTransmissionTime
The next time a transmission will be allowed in this LoraSubBand.
double m_dutyCycle
The duty cycle that needs to be enforced on this LoraSubBand.
double GetMaxTxPowerDbm(void)
Return the maximum transmission power that is allowed on this LoraSubBand.
bool BelongsToLoraSubBand(double frequency)
Return whether or not a frequency belongs to this LoraSubBand.
static TypeId GetTypeId(void)
double GetDutyCycle(void)
Get the last frequency of the LoraSubBand.
double m_lastFrequency
Ending frequency of the LoraSubBand, in MHz.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.