23#include "ns3/uinteger.h"
48 m_destroyedBy(destroyedBy),
64 return 3 + 2 *
sizeof(
double);
void WriteDouble(double v)
TAG_BUFFER_INLINE void WriteU8(uint8_t v)
TAG_BUFFER_INLINE uint8_t ReadU8()
tag a set of bytes in a packet
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Tag used to save various data about a packet, like its Spreading Factor and data about interference.
static TypeId GetTypeId()
Register this type.
double m_frequency
The frequency of this packet.
uint8_t GetDestroyedBy() const
Read which Spreading Factor this packet was destroyed by.
uint8_t m_dataRate
The data rate that needs to be used to send this packet.
void SetDataRate(uint8_t dataRate)
Set the data rate for this packet.
void Deserialize(TagBuffer i) override
~LoraTag() override
Destructor.
void SetSpreadingFactor(uint8_t sf)
Set which Spreading Factor this packet was transmitted with.
uint8_t GetDataRate() const
Get the data rate for this packet.
void Serialize(TagBuffer i) const override
double GetReceivePower() const
Read the power this packet arrived with.
uint32_t GetSerializedSize() const override
void SetFrequency(double frequency)
Set the frequency of the packet.
uint8_t m_destroyedBy
The Spreading Factor that destroyed the packet.
uint8_t m_sf
The Spreading Factor used by the packet.
uint8_t GetSpreadingFactor() const
Read which Spreading Factor this packet was transmitted with.
LoraTag(uint8_t sf=0, uint8_t destroyedBy=0)
Create a LoraTag with a given spreading factor and collision.
void Print(std::ostream &os) const override
void SetReceivePower(double receivePower)
Set the power this packet was received with.
double GetFrequency() const
Get the frequency of the packet.
void SetDestroyedBy(uint8_t sf)
Set which Spreading Factor this packet was destroyed by.
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
double m_receivePower
The reception power of this packet.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Every class exported by the ns3 library is enclosed in the ns3 namespace.