satellite-lorawan-net-device.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2013 Magister Solutions Ltd.
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: Bastien TAURAN <bastien.tauran@viveris.fr>
19  */
20 
21 #ifndef SATELLITE_LORAWAN_NET_DEVICE_H
22 #define SATELLITE_LORAWAN_NET_DEVICE_H
23 
24 #include "lorawan-mac.h"
25 #include "satellite-address-tag.h"
27 #include "satellite-llc.h"
28 #include "satellite-mac.h"
29 #include "satellite-net-device.h"
30 #include "satellite-node-info.h"
31 #include "satellite-phy.h"
32 #include "satellite-time-tag.h"
33 
34 #include <ns3/error-model.h>
35 #include <ns3/ipv4-l3-protocol.h>
36 #include <ns3/node.h>
37 
38 namespace ns3
39 {
40 
46 {
47  public:
52  static TypeId GetTypeId(void);
53 
58 
59  /*
60  * \brief Receive the packet from mac layer
61  * \param packet Pointer to the packet to be received.
62  */
63  void Receive(Ptr<const Packet> packet);
64 
65  virtual bool Send(Ptr<Packet> packet, const Address& dest, uint16_t protocolNumber);
66  bool SendControlMsg(Ptr<SatControlMessage> msg, const Address& dest);
67 
68  Ptr<LorawanMac> GetLorawanMac();
69  void SetLorawanMac(Ptr<LorawanMac> lorawanMac);
70 
71  typedef Callback<bool, Ptr<SatLorawanNetDevice>, Ptr<const Packet>, uint16_t, const Address&>
73 
75 
81  // void OnReceivedPacket (Ptr<const Packet> packet);
82 
87  // void OnReceiveWindowOpportunity (LoraDeviceAddress deviceAddress, int window);
88 
89  protected:
93  virtual void DoDispose(void);
94 
95  private:
96  Ptr<LorawanMac> m_lorawanMac;
99 };
100 
101 } // namespace ns3
102 
103 #endif /* SATELLITE_LORAWAN_NET_DEVICE_H */
SatLorawanNetDevice to be utilized in the UT and GW nodes for IoT configuration.
void Receive(Ptr< const Packet > packet)
void SetReceiveNetworkServerCallback(SatLorawanNetDevice::ReceiveCallback cb)
void SetLorawanMac(Ptr< LorawanMac > lorawanMac)
bool SendControlMsg(Ptr< SatControlMessage > msg, const Address &dest)
static TypeId GetTypeId(void)
Get the type ID.
SatLorawanNetDevice()
Default constructor.
virtual bool Send(Ptr< Packet > packet, const Address &dest, uint16_t protocolNumber)
virtual void DoDispose(void)
Method called to inform the Scheduler of a newly arrived uplink packet.
Callback< bool, Ptr< SatLorawanNetDevice >, Ptr< const Packet >, uint16_t, const Address & > ReceiveCallback
SatNetDevice to be utilized in the UT and GW nodes.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.