18#include "ns3/channel.h"
19#include "ns3/mobility-model.h"
20#include "ns3/net-device.h"
21#include "ns3/nstime.h"
22#include "ns3/packet.h"
23#include "ns3/propagation-delay-model.h"
24#include "ns3/propagation-loss-model.h"
31class PropagationLossModel;
32class PropagationDelayModel;
38struct LoraTxParameters;
140 double frequencyMHz)
const;
Abstract Channel Base Class.
Smart pointer class similar to boost::intrusive_ptr.
Simulation virtual time values and global simulation resolution.
Forward calls to a chain of Callback.
a unique identifier for an interface.
The class that delivers packets among PHY layers.
std::size_t GetNDevices() const override
~LoraChannel() override
Destructor.
std::vector< Ptr< LoraPhy > > m_phyList
The vector containing the PHYs that are currently connected to the channel.
void Remove(Ptr< LoraPhy > phy)
Remove a physical layer from the LoraChannel.
void Send(Ptr< LoraPhy > sender, Ptr< Packet > packet, double txPowerDbm, LoraTxParameters txParams, Time duration, double frequencyMHz) const
Send a packet in the channel.
double GetRxPower(double txPowerDbm, Ptr< MobilityModel > senderMobility, Ptr< MobilityModel > receiverMobility) const
Compute the received power when transmitting from a point to another one.
Ptr< PropagationDelayModel > m_delay
Pointer to the delay model.
LoraChannel()
Default constructor.
TracedCallback< Ptr< const Packet > > m_packetSent
Callback for when a packet is being sent on the channel.
Ptr< NetDevice > GetDevice(std::size_t i) const override
void Add(Ptr< LoraPhy > phy)
Connect a LoraPhy object to the LoraChannel.
Ptr< PropagationLossModel > m_loss
Pointer to the loss model.
void Receive(uint32_t i, Ptr< Packet > packet, LoraChannelParameters parameters) const
Private method that is scheduled by LoraChannel's Send method to happen after the channel delay,...
static TypeId GetTypeId()
Register this type.
std::ostream & operator<<(std::ostream &os, const EndDeviceStatus &status)
Every class exported by the ns3 library is enclosed in the ns3 namespace.
A struct that holds meaningful parameters for transmission on a LoraChannel.
uint8_t sf
The Spreading Factor of this transmission.
double rxPowerDbm
The reception power.
double frequencyMHz
The frequency [MHz] of this transmission.
Time duration
The duration of the transmission.
Structure to collect all parameters that are used to compute the duration of a packet (excluding payl...