ns3::WifiPhyRxTag Class Reference

Annotate a packet received through a WifiPhy with reception parameters and information. More...

#include <wifi-phy.h>

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

List of all members.

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

Detailed Description

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.


Constructor & Destructor Documentation

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.


Member Function Documentation

void ns3::WifiPhyRxTag::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 234 of file wifi-phy.cc.

References m_per, m_powerDbm, m_snr, and ns3::TagBuffer::Read().

TypeId ns3::WifiPhyRxTag::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 215 of file wifi-phy.cc.

References GetTypeId().

double ns3::WifiPhyRxTag::GetPer (  )  const

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

References m_per.

Referenced by GetTypeId().

double ns3::WifiPhyRxTag::GetPowerDbm (  )  const

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

References m_powerDbm.

Referenced by GetTypeId().

uint32_t ns3::WifiPhyRxTag::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 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]
Parameters:
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]
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 227 of file wifi-phy.cc.

References m_per, m_powerDbm, m_snr, and ns3::TagBuffer::Write().


Member Data Documentation

double ns3::WifiPhyRxTag::m_per [private]

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

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

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


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