lorawan-mac-gateway.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 LORAWAN_MAC_GATEWAY_H
24 #define LORAWAN_MAC_GATEWAY_H
25 
26 #include "lora-tag.h"
27 #include "lorawan-mac.h"
29 
30 #include <stdint.h>
31 
32 namespace ns3
33 {
34 
36 {
37  public:
38  static TypeId GetTypeId(void);
39 
41  LorawanMacGateway(uint32_t satId, uint32_t beamId);
42  virtual ~LorawanMacGateway();
43 
44  // Implementation of the LorawanMac interface
45  virtual void Send(Ptr<Packet> packet) = 0;
46 
47  // Implementation of the LorawanMac interface
48  bool IsTransmitting(void);
49 
50  // Implementation of the LorawanMac interface
51  // virtual void Receive (Ptr<Packet const> packet);
52  virtual void Receive(SatPhy::PacketContainer_t packets,
53  Ptr<SatSignalParameters> /*rxParams*/) = 0;
54 
55  // Implementation of the LorawanMac interface
56  virtual void FailedReception(Ptr<const Packet> packet);
57 
58  // Implementation of the LorawanMac interface
59  virtual void TxFinished();
60 
66  Time GetWaitingTime(double frequency);
67 
68  private:
69  // BB Frame configuration.
70  protected:
71 };
72 
73 } /* namespace ns3 */
74 
75 #endif /* LORAWAN_MAC_GATEWAY_H */
virtual void Receive(SatPhy::PacketContainer_t packets, Ptr< SatSignalParameters >)=0
Receive a packet from the lower layer.
virtual void FailedReception(Ptr< const Packet > packet)
Function called by lower layers to inform this layer that reception of a packet we were locked on fai...
Time GetWaitingTime(double frequency)
Return the next time at which we will be able to transmit.
virtual void Send(Ptr< Packet > packet)=0
Send a packet.
virtual void TxFinished()
Perform actions after sending a packet.
static TypeId GetTypeId(void)
Class representing the LoRaWAN MAC layer.
Definition: lorawan-mac.h:49
SatSignalParameters::PacketsInBurst_t PacketContainer_t
Define PacketContainer in SatPhy.
Definition: satellite-phy.h:79
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.