A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
gateway-lorawan-mac.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2017 University of Padova
3
*
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 2 as
6
* published by the Free Software Foundation;
7
*
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program; if not, write to the Free Software
15
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
*
17
* Author: Davide Magrin <magrinda@dei.unipd.it>
18
*/
19
20
#ifndef GATEWAY_LORAWAN_MAC_H
21
#define GATEWAY_LORAWAN_MAC_H
22
23
#include "
lora-tag.h
"
24
#include "
lorawan-mac.h
"
25
26
namespace
ns3
27
{
28
namespace
lorawan
29
{
30
31
/**
32
* \ingroup lorawan
33
*
34
* Class representing the MAC layer of a LoRaWAN gateway.
35
*/
36
class
GatewayLorawanMac
:
public
LorawanMac
37
{
38
public
:
39
/**
40
* Register this type.
41
* \return The object TypeId.
42
*/
43
static
TypeId
GetTypeId
();
44
45
GatewayLorawanMac
();
//!< Default constructor
46
~GatewayLorawanMac
()
override
;
//!< Destructor
47
48
// Implementation of the LorawanMac interface
49
void
Send
(
Ptr<Packet>
packet)
override
;
50
51
/**
52
* Check whether the underlying PHY layer of the gateway is currently transmitting.
53
*
54
* \return True if it is transmitting, false otherwise.
55
*/
56
bool
IsTransmitting
();
57
58
// Implementation of the LorawanMac interface
59
void
Receive
(
Ptr<const Packet>
packet)
override
;
60
61
// Implementation of the LorawanMac interface
62
void
FailedReception
(
Ptr<const Packet>
packet)
override
;
63
64
// Implementation of the LorawanMac interface
65
void
TxFinished
(
Ptr<const Packet>
packet)
override
;
66
67
/**
68
* Return the next time at which we will be able to transmit on the specified frequency.
69
*
70
* \param frequency The frequency value [MHz].
71
* \return The next transmission time.
72
*/
73
Time
GetWaitingTime
(
double
frequency);
74
75
private
:
76
protected
:
77
};
78
79
}
// namespace lorawan
80
81
}
// namespace ns3
82
#endif
/* GATEWAY_LORAWAN_MAC_H */
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:77
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition:
nstime.h:105
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
ns3::lorawan::GatewayLorawanMac
Class representing the MAC layer of a LoRaWAN gateway.
Definition:
gateway-lorawan-mac.h:37
ns3::lorawan::GatewayLorawanMac::IsTransmitting
bool IsTransmitting()
Check whether the underlying PHY layer of the gateway is currently transmitting.
Definition:
gateway-lorawan-mac.cc:109
ns3::lorawan::GatewayLorawanMac::~GatewayLorawanMac
~GatewayLorawanMac() override
Destructor.
Definition:
gateway-lorawan-mac.cc:52
ns3::lorawan::GatewayLorawanMac::GetTypeId
static TypeId GetTypeId()
Register this type.
Definition:
gateway-lorawan-mac.cc:38
ns3::lorawan::GatewayLorawanMac::FailedReception
void FailedReception(Ptr< const Packet > packet) override
Function called by lower layers to inform this layer that reception of a packet we were locked on fai...
Definition:
gateway-lorawan-mac.cc:141
ns3::lorawan::GatewayLorawanMac::Send
void Send(Ptr< Packet > packet) override
Send a packet.
Definition:
gateway-lorawan-mac.cc:58
ns3::lorawan::GatewayLorawanMac::TxFinished
void TxFinished(Ptr< const Packet > packet) override
Perform actions after sending a packet.
Definition:
gateway-lorawan-mac.cc:147
ns3::lorawan::GatewayLorawanMac::GetWaitingTime
Time GetWaitingTime(double frequency)
Return the next time at which we will be able to transmit on the specified frequency.
Definition:
gateway-lorawan-mac.cc:153
ns3::lorawan::GatewayLorawanMac::Receive
void Receive(Ptr< const Packet > packet) override
Receive a packet from the lower layer.
Definition:
gateway-lorawan-mac.cc:115
ns3::lorawan::GatewayLorawanMac::GatewayLorawanMac
GatewayLorawanMac()
Default constructor.
Definition:
gateway-lorawan-mac.cc:47
ns3::lorawan::LorawanMac
Class representing the LoRaWAN MAC layer.
Definition:
lorawan-mac.h:48
lora-tag.h
lorawan-mac.h
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
lorawan
model
gateway-lorawan-mac.h
Generated on Mon Aug 12 2024 11:16:15 for ns-3 by
1.9.6