ns3::WifiPhyTxTag Class Reference

Annotate a packet sent through a WifiPhy with transmission parameters and information. More...

#include <wifi-phy.h>

Inheritance diagram for ns3::WifiPhyTxTag:
Inheritance graph
[legend]
Collaboration diagram for ns3::WifiPhyTxTag:
Collaboration graph
[legend]

List of all members.

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

Detailed Description

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.


Constructor & Destructor Documentation

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.


Member Function Documentation

void ns3::WifiPhyTxTag::Deserialize ( TagBuffer  i  )  [virtual]
Parameters:
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

Definition at line 83 of file wifi-phy.cc.

References m_duration.

Referenced by GetTypeId().

TypeId ns3::WifiPhyTxTag::GetInstanceTypeId (  )  const [virtual]
Returns:
the TypeId associated to the most-derived type of this instance.

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

Definition at line 78 of file wifi-phy.cc.

References m_powerDbm.

Referenced by GetTypeId().

uint8_t ns3::WifiPhyTxTag::GetPowerId (  )  const

Definition at line 73 of file wifi-phy.cc.

References m_powerId.

Referenced by GetTypeId().

uint32_t ns3::WifiPhyTxTag::GetSerializedSize (  )  const [virtual]
Returns:
the number of bytes required to serialize the data of the tag.

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]
Parameters:
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]
Parameters:
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().


Member Data Documentation

Definition at line 131 of file wifi-phy.h.

Referenced by Deserialize(), GetDuration(), GetSerializedSize(), Print(), and Serialize().

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().

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().


The documentation for this class was generated from the following files:
Generated on Thu Dec 3 14:11:26 2009 for NS-3 by  doxygen 1.6.3