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
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Davide Magrin <magrinda@dei.unipd.it>
7
*/
8
9
#ifndef GATEWAY_LORAWAN_MAC_H
10
#define GATEWAY_LORAWAN_MAC_H
11
12
#include "
lora-tag.h
"
13
#include "
lorawan-mac.h
"
14
15
namespace
ns3
16
{
17
namespace
lorawan
18
{
19
20
/**
21
* \ingroup lorawan
22
*
23
* Class representing the MAC layer of a LoRaWAN gateway.
24
*/
25
class
GatewayLorawanMac
:
public
LorawanMac
26
{
27
public
:
28
/**
29
* Register this type.
30
* \return The object TypeId.
31
*/
32
static
TypeId
GetTypeId
();
33
34
GatewayLorawanMac
();
//!< Default constructor
35
~GatewayLorawanMac
()
override
;
//!< Destructor
36
37
// Implementation of the LorawanMac interface
38
void
Send
(
Ptr<Packet>
packet)
override
;
39
40
/**
41
* Check whether the underlying PHY layer of the gateway is currently transmitting.
42
*
43
* \return True if it is transmitting, false otherwise.
44
*/
45
bool
IsTransmitting
();
46
47
// Implementation of the LorawanMac interface
48
void
Receive
(
Ptr<const Packet>
packet)
override
;
49
50
// Implementation of the LorawanMac interface
51
void
FailedReception
(
Ptr<const Packet>
packet)
override
;
52
53
// Implementation of the LorawanMac interface
54
void
TxFinished
(
Ptr<const Packet>
packet)
override
;
55
56
/**
57
* Return the next time at which we will be able to transmit on the specified frequency.
58
*
59
* \param frequency The frequency value [MHz].
60
* \return The next transmission time.
61
*/
62
Time
GetWaitingTime
(
double
frequency);
63
64
private
:
65
protected
:
66
};
67
68
}
// namespace lorawan
69
70
}
// namespace ns3
71
#endif
/* GATEWAY_LORAWAN_MAC_H */
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition
nstime.h:94
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:48
ns3::lorawan::GatewayLorawanMac
Class representing the MAC layer of a LoRaWAN gateway.
Definition
gateway-lorawan-mac.h:26
ns3::lorawan::GatewayLorawanMac::IsTransmitting
bool IsTransmitting()
Check whether the underlying PHY layer of the gateway is currently transmitting.
Definition
gateway-lorawan-mac.cc:98
ns3::lorawan::GatewayLorawanMac::~GatewayLorawanMac
~GatewayLorawanMac() override
Destructor.
Definition
gateway-lorawan-mac.cc:41
ns3::lorawan::GatewayLorawanMac::GetTypeId
static TypeId GetTypeId()
Register this type.
Definition
gateway-lorawan-mac.cc:27
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:130
ns3::lorawan::GatewayLorawanMac::Send
void Send(Ptr< Packet > packet) override
Send a packet.
Definition
gateway-lorawan-mac.cc:47
ns3::lorawan::GatewayLorawanMac::TxFinished
void TxFinished(Ptr< const Packet > packet) override
Perform actions after sending a packet.
Definition
gateway-lorawan-mac.cc:136
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:142
ns3::lorawan::GatewayLorawanMac::Receive
void Receive(Ptr< const Packet > packet) override
Receive a packet from the lower layer.
Definition
gateway-lorawan-mac.cc:104
ns3::lorawan::GatewayLorawanMac::GatewayLorawanMac
GatewayLorawanMac()
Default constructor.
Definition
gateway-lorawan-mac.cc:36
ns3::lorawan::LorawanMac
Class representing the LoRaWAN MAC layer.
Definition
lorawan-mac.h:37
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 Fri Nov 8 2024 13:59:02 for ns-3 by
1.11.0