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 "
lorawan-mac.h
"
13
14
namespace
ns3
15
{
16
namespace
lorawan
17
{
18
19
/**
20
* @ingroup lorawan
21
*
22
* Class representing the MAC layer of a LoRaWAN gateway.
23
*/
24
class
GatewayLorawanMac
:
public
LorawanMac
25
{
26
public
:
27
/**
28
* Register this type.
29
* @return The object TypeId.
30
*/
31
static
TypeId
GetTypeId
();
32
33
GatewayLorawanMac
();
//!< Default constructor
34
~GatewayLorawanMac
()
override
;
//!< Destructor
35
36
// Implementation of the LorawanMac interface
37
void
Send
(
Ptr<Packet>
packet)
override
;
38
39
/**
40
* Check whether the underlying PHY layer of the gateway is currently transmitting.
41
*
42
* @return True if it is transmitting, false otherwise.
43
*/
44
bool
IsTransmitting
();
45
46
// Implementation of the LorawanMac interface
47
void
Receive
(
Ptr<const Packet>
packet)
override
;
48
49
// Implementation of the LorawanMac interface
50
void
FailedReception
(
Ptr<const Packet>
packet)
override
;
51
52
// Implementation of the LorawanMac interface
53
void
TxFinished
(
Ptr<const Packet>
packet)
override
;
54
55
/**
56
* Return the next time at which we will be able to transmit on the specified frequency.
57
*
58
* @param frequencyHz The frequency value [Hz].
59
* @return The next transmission time.
60
*/
61
Time
GetWaitTime
(
uint32_t
frequencyHz);
62
63
private
:
64
protected
:
65
};
66
67
}
// namespace lorawan
68
}
// namespace ns3
69
70
#endif
/* GATEWAY_LORAWAN_MAC_H */
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
ptr.h:70
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition
nstime.h:95
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:50
ns3::lorawan::GatewayLorawanMac::IsTransmitting
bool IsTransmitting()
Check whether the underlying PHY layer of the gateway is currently transmitting.
Definition
gateway-lorawan-mac.cc:96
ns3::lorawan::GatewayLorawanMac::~GatewayLorawanMac
~GatewayLorawanMac() override
Destructor.
Definition
gateway-lorawan-mac.cc:40
ns3::lorawan::GatewayLorawanMac::GetTypeId
static TypeId GetTypeId()
Register this type.
Definition
gateway-lorawan-mac.cc:26
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:128
ns3::lorawan::GatewayLorawanMac::Send
void Send(Ptr< Packet > packet) override
Send a packet.
Definition
gateway-lorawan-mac.cc:46
ns3::lorawan::GatewayLorawanMac::GetWaitTime
Time GetWaitTime(uint32_t frequencyHz)
Return the next time at which we will be able to transmit on the specified frequency.
Definition
gateway-lorawan-mac.cc:140
ns3::lorawan::GatewayLorawanMac::TxFinished
void TxFinished(Ptr< const Packet > packet) override
Perform actions after sending a packet.
Definition
gateway-lorawan-mac.cc:134
ns3::lorawan::GatewayLorawanMac::Receive
void Receive(Ptr< const Packet > packet) override
Receive a packet from the lower layer.
Definition
gateway-lorawan-mac.cc:102
ns3::lorawan::GatewayLorawanMac::GatewayLorawanMac
GatewayLorawanMac()
Default constructor.
Definition
gateway-lorawan-mac.cc:35
ns3::lorawan::LorawanMac::LorawanMac
LorawanMac()
Default constructor.
Definition
lorawan-mac.cc:47
uint32_t
lorawan-mac.h
ns3::lorawan
Definition
forwarder-helper.cc:19
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
lorawan
model
gateway-lorawan-mac.h
Generated on
for ns-3 by
1.15.0