Annotate a packet sent through a WifiPhy with transmission parameters and information. More...
#include <wifi-phy.h>
Public Member Functions | |
WifiPhyTxTag () | |
WifiPhyTxTag (WifiPreamble wifiPreamble, WifiMode wifiMode, uint8_t powerId, double powerDbm, Time duration) | |
WifiPreamble | GetWifiPreamble () const |
WifiMode | GetWifiMode () const |
uint8_t | GetPowerId () const |
double | GetPowerDbm () const |
Time | GetDuration () 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 | |
WifiPreamble | m_wifiPreamble |
WifiMode | m_wifiMode |
uint8_t | m_powerId |
double | m_powerDbm |
Time | m_duration |
Annotate a packet sent through a WifiPhy with transmission 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 108 of file wifi-phy.h.
ns3::WifiPhyTxTag::WifiPhyTxTag | ( | ) |
Definition at line 52 of file wifi-phy.cc.
ns3::WifiPhyTxTag::WifiPhyTxTag | ( | WifiPreamble | wifiPreamble, | |
WifiMode | wifiMode, | |||
uint8_t | powerId, | |||
double | powerDbm, | |||
Time | duration | |||
) |
Definition at line 54 of file wifi-phy.cc.
void ns3::WifiPhyTxTag::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 145 of file wifi-phy.cc.
References m_duration, m_powerDbm, m_powerId, m_wifiMode, m_wifiPreamble, and ns3::TagBuffer::Read().
Time ns3::WifiPhyTxTag::GetDuration | ( | void | ) | const |
TypeId ns3::WifiPhyTxTag::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 122 of file wifi-phy.cc.
References GetTypeId().
double ns3::WifiPhyTxTag::GetPowerDbm | ( | ) | const |
uint8_t ns3::WifiPhyTxTag::GetPowerId | ( | ) | const |
uint32_t ns3::WifiPhyTxTag::GetSerializedSize | ( | ) | const [virtual] |
This method is typically invoked by Packet::AddTag just prior to calling Tag::Serialize.
Implements ns3::Tag.
Definition at line 127 of file wifi-phy.cc.
References m_duration, m_powerDbm, m_powerId, m_wifiMode, and m_wifiPreamble.
TypeId ns3::WifiPhyTxTag::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 88 of file wifi-phy.cc.
References ns3::TypeId::AddAttribute(), GetDuration(), GetPowerDbm(), GetPowerId(), GetWifiMode(), GetWifiPreamble(), and ns3::TypeId::SetParent().
Referenced by GetInstanceTypeId().
WifiMode ns3::WifiPhyTxTag::GetWifiMode | ( | ) | const |
Definition at line 68 of file wifi-phy.cc.
References m_wifiMode.
Referenced by GetTypeId(), and ns3::MacLow::ReceiveOk().
WifiPreamble ns3::WifiPhyTxTag::GetWifiPreamble | ( | ) | const |
Definition at line 63 of file wifi-phy.cc.
References m_wifiPreamble.
Referenced by GetTypeId(), and ns3::MacLow::ReceiveOk().
void ns3::WifiPhyTxTag::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 154 of file wifi-phy.cc.
References m_duration, m_powerDbm, m_powerId, m_wifiMode, and m_wifiPreamble.
void ns3::WifiPhyTxTag::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 136 of file wifi-phy.cc.
References m_duration, m_powerDbm, m_powerId, m_wifiMode, m_wifiPreamble, and ns3::TagBuffer::Write().
Time ns3::WifiPhyTxTag::m_duration [private] |
Definition at line 131 of file wifi-phy.h.
Referenced by Deserialize(), GetDuration(), GetSerializedSize(), Print(), and Serialize().
double ns3::WifiPhyTxTag::m_powerDbm [private] |
Definition at line 130 of file wifi-phy.h.
Referenced by Deserialize(), GetPowerDbm(), GetSerializedSize(), Print(), and Serialize().
uint8_t ns3::WifiPhyTxTag::m_powerId [private] |
Definition at line 129 of file wifi-phy.h.
Referenced by Deserialize(), GetPowerId(), GetSerializedSize(), Print(), and Serialize().
WifiMode ns3::WifiPhyTxTag::m_wifiMode [private] |
Definition at line 128 of file wifi-phy.h.
Referenced by Deserialize(), GetSerializedSize(), GetWifiMode(), Print(), and Serialize().
Definition at line 127 of file wifi-phy.h.
Referenced by Deserialize(), GetSerializedSize(), GetWifiPreamble(), Print(), and Serialize().