ns-3
ns3::AnimPacketInfo Class Reference

AnimPacketInfo helper class. More...

#include <animation-interface-helper.h>

Collaboration diagram for ns3::AnimPacketInfo:

List of all members.

Public Member Functions

 AnimPacketInfo ()
 Default constructor.
 AnimPacketInfo (Ptr< const NetDevice > tx_nd, const Time &fbTx, const Time &lbTx, Vector txLoc)
 Constructor.
void ProcessRxBegin (Ptr< const NetDevice > nd, const Time &fbRx)
 Process RxBegin notifications.
bool ProcessRxEnd (Ptr< const NetDevice > nd, const Time &fbRx, Vector rxLoc)
 Process RxEnd notifications.
void ProcessRxDrop (Ptr< const NetDevice > nd)
 Process RxDrop notifications.
AnimRxInfo GetRxInfo (Ptr< const NetDevice > nd)
 GetRxInfo.
void RemoveRxInfo (Ptr< const NetDevice > nd)
 RemoveRxInfo.

Public Attributes

Ptr< const NetDevicem_txnd
 Ptr to NetDevice that is transmitting.
double m_fbTx
 First bit transmission time.
double m_lbTx
 Last bit transmission time.
Vector m_txLoc
 Transmitter's location.
std::map< uint32_t, AnimRxInfom_rx
 Collection of receivers.
double firstlastbitDelta
 Time delta between First bit Rx and Last bit Rx.

Detailed Description

AnimPacketInfo helper class.

This helper class keeps of wireless packets transmitted and received including info about the last bit transmit time, first bit transmit time, location of the transmitter and NetDevice transmited on It is intended only for use by the AnimationInterface class.


Constructor & Destructor Documentation

ns3::AnimPacketInfo::AnimPacketInfo ( Ptr< const NetDevice tx_nd,
const Time fbTx,
const Time lbTx,
Vector  txLoc 
)

Constructor.

Parameters:
tx_ndPtr to NetDevice that is transmitting
fbTxFirst bit transmit time
lbTxLast bit transmit time
txLocTransmitter Location

Member Function Documentation

GetRxInfo.

Parameters:
ndPtr to NetDevice where packet was received
Returns:
AnimRxInfo object

References ns3::Node::GetId(), ns3::NetDevice::GetNode(), m_rx, and NS_ASSERT.

void ns3::AnimPacketInfo::ProcessRxBegin ( Ptr< const NetDevice nd,
const Time fbRx 
)

Process RxBegin notifications.

Parameters:
ndPtr to NetDevice where packet was received
fbRxFirst bit receive time

References ns3::Node::GetId(), ns3::NetDevice::GetNode(), and m_rx.

Process RxDrop notifications.

Parameters:
ndPtr to NetDevice where packet was dropped on reception
bool ns3::AnimPacketInfo::ProcessRxEnd ( Ptr< const NetDevice nd,
const Time fbRx,
Vector  rxLoc 
)

Process RxEnd notifications.

Parameters:
ndPtr to NetDevice where packet was received
fbRxFirst bit receive time
rxLocLocation of receiver
Returns:
true if RxEnd notification was expected and processed

References ns3::CalculateDistance(), firstlastbitDelta, ns3::Node::GetId(), ns3::NetDevice::GetNode(), ns3::Time::GetSeconds(), ns3::AnimRxInfo::m_fbRx, ns3::AnimRxInfo::m_lbRx, m_rx, ns3::AnimRxInfo::m_rxnd, m_txLoc, ns3::AnimRxInfo::rxRange, and ns3::AnimRxInfo::SetPhyRxComplete().

RemoveRxInfo.

Parameters:
ndPtr to NetDevice where packet was received

References ns3::Node::GetId(), ns3::NetDevice::GetNode(), and m_rx.


Member Data Documentation

Time delta between First bit Rx and Last bit Rx.

Parameters:
firstlastbitDeltaTime delta between First bit Rx and Last bit Rx

Referenced by ProcessRxEnd().

First bit transmission time.

Parameters:
m_fbTxFirst bit transmission time

Last bit transmission time.

Parameters:
m_lbTxLast bit transmission time

Collection of receivers.

Parameters:
m_rxCollection of receivers

Referenced by GetRxInfo(), ProcessRxBegin(), ProcessRxEnd(), and RemoveRxInfo().

Transmitter's location.

Parameters:
m_txLocTransmitter's Location

Referenced by ProcessRxEnd().

Ptr to NetDevice that is transmitting.

Parameters:
m_txndNetDevice that is transmitting

The documentation for this class was generated from the following files: