lora-gateway-status.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_GATEWAY_STATUS_H
24 #define LORA_GATEWAY_STATUS_H
25 
26 #include "lorawan-mac-gateway.h"
27 
28 #include <ns3/address.h>
29 #include <ns3/net-device.h>
30 #include <ns3/object.h>
31 
32 namespace ns3
33 {
34 
35 class LoraGatewayStatus : public Object
36 {
37  public:
38  static TypeId GetTypeId(void);
39 
41  LoraGatewayStatus(Address address, Ptr<NetDevice> netDevice, Ptr<LorawanMacGateway> gwMac);
42  virtual ~LoraGatewayStatus();
43 
47  Address GetAddress();
48 
52  void SetAddress(Address address);
53 
57  Ptr<NetDevice> GetNetDevice();
58 
62  void SetNetDevice(Ptr<NetDevice> netDevice);
63 
67  Ptr<LorawanMacGateway> GetGatewayMac(void);
68 
72  // void SetGatewayMac (Ptr<LorawanMacGateway> gwMac);
73 
82  bool IsAvailableForTransmission(double frequency);
83 
84  void SetNextTransmissionTime(Time nextTransmissionTime);
85  // Time GetNextTransmissionTime (void);
86 
87  private:
88  Address m_address;
89 
90  Ptr<NetDevice>
92 
93  Ptr<LorawanMacGateway> m_gatewayMac;
94 
96 };
97 } // namespace ns3
98 
99 #endif /* LORA_GATEWAY_STATUS_H */
void SetNetDevice(Ptr< NetDevice > netDevice)
Set the NetDevice through which it's possible to contact this gateway from the server.
static TypeId GetTypeId(void)
Time m_nextTransmissionTime
This gateway's next transmission time.
Address GetAddress()
Get this gateway's P2P link address.
Ptr< NetDevice > GetNetDevice()
Get the NetDevice through which it's possible to contact this gateway from the server.
Ptr< LorawanMacGateway > GetGatewayMac(void)
Get a pointer to this gateway's MAC instance.
void SetNextTransmissionTime(Time nextTransmissionTime)
void SetAddress(Address address)
Set this gateway's P2P link address.
Ptr< NetDevice > m_netDevice
The NetDevice through which to reach this gateway from the server.
Ptr< LorawanMacGateway > m_gatewayMac
The Mac layer of the gateway.
bool IsAvailableForTransmission(double frequency)
Set a pointer to this gateway's MAC instance.
Address m_address
The Address of the P2PNetDevice of this gateway.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.