ns-3
|
AnimPacketInfo helper class. More...
#include <animation-interface-helper.h>
Public Member Functions | |
AnimPacketInfo () | |
Default constructor. | |
AnimPacketInfo (Ptr< const NetDevice > tx_nd, const Time &fbTx, const Time &lbTx, Vector txLoc, uint32_t txNodeId=0) | |
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 NetDevice > | m_txnd |
Ptr to NetDevice that is transmitting. | |
uint32_t | m_txNodeId |
Tx Node Id if NetDevice is unknown. | |
double | m_fbTx |
First bit transmission time. | |
double | m_lbTx |
Last bit transmission time. | |
Vector | m_txLoc |
Transmitter's location. | |
std::map< uint32_t, AnimRxInfo > | m_rx |
Collection of receivers. | |
double | firstlastbitDelta |
Time delta between First bit Rx and Last bit Rx. |
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.
ns3::AnimPacketInfo::AnimPacketInfo | ( | Ptr< const NetDevice > | tx_nd, |
const Time & | fbTx, | ||
const Time & | lbTx, | ||
Vector | txLoc, | ||
uint32_t | txNodeId = 0 |
||
) |
Constructor.
tx_nd | Ptr to NetDevice that is transmitting |
fbTx | First bit transmit time |
lbTx | Last bit transmit time |
txLoc | Transmitter Location |
References m_txnd, and m_txNodeId.
AnimRxInfo ns3::AnimPacketInfo::GetRxInfo | ( | Ptr< const NetDevice > | nd | ) |
GetRxInfo.
References ns3::Node::GetId(), ns3::NetDevice::GetNode(), m_rx, and NS_ASSERT.
Process RxBegin notifications.
References ns3::Node::GetId(), ns3::NetDevice::GetNode(), and m_rx.
bool ns3::AnimPacketInfo::ProcessRxEnd | ( | Ptr< const NetDevice > | nd, |
const Time & | fbRx, | ||
Vector | rxLoc | ||
) |
Process RxEnd notifications.
nd | Ptr to NetDevice where packet was received |
fbRx | First bit receive time |
rxLoc | Location of receiver |
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.
References ns3::Node::GetId(), ns3::NetDevice::GetNode(), and m_rx.
double ns3::AnimPacketInfo::firstlastbitDelta |
Time delta between First bit Rx and Last bit Rx.
firstlastbitDelta | Time delta between First bit Rx and Last bit Rx |
Referenced by ProcessRxEnd().
double ns3::AnimPacketInfo::m_fbTx |
First bit transmission time.
m_fbTx | First bit transmission time |
double ns3::AnimPacketInfo::m_lbTx |
Last bit transmission time.
m_lbTx | Last bit transmission time |
std::map<uint32_t,AnimRxInfo> ns3::AnimPacketInfo::m_rx |
Collection of receivers.
m_rx | Collection of receivers |
Referenced by GetRxInfo(), ProcessRxBegin(), ProcessRxEnd(), and RemoveRxInfo().
Vector ns3::AnimPacketInfo::m_txLoc |
Ptr to NetDevice that is transmitting.
m_txnd | NetDevice that is transmitting |
Referenced by AnimPacketInfo().
uint32_t ns3::AnimPacketInfo::m_txNodeId |
Tx Node Id if NetDevice is unknown.
Referenced by AnimPacketInfo().