15#include "ns3/channel.h"
16#include "ns3/packet.h"
17#include "ns3/propagation-delay-model.h"
18#include "ns3/propagation-loss-model.h"
19#include "ns3/traced-callback.h"
111 Time duration)
const;
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.
void Send(Ptr< LoraPhy > sender, Ptr< Packet > packet, uint32_t frequencyHz, IQPolarity iqPolarity, const LoraTxParameters &txParams, double txPowerDbm, Time duration) const
Send a packet in the channel.
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.
friend std::ostream & operator<<(std::ostream &os, const LoraChannelParameters ¶ms)
Allow logging of LoraChannelParameters like with any other data type.
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.
void Receive(Ptr< LoraPhy > receiver, Ptr< Packet > packet, const LoraChannelParameters ¶meters) const
Private method that is scheduled by LoraChannel's Send method to happen after the channel delay,...
Ptr< PropagationLossModel > m_loss
Pointer to the loss model.
static TypeId GetTypeId()
Register this type.
Base class for PHY layers implementing the LoRa modulation scheme.
IQPolarity
I/Q Polarity of LoRa transmission symbols.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
A struct that holds meaningful parameters for transmission on a LoraChannel.
uint32_t frequencyHz
The frequency [Hz] of this transmission.
uint8_t spreadingFactor
The Spreading Factor of this transmission.
IQPolarity iqPolarity
The transmission's I/Q polarity (uplink or downlink).
Time duration
The duration of the transmission.
double rxPowerDbm
The average reception power.
Structure to collect all parameters that are used to compute the duration of a packet (excluding payl...