Annotate a packet received through a WifiPhy with reception parameters and information. More...
#include <wifi-phy.h>
Public Member Functions | |
WifiPhyRxTag () | |
WifiPhyRxTag (double powerDbm, double snr, double per) | |
double | GetPowerDbm () const |
double | GetSnr () const |
double | GetPer () const |
virtual TypeId | GetInstanceTypeId () const |
virtual uint32_t | GetSerializedSize () const |
virtual void | Serialize (TagBuffer i) const |
virtual void | Deserialize (TagBuffer i) |
virtual void | Print (std::ostream &os) const |
Static Public Member Functions | |
static TypeId | GetTypeId () |
This method returns the TypeId associated to ns3::ObjectBase. | |
Private Attributes | |
double | m_powerDbm |
double | m_snr |
double | m_per |
Annotate a packet received through a WifiPhy with reception parameters and information.
The class was started to export more information to the trace callbacks. Trace callback templates had too few parameters.
Definition at line 141 of file wifi-phy.h.
ns3::WifiPhyRxTag::WifiPhyRxTag | ( | ) |
Definition at line 167 of file wifi-phy.cc.
ns3::WifiPhyRxTag::WifiPhyRxTag | ( | double | powerDbm, | |
double | snr, | |||
double | per | |||
) |
Definition at line 169 of file wifi-phy.cc.
void ns3::WifiPhyRxTag::Deserialize | ( | TagBuffer | i | ) | [virtual] |
i | the buffer to read data from. |
Read the content of the tag from the provided tag buffer. DO NOT attempt to read more bytes than you wrote with Tag::Serialize.
Implements ns3::Tag.
Definition at line 234 of file wifi-phy.cc.
References m_per, m_powerDbm, m_snr, and ns3::TagBuffer::Read().
TypeId ns3::WifiPhyRxTag::GetInstanceTypeId | ( | ) | const [virtual] |
This method is typically implemented by ns3::Object::GetInstanceTypeId but some classes which derive from ns3::ObjectBase directly have to implement it themselves.
Implements ns3::ObjectBase.
Definition at line 215 of file wifi-phy.cc.
References GetTypeId().
double ns3::WifiPhyRxTag::GetPer | ( | ) | const |
double ns3::WifiPhyRxTag::GetPowerDbm | ( | ) | const |
uint32_t ns3::WifiPhyRxTag::GetSerializedSize | ( | ) | const [virtual] |
This method is typically invoked by Packet::AddTag just prior to calling Tag::Serialize.
Implements ns3::Tag.
Definition at line 220 of file wifi-phy.cc.
References m_per, m_powerDbm, and m_snr.
double ns3::WifiPhyRxTag::GetSnr | ( | ) | const |
Definition at line 181 of file wifi-phy.cc.
References m_snr.
Referenced by GetTypeId(), and ns3::MacLow::ReceiveOk().
TypeId ns3::WifiPhyRxTag::GetTypeId | ( | void | ) | [static] |
This method returns the TypeId associated to ns3::ObjectBase.
No Attributes defined for this type.
No TraceSources defined for this type.
Reimplemented from ns3::Tag.
Definition at line 191 of file wifi-phy.cc.
References ns3::TypeId::AddAttribute(), GetPer(), GetPowerDbm(), GetSnr(), and ns3::TypeId::SetParent().
Referenced by GetInstanceTypeId().
void ns3::WifiPhyRxTag::Print | ( | std::ostream & | os | ) | const [virtual] |
os | the stream to print to |
This method is typically invoked from the Packet::PrintTags method
Implements ns3::Tag.
Definition at line 241 of file wifi-phy.cc.
References m_per, m_powerDbm, and m_snr.
void ns3::WifiPhyRxTag::Serialize | ( | TagBuffer | i | ) | const [virtual] |
i | the buffer to write data into. |
Write the content of the tag in the provided tag buffer. DO NOT attempt to write more bytes than you requested with Tag::GetSerializedSize.
Implements ns3::Tag.
Definition at line 227 of file wifi-phy.cc.
References m_per, m_powerDbm, m_snr, and ns3::TagBuffer::Write().
double ns3::WifiPhyRxTag::m_per [private] |
Definition at line 160 of file wifi-phy.h.
Referenced by Deserialize(), GetPer(), GetSerializedSize(), Print(), and Serialize().
double ns3::WifiPhyRxTag::m_powerDbm [private] |
Definition at line 158 of file wifi-phy.h.
Referenced by Deserialize(), GetPowerDbm(), GetSerializedSize(), Print(), and Serialize().
double ns3::WifiPhyRxTag::m_snr [private] |
Definition at line 159 of file wifi-phy.h.
Referenced by Deserialize(), GetSerializedSize(), GetSnr(), Print(), and Serialize().