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"
Network layer to device interface.
calculate a propagation delay.
Models the propagation loss through a transmission medium.
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.
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 Send(Ptr< LoraPhy > sender, Ptr< Packet > packet, double txPowerDbm, LoraTxParameters txParams, Time duration, uint32_t frequencyHz) const
Send a packet in the channel.
void Remove(Ptr< LoraPhy > phy)
Remove a physical layer from the LoraChannel.
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.
Base class for PHY layers implementing the LoRa modulation scheme.
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.
Time duration
The duration of the transmission.
uint32_t frequencyHz
The frequency [Hz] of this transmission.
Structure to collect all parameters that are used to compute the duration of a packet (excluding payl...