A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
simple-end-device-lora-phy.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 SIMPLE_END_DEVICE_LORA_PHY_H
21#define SIMPLE_END_DEVICE_LORA_PHY_H
22
23#include "end-device-lora-phy.h"
24
25#include "ns3/mobility-model.h"
26#include "ns3/net-device.h"
27#include "ns3/node.h"
28#include "ns3/nstime.h"
29#include "ns3/object.h"
30#include "ns3/traced-value.h"
31
32namespace ns3
33{
34namespace lorawan
35{
36
37class LoraChannel;
38
39/**
40 * \ingroup lorawan
41 *
42 * Class representing a simple LoRa transceiver, with an error model based
43 * on receiver sensitivity and a SIR table.
44 */
46{
47 public:
48 /**
49 * Register this type.
50 * \return The object TypeId.
51 */
52 static TypeId GetTypeId();
53
54 SimpleEndDeviceLoraPhy(); //!< Default constructor
55 ~SimpleEndDeviceLoraPhy() override; //!< Destructor
56
57 // Implementation of EndDeviceLoraPhy's pure virtual functions
58 void StartReceive(Ptr<Packet> packet,
59 double rxPowerDbm,
60 uint8_t sf,
61 Time duration,
62 double frequencyMHz) override;
63
64 // Implementation of LoraPhy's pure virtual functions
66
67 // Implementation of LoraPhy's pure virtual functions
68 void Send(Ptr<Packet> packet,
69 LoraTxParameters txParams,
70 double frequencyMHz,
71 double txPowerDbm) override;
72
73 private:
74};
75
76} // namespace lorawan
77
78} // namespace ns3
79#endif /* SIMPLE_END_DEVICE_LORA_PHY_H */
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
a unique identifier for an interface.
Definition: type-id.h:59
Class representing a LoRa transceiver.
Class representing a simple LoRa transceiver, with an error model based on receiver sensitivity and a...
void StartReceive(Ptr< Packet > packet, double rxPowerDbm, uint8_t sf, Time duration, double frequencyMHz) override
Start receiving a packet.
static TypeId GetTypeId()
Register this type.
void Send(Ptr< Packet > packet, LoraTxParameters txParams, double frequencyMHz, double txPowerDbm) override
Instruct the PHY to send a packet according to some parameters.
void EndReceive(Ptr< Packet > packet, Ptr< LoraInterferenceHelper::Event > event) override
Finish reception of a packet.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Structure to collect all parameters that are used to compute the duration of a packet (excluding payl...
Definition: lora-phy.h:49