A Discrete-Event Network Simulator
API
ns3::AnimationInterface Class Reference

Interface to network animator. More...

#include "animation-interface.h"

+ Collaboration diagram for ns3::AnimationInterface:

Classes

class  AnimPacketInfo
 
class  AnimXmlElement
 
struct  Ipv4RoutePathElement
 
struct  Ipv4RouteTrackElement
 
struct  LinkPairCompare
 
struct  LinkProperties
 
struct  NodeSize
 
struct  P2pLinkNodeIdPair
 
struct  Rgb
 

Public Types

typedef void(* AnimWriteCallback) (const char *str)
 typedef for WriteCallBack used for listening to AnimationInterface write messages More...
 
enum  CounterType { UINT32_COUNTER, DOUBLE_COUNTER }
 Counter Types. More...
 

Public Member Functions

 AnimationInterface (const std::string filename)
 Constructor. More...
 
 ~AnimationInterface ()
 Destructor for the animator interface. More...
 
uint32_t AddNodeCounter (std::string counterName, CounterType counterType)
 Setup a node counter. More...
 
uint32_t AddResource (std::string resourcePath)
 Add a resource such as the path to an image file. More...
 
AnimationInterfaceAddSourceDestination (uint32_t fromNodeId, std::string destinationIpv4Address)
 Helper function to print the routing path from a source node to destination IP. More...
 
void EnableIpv4L3ProtocolCounters (Time startTime, Time stopTime, Time pollInterval=Seconds(1))
 Enable tracking of Ipv4 L3 Protocol Counters such as Tx, Rx, Drop. More...
 
AnimationInterfaceEnableIpv4RouteTracking (std::string fileName, Time startTime, Time stopTime, Time pollInterval=Seconds(5))
 Enable tracking of the Ipv4 routing table for all Nodes. More...
 
AnimationInterfaceEnableIpv4RouteTracking (std::string fileName, Time startTime, Time stopTime, NodeContainer nc, Time pollInterval=Seconds(5))
 Enable tracking of the Ipv4 routing table for a set of Nodes. More...
 
void EnablePacketMetadata (bool enable=true)
 Enable Packet metadata. More...
 
void EnableQueueCounters (Time startTime, Time stopTime, Time pollInterval=Seconds(1))
 Enable tracking of Queue Counters such as Enqueue, Dequeue, Queue Drops. More...
 
void EnableWifiMacCounters (Time startTime, Time stopTime, Time pollInterval=Seconds(1))
 Enable tracking of Wifi Mac Counters such as Tx, TxDrop, Rx, RxDrop. More...
 
void EnableWifiPhyCounters (Time startTime, Time stopTime, Time pollInterval=Seconds(1))
 Enable tracking of Wifi Phy Counters such as TxDrop, RxDrop. More...
 
double GetNodeEnergyFraction (Ptr< const Node > node) const
 Get node's energy fraction (This used only for testing) More...
 
uint64_t GetTracePktCount ()
 Get trace file packet count (This used only for testing) More...
 
bool IsStarted (void)
 Is AnimationInterface started. More...
 
void ResetAnimWriteCallback ()
 Reset the write callback function. More...
 
void SetAnimWriteCallback (AnimWriteCallback cb)
 Set a callback function to listen to AnimationInterface write events. More...
 
void SetBackgroundImage (std::string fileName, double x, double y, double scaleX, double scaleY, double opacity)
 Helper function to set the background image. More...
 
void SetMaxPktsPerTraceFile (uint64_t maxPktsPerFile)
 Set Max packets per trace file. More...
 
void SetMobilityPollInterval (Time t)
 Set mobility poll interval:WARNING: setting a low interval can cause slowness. More...
 
void SetStartTime (Time t)
 Specify the time at which capture should start. More...
 
void SetStopTime (Time t)
 Specify the time at which capture should stop. More...
 
void SkipPacketTracing ()
 Do not trace packets. More...
 
void UpdateLinkDescription (uint32_t fromNode, uint32_t toNode, std::string linkDescription)
 Helper function to update the description for a link. More...
 
void UpdateLinkDescription (Ptr< Node > fromNode, Ptr< Node > toNode, std::string linkDescription)
 Helper function to update the description for a link. More...
 
void UpdateNodeColor (Ptr< Node > n, uint8_t r, uint8_t g, uint8_t b)
 Helper function to update the node color. More...
 
void UpdateNodeColor (uint32_t nodeId, uint8_t r, uint8_t g, uint8_t b)
 Helper function to update the node color. More...
 
void UpdateNodeCounter (uint32_t nodeCounterId, uint32_t nodeId, double counter)
 Helper function to update a node's counter referenced by the nodeCounterId. More...
 
void UpdateNodeDescription (Ptr< Node > n, std::string descr)
 Helper function to update the description for a given node. More...
 
void UpdateNodeDescription (uint32_t nodeId, std::string descr)
 Helper function to update the description for a given node. More...
 
void UpdateNodeImage (uint32_t nodeId, uint32_t resourceId)
 Helper function to update the image of a node. More...
 
void UpdateNodeSize (uint32_t nodeId, double width, double height)
 Helper function to update the size of a node. More...
 

Static Public Member Functions

static bool IsInitialized (void)
 Check if AnimationInterface is initialized. More...
 
static void SetConstantPosition (Ptr< Node > n, double x, double y, double z=0)
 Helper function to set Constant Position for a given node. More...
 

Private Types

typedef std::map< uint64_t, AnimPacketInfoAnimUidPacketInfoMap
 
typedef std::map< uint32_t, double > EnergyFractionMap
 
typedef std::vector< Ipv4RoutePathElementIpv4RoutePathElements
 
typedef std::map< P2pLinkNodeIdPair, LinkProperties, LinkPairCompareLinkPropertiesMap
 
typedef std::map< uint32_t, RgbNodeColorsMap
 
typedef std::map< uint32_t, uint64_t > NodeCounterMap64
 
typedef std::map< uint32_t, std::string > NodeDescriptionsMap
 
enum  ProtocolType {
  UAN, LTE, WIFI, WIMAX,
  CSMA
}
 

Private Member Functions

void AddByteTag (uint64_t animUid, Ptr< const Packet > p)
 
void AddPendingPacket (ProtocolType protocolType, uint64_t animUid, AnimPacketInfo pktInfo)
 
void AddToIpv4AddressNodeIdTable (std::string, uint32_t)
 
void CheckMaxPktsPerTraceFile ()
 
void ConnectCallbacks ()
 
void ConnectLte ()
 
void ConnectLteEnb (Ptr< Node > n, Ptr< LteEnbNetDevice > nd, uint32_t devIndex)
 
void ConnectLteUe (Ptr< Node > n, Ptr< LteUeNetDevice > nd, uint32_t devIndex)
 
std::string CounterTypeToString (CounterType counterType)
 
void CsmaMacRxTrace (std::string context, Ptr< const Packet > p)
 
void CsmaPhyRxEndTrace (std::string context, Ptr< const Packet > p)
 
void CsmaPhyTxBeginTrace (std::string context, Ptr< const Packet > p)
 
void CsmaPhyTxEndTrace (std::string context, Ptr< const Packet > p)
 
void DequeueTrace (std::string context, Ptr< const Packet >)
 
void DevTxTrace (std::string context, Ptr< const Packet > p, Ptr< NetDevice > tx, Ptr< NetDevice > rx, Time txTime, Time rxTime)
 
void EnqueueTrace (std::string context, Ptr< const Packet >)
 
void GenericWirelessRxTrace (std::string context, Ptr< const Packet >, ProtocolType protocolType)
 
void GenericWirelessTxTrace (std::string context, Ptr< const Packet >, ProtocolType protocolType)
 
uint64_t GetAnimUidFromPacket (Ptr< const Packet >)
 
const std::vector< std::string > GetElementsFromContext (const std::string &context) const
 
std::string GetIpv4Address (Ptr< NetDevice > nd)
 
std::string GetIpv4RoutingTable (Ptr< Node > n)
 
std::string GetMacAddress (Ptr< NetDevice > nd)
 
std::vector< Ptr< Node > > GetMovedNodes ()
 
std::string GetNetAnimVersion ()
 
Ptr< NetDeviceGetNetDeviceFromContext (std::string context)
 
Ptr< NodeGetNodeFromContext (const std::string &context) const
 
std::string GetPacketMetadata (Ptr< const Packet > p)
 
Vector GetPosition (Ptr< Node > n)
 
void Ipv4DropTrace (std::string context, const Ipv4Header &, Ptr< const Packet >, Ipv4L3Protocol::DropReason, Ptr< Ipv4 >, uint32_t)
 
void Ipv4RxTrace (std::string context, Ptr< const Packet >, Ptr< Ipv4 >, uint32_t)
 
void Ipv4TxTrace (std::string context, Ptr< const Packet >, Ptr< Ipv4 >, uint32_t)
 
bool IsInTimeWindow ()
 
bool IsPacketPending (uint64_t animUid, ProtocolType protocolType)
 
void LteRxTrace (std::string context, Ptr< const Packet > p, const Mac48Address &)
 
void LteSpectrumPhyRxStart (std::string context, Ptr< const PacketBurst > pb)
 
void LteSpectrumPhyTxStart (std::string context, Ptr< const PacketBurst > pb)
 
void LteTxTrace (std::string context, Ptr< const Packet > p, const Mac48Address &)
 
void MobilityAutoCheck ()
 
void MobilityCourseChangeTrace (Ptr< const MobilityModel > mob)
 
bool NodeHasMoved (Ptr< Node > n, Vector newLocation)
 
void OutputCsmaPacket (Ptr< const Packet > p, AnimPacketInfo &pktInfo)
 
void OutputWirelessPacketRxInfo (Ptr< const Packet > p, AnimPacketInfo &pktInfo, uint64_t animUid)
 
void OutputWirelessPacketTxInfo (Ptr< const Packet > p, AnimPacketInfo &pktInfo, uint64_t animUid)
 
AnimUidPacketInfoMapProtocolTypeToPendingPackets (ProtocolType protocolType)
 
std::string ProtocolTypeToString (ProtocolType protocolType)
 
void PurgePendingPackets (ProtocolType protocolType)
 
void QueueDropTrace (std::string context, Ptr< const Packet >)
 
void RecursiveIpv4RoutePathSearch (std::string fromIpv4, std::string toIpv4, Ipv4RoutePathElements &)
 
void RemainingEnergyTrace (std::string context, double previousEnergy, double currentEnergy)
 
void SetOutputFile (const std::string &fn, bool routing=false)
 
void StartAnimation (bool restart=false)
 
void StopAnimation (bool onlyAnimation=false)
 
void TrackIpv4L3ProtocolCounters ()
 
void TrackIpv4Route ()
 
void TrackIpv4RoutePaths ()
 
void TrackQueueCounters ()
 
void TrackWifiMacCounters ()
 
void TrackWifiPhyCounters ()
 
void UanPhyGenRxTrace (std::string context, Ptr< const Packet >)
 
void UanPhyGenTxTrace (std::string context, Ptr< const Packet >)
 
Vector UpdatePosition (Ptr< Node > n)
 
Vector UpdatePosition (Ptr< Node > n, Vector v)
 
Vector UpdatePosition (Ptr< NetDevice > ndev)
 
void WifiMacRxDropTrace (std::string context, Ptr< const Packet >)
 
void WifiMacRxTrace (std::string context, Ptr< const Packet >)
 
void WifiMacTxDropTrace (std::string context, Ptr< const Packet >)
 
void WifiMacTxTrace (std::string context, Ptr< const Packet >)
 
void WifiPhyRxBeginTrace (std::string context, Ptr< const Packet > p)
 
void WifiPhyRxDropTrace (std::string context, Ptr< const Packet >)
 
void WifiPhyTxBeginTrace (std::string context, Ptr< const Packet > p)
 
void WifiPhyTxDropTrace (std::string context, Ptr< const Packet >)
 
void WimaxRxTrace (std::string context, Ptr< const Packet > p, const Mac48Address &)
 
void WimaxTxTrace (std::string context, Ptr< const Packet > p, const Mac48Address &)
 
void WriteLinkProperties ()
 
int WriteN (const char *, uint32_t, FILE *f)
 
int WriteN (const std::string &, FILE *f)
 
void WriteNodeColors ()
 
void WriteNodeEnergies ()
 
void WriteNodes ()
 
void WriteNodeSizes ()
 
void WriteNodeUpdate (uint32_t nodeId)
 
void WriteNonP2pLinkProperties (uint32_t id, std::string ipv4Address, std::string channelType)
 
void WriteRoutePath (uint32_t nodeId, std::string destination, Ipv4RoutePathElements rpElements)
 
void WriteXmlAddNodeCounter (uint32_t counterId, std::string counterName, CounterType counterType)
 
void WriteXmlAddResource (uint32_t resourceId, std::string resourcePath)
 
void WriteXmlAnim (bool routing=false)
 
void WriteXmlClose (std::string name, bool routing=false)
 
void WriteXmlLink (uint32_t fromId, uint32_t toLp, uint32_t toId)
 
void WriteXmlNode (uint32_t id, uint32_t sysId, double locX, double locY)
 
void WriteXmlNonP2pLinkProperties (uint32_t id, std::string ipv4Address, std::string channelType)
 
void WriteXmlP (std::string pktType, uint32_t fId, double fbTx, double lbTx, uint32_t tId, double fbRx, double lbRx, std::string metaInfo="")
 
void WriteXmlP (uint64_t animUid, std::string pktType, uint32_t fId, double fbTx, double lbTx)
 
void WriteXmlPRef (uint64_t animUid, uint32_t fId, double fbTx, std::string metaInfo="")
 
void WriteXmlRouting (uint32_t id, std::string routingInfo)
 
void WriteXmlRp (uint32_t nodeId, std::string destination, Ipv4RoutePathElements rpElements)
 
void WriteXmlUpdateBackground (std::string fileName, double x, double y, double scaleX, double scaleY, double opacity)
 
void WriteXmlUpdateLink (uint32_t fromId, uint32_t toId, std::string)
 
void WriteXmlUpdateNodeColor (uint32_t nodeId, uint8_t r, uint8_t g, uint8_t b)
 
void WriteXmlUpdateNodeCounter (uint32_t counterId, uint32_t nodeId, double value)
 
void WriteXmlUpdateNodeDescription (uint32_t nodeId)
 
void WriteXmlUpdateNodeImage (uint32_t nodeId, uint32_t resourceId)
 
void WriteXmlUpdateNodePosition (uint32_t nodeId, double x, double y)
 
void WriteXmlUpdateNodeSize (uint32_t nodeId, double width, double height)
 

Private Attributes

uint64_t gAnimUid
 
uint64_t m_currentPktCount
 
bool m_enablePacketMetadata
 
FILE * m_f
 
Time m_ipv4L3ProtocolCountersPollInterval
 
Time m_ipv4L3ProtocolCountersStopTime
 
uint32_t m_ipv4L3ProtocolDropCounterId
 
uint32_t m_ipv4L3ProtocolRxCounterId
 
uint32_t m_ipv4L3ProtocolTxCounterId
 
std::vector< Ipv4RouteTrackElementm_ipv4RouteTrackElements
 
std::map< std::string, uint32_t > m_ipv4ToNodeIdMap
 
LinkPropertiesMap m_linkProperties
 
std::map< std::string, uint32_t > m_macToNodeIdMap
 
uint64_t m_maxPktsPerFile
 
Time m_mobilityPollInterval
 
NodeColorsMap m_nodeColors
 
std::vector< std::string > m_nodeCounters
 
NodeDescriptionsMap m_nodeDescriptions
 
EnergyFractionMap m_nodeEnergyFraction
 
NodeCounterMap64 m_nodeIpv4Drop
 
NodeCounterMap64 m_nodeIpv4Rx
 
NodeCounterMap64 m_nodeIpv4Tx
 
std::map< uint32_t, Vector > m_nodeLocation
 
NodeCounterMap64 m_nodeQueueDequeue
 
NodeCounterMap64 m_nodeQueueDrop
 
NodeCounterMap64 m_nodeQueueEnqueue
 
std::map< uint32_t, NodeSizem_nodeSizes
 
NodeCounterMap64 m_nodeWifiMacRx
 
NodeCounterMap64 m_nodeWifiMacRxDrop
 
NodeCounterMap64 m_nodeWifiMacTx
 
NodeCounterMap64 m_nodeWifiMacTxDrop
 
NodeCounterMap64 m_nodeWifiPhyRxDrop
 
NodeCounterMap64 m_nodeWifiPhyTxDrop
 
std::string m_originalFileName
 
std::string m_outputFileName
 
AnimUidPacketInfoMap m_pendingCsmaPackets
 
AnimUidPacketInfoMap m_pendingLtePackets
 
AnimUidPacketInfoMap m_pendingUanPackets
 
AnimUidPacketInfoMap m_pendingWifiPackets
 
AnimUidPacketInfoMap m_pendingWimaxPackets
 
Time m_queueCountersPollInterval
 
Time m_queueCountersStopTime
 
uint32_t m_queueDequeueCounterId
 
uint32_t m_queueDropCounterId
 
uint32_t m_queueEnqueueCounterId
 
uint32_t m_remainingEnergyCounterId
 
std::vector< std::string > m_resources
 
FILE * m_routingF
 
std::string m_routingFileName
 
NodeContainer m_routingNc
 
Time m_routingPollInterval
 
Time m_routingStopTime
 
bool m_started
 
Time m_startTime
 
Time m_stopTime
 
bool m_trackPackets
 
Time m_wifiMacCountersPollInterval
 
Time m_wifiMacCountersStopTime
 
uint32_t m_wifiMacRxCounterId
 
uint32_t m_wifiMacRxDropCounterId
 
uint32_t m_wifiMacTxCounterId
 
uint32_t m_wifiMacTxDropCounterId
 
Time m_wifiPhyCountersPollInterval
 
Time m_wifiPhyCountersStopTime
 
uint32_t m_wifiPhyRxDropCounterId
 
uint32_t m_wifiPhyTxDropCounterId
 
AnimWriteCallback m_writeCallback
 

Static Private Attributes

static RectangleuserBoundary
 

Detailed Description

Interface to network animator.

Provides functions that facilitate communications with an external or internal network animator.

Definition at line 72 of file animation-interface.h.

Member Typedef Documentation

Definition at line 511 of file animation-interface.h.

typedef void(* ns3::AnimationInterface::AnimWriteCallback) (const char *str)

typedef for WriteCallBack used for listening to AnimationInterface write messages

Definition at line 97 of file animation-interface.h.

typedef std::map<uint32_t, double> ns3::AnimationInterface::EnergyFractionMap
private

Definition at line 512 of file animation-interface.h.

Definition at line 513 of file animation-interface.h.

typedef std::map<uint32_t, Rgb> ns3::AnimationInterface::NodeColorsMap
private

Definition at line 510 of file animation-interface.h.

typedef std::map<uint32_t, uint64_t> ns3::AnimationInterface::NodeCounterMap64
private

Definition at line 517 of file animation-interface.h.

typedef std::map<uint32_t, std::string> ns3::AnimationInterface::NodeDescriptionsMap
private

Definition at line 509 of file animation-interface.h.

Constructor & Destructor Documentation

ns3::AnimationInterface::AnimationInterface ( const std::string  filename)

Constructor.

Parameters
filenameThe Filename for the trace file used by the Animator

Definition at line 65 of file animation-interface.cc.

References StartAnimation().

+ Here is the call graph for this function:

ns3::AnimationInterface::~AnimationInterface ( )

Destructor for the animator interface.

Definition at line 87 of file animation-interface.cc.

References StopAnimation().

+ Here is the call graph for this function:

Member Function Documentation

void ns3::AnimationInterface::AddByteTag ( uint64_t  animUid,
Ptr< const Packet p 
)
private

Definition at line 618 of file animation-interface.cc.

References ns3::Packet::AddByteTag(), and ns3::AnimByteTag::Set().

Referenced by CsmaPhyTxBeginTrace(), GenericWirelessTxTrace(), and LteSpectrumPhyTxStart().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint32_t ns3::AnimationInterface::AddNodeCounter ( std::string  counterName,
CounterType  counterType 
)

Setup a node counter.

Parameters
counterNameA string to identify the counter
counterTypeThe type of the counter, such as uint32, double etc

returns The id of the counter to be used as a reference for future

Definition at line 228 of file animation-interface.cc.

References m_nodeCounters, and WriteXmlAddNodeCounter().

Referenced by EnableIpv4L3ProtocolCounters(), EnableQueueCounters(), EnableWifiMacCounters(), EnableWifiPhyCounters(), and WriteNodeEnergies().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::AnimationInterface::AddPendingPacket ( ProtocolType  protocolType,
uint64_t  animUid,
AnimPacketInfo  pktInfo 
)
private

Definition at line 1094 of file animation-interface.cc.

References NS_ASSERT, and ProtocolTypeToPendingPackets().

Referenced by CsmaPhyTxBeginTrace(), CsmaPhyTxEndTrace(), GenericWirelessTxTrace(), LteSpectrumPhyTxStart(), and WifiPhyRxBeginTrace().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint32_t ns3::AnimationInterface::AddResource ( std::string  resourcePath)

Add a resource such as the path to an image file.

Parameters
resourcePathAbsolute Path to an image/resource

returns a number identifying the resource

Definition at line 237 of file animation-interface.cc.

References m_resources, and WriteXmlAddResource().

+ Here is the call graph for this function:

AnimationInterface & ns3::AnimationInterface::AddSourceDestination ( uint32_t  fromNodeId,
std::string  destinationIpv4Address 
)

Helper function to print the routing path from a source node to destination IP.

Parameters
fromNodeIdThe source node
destinationIpv4AddressThe destination Ipv4 Address
Returns
reference to this AnimationInterface object

Definition at line 202 of file animation-interface.cc.

References m_ipv4RouteTrackElements.

void ns3::AnimationInterface::AddToIpv4AddressNodeIdTable ( std::string  ipv4Address,
uint32_t  nodeId 
)
private

Definition at line 1293 of file animation-interface.cc.

References m_ipv4ToNodeIdMap.

Referenced by WriteLinkProperties().

+ Here is the caller graph for this function:

void ns3::AnimationInterface::CheckMaxPktsPerTraceFile ( )
private

Definition at line 1697 of file animation-interface.cc.

References m_currentPktCount, m_maxPktsPerFile, NS_LOG_UNCOND, and StopAnimation().

Referenced by DevTxTrace(), OutputCsmaPacket(), OutputWirelessPacketRxInfo(), and OutputWirelessPacketTxInfo().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::AnimationInterface::ConnectLte ( )
private

Definition at line 1347 of file animation-interface.cc.

References ns3::NodeList::Begin(), ConnectLteEnb(), ConnectLteUe(), ns3::NodeList::End(), ns3::Node::GetDevice(), ns3::Node::GetNDevices(), and NS_ASSERT.

Referenced by ConnectCallbacks().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::AnimationInterface::ConnectLteEnb ( Ptr< Node n,
Ptr< LteEnbNetDevice nd,
uint32_t  devIndex 
)
private

Definition at line 1301 of file animation-interface.cc.

References ns3::Node::GetId(), ns3::LteEnbNetDevice::GetPhy(), LteSpectrumPhyRxStart(), LteSpectrumPhyTxStart(), and ns3::MakeCallback().

Referenced by ConnectLte().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::AnimationInterface::ConnectLteUe ( Ptr< Node n,
Ptr< LteUeNetDevice nd,
uint32_t  devIndex 
)
private

Definition at line 1325 of file animation-interface.cc.

References ns3::Node::GetId(), LteSpectrumPhyRxStart(), LteSpectrumPhyTxStart(), and ns3::MakeCallback().

Referenced by ConnectLte().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::string ns3::AnimationInterface::CounterTypeToString ( CounterType  counterType)
private

Definition at line 1213 of file animation-interface.cc.

References DOUBLE_COUNTER, and UINT32_COUNTER.

Referenced by WriteXmlAddNodeCounter().

+ Here is the caller graph for this function:

void ns3::AnimationInterface::CsmaMacRxTrace ( std::string  context,
Ptr< const Packet p 
)
private
Todo:
NS_ASSERT (CsmaPacketIsPending (AnimUid) == true);

Definition at line 1032 of file animation-interface.cc.

References CHECK_STARTED_INTIMEWINDOW_TRACKPACKETS, CSMA, GetAnimUidFromPacket(), GetNetDeviceFromContext(), IsPacketPending(), m_pendingCsmaPackets, NS_ASSERT, NS_LOG_FUNCTION, NS_LOG_INFO, NS_LOG_WARN, and OutputCsmaPacket().

Referenced by ConnectCallbacks().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::AnimationInterface::CsmaPhyRxEndTrace ( std::string  context,
Ptr< const Packet p 
)
private
Todo:
NS_ASSERT (CsmaPacketIsPending (AnimUid) == true);

Definition at line 1010 of file animation-interface.cc.

References CHECK_STARTED_INTIMEWINDOW_TRACKPACKETS, CSMA, GetAnimUidFromPacket(), GetNetDeviceFromContext(), IsPacketPending(), m_pendingCsmaPackets, ns3::Simulator::Now(), NS_ASSERT, NS_LOG_FUNCTION, NS_LOG_INFO, NS_LOG_WARN, OutputCsmaPacket(), ns3::AnimationInterface::AnimPacketInfo::ProcessRxBegin(), and UpdatePosition().

Referenced by ConnectCallbacks().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::AnimationInterface::CsmaPhyTxBeginTrace ( std::string  context,
Ptr< const Packet p 
)
private

Definition at line 969 of file animation-interface.cc.

References AddByteTag(), AddPendingPacket(), CHECK_STARTED_INTIMEWINDOW_TRACKPACKETS, CSMA, gAnimUid, GetNetDeviceFromContext(), ns3::Simulator::Now(), NS_ASSERT, NS_LOG_FUNCTION, NS_LOG_INFO, and UpdatePosition().

Referenced by ConnectCallbacks().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::AnimationInterface::CsmaPhyTxEndTrace ( std::string  context,
Ptr< const Packet p 
)
private
void ns3::AnimationInterface::DequeueTrace ( std::string  context,
Ptr< const Packet p 
)
private

Definition at line 723 of file animation-interface.cc.

References GetNodeFromContext(), and m_nodeQueueDequeue.

Referenced by ConnectCallbacks().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::AnimationInterface::DevTxTrace ( std::string  context,
Ptr< const Packet p,
Ptr< NetDevice tx,
Ptr< NetDevice rx,
Time  txTime,
Time  rxTime 
)
private

Definition at line 739 of file animation-interface.cc.

References CHECK_STARTED_INTIMEWINDOW_TRACKPACKETS, CheckMaxPktsPerTraceFile(), GetPacketMetadata(), ns3::Time::GetSeconds(), m_enablePacketMetadata, ns3::Simulator::Now(), NS_ASSERT, NS_LOG_FUNCTION, and WriteXmlP().

Referenced by ConnectCallbacks().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::AnimationInterface::EnableIpv4L3ProtocolCounters ( Time  startTime,
Time  stopTime,
Time  pollInterval = Seconds (1) 
)

Enable tracking of Ipv4 L3 Protocol Counters such as Tx, Rx, Drop.

Parameters
startTimeStart Time for capturing values
stopTimeStop Time for capturing values
pollIntervalThe periodic interval at which the counters are written to the trace file Default: 1s
Returns
none

Definition at line 163 of file animation-interface.cc.

References AddNodeCounter(), ns3::NodeList::Begin(), DOUBLE_COUNTER, ns3::NodeList::End(), ns3::Node::GetId(), m_ipv4L3ProtocolCountersPollInterval, m_ipv4L3ProtocolCountersStopTime, m_ipv4L3ProtocolDropCounterId, m_ipv4L3ProtocolRxCounterId, m_ipv4L3ProtocolTxCounterId, m_nodeIpv4Drop, m_nodeIpv4Rx, m_nodeIpv4Tx, ns3::Simulator::Schedule(), stopTime, TrackIpv4L3ProtocolCounters(), and UpdateNodeCounter().

+ Here is the call graph for this function:

AnimationInterface & ns3::AnimationInterface::EnableIpv4RouteTracking ( std::string  fileName,
Time  startTime,
Time  stopTime,
Time  pollInterval = Seconds (5) 
)

Enable tracking of the Ipv4 routing table for all Nodes.

Parameters
fileNameTrace file for storing routing table information
startTimeStart time for capture
stopTimeEnd time for capture
pollIntervalThe periodic interval at which routing table information is polled Default: 5s
Returns
reference to this AnimationInterface object

Definition at line 184 of file animation-interface.cc.

References m_routingPollInterval, m_routingStopTime, ns3::Simulator::Schedule(), SetOutputFile(), stopTime, TrackIpv4Route(), and WriteXmlAnim().

Referenced by EnableIpv4RouteTracking().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

AnimationInterface & ns3::AnimationInterface::EnableIpv4RouteTracking ( std::string  fileName,
Time  startTime,
Time  stopTime,
NodeContainer  nc,
Time  pollInterval = Seconds (5) 
)

Enable tracking of the Ipv4 routing table for a set of Nodes.

Parameters
fileNameTrace file for storing routing table information
startTimeStart time for capture
stopTimeEnd time for capture
ncA NodeContainer containing nodes for which Routing table has to be tracked
pollIntervalThe periodic interval at which routing table information is polled Default: 5s
Returns
reference to this AnimationInterface object

Definition at line 195 of file animation-interface.cc.

References EnableIpv4RouteTracking(), and m_routingNc.

+ Here is the call graph for this function:

void ns3::AnimationInterface::EnablePacketMetadata ( bool  enable = true)

Enable Packet metadata.

Parameters
enableif true enables writing the packet metadata to the XML trace file if false disables writing the packet metadata
Returns
none

Definition at line 246 of file animation-interface.cc.

References ns3::Packet::EnablePrinting(), and m_enablePacketMetadata.

+ Here is the call graph for this function:

void ns3::AnimationInterface::EnableQueueCounters ( Time  startTime,
Time  stopTime,
Time  pollInterval = Seconds (1) 
)

Enable tracking of Queue Counters such as Enqueue, Dequeue, Queue Drops.

Parameters
startTimeStart Time for capturing values
stopTimeStop Time for capturing values
pollIntervalThe periodic interval at which the counters are written to the trace file Default: 1s
Returns
none

Definition at line 142 of file animation-interface.cc.

References AddNodeCounter(), ns3::NodeList::Begin(), DOUBLE_COUNTER, ns3::NodeList::End(), ns3::Node::GetId(), m_nodeQueueDequeue, m_nodeQueueDrop, m_nodeQueueEnqueue, m_queueCountersPollInterval, m_queueCountersStopTime, m_queueDequeueCounterId, m_queueDropCounterId, m_queueEnqueueCounterId, ns3::Simulator::Schedule(), stopTime, TrackQueueCounters(), and UpdateNodeCounter().

+ Here is the call graph for this function:

void ns3::AnimationInterface::EnableWifiMacCounters ( Time  startTime,
Time  stopTime,
Time  pollInterval = Seconds (1) 
)

Enable tracking of Wifi Mac Counters such as Tx, TxDrop, Rx, RxDrop.

Parameters
startTimeStart Time for capturing values
stopTimeStop Time for capturing values
pollIntervalThe periodic interval at which the counters are written to the trace file Default: 1s
Returns
none

Definition at line 118 of file animation-interface.cc.

References AddNodeCounter(), ns3::NodeList::Begin(), DOUBLE_COUNTER, ns3::NodeList::End(), ns3::Node::GetId(), m_nodeWifiMacRx, m_nodeWifiMacRxDrop, m_nodeWifiMacTx, m_nodeWifiMacTxDrop, m_wifiMacCountersPollInterval, m_wifiMacCountersStopTime, m_wifiMacRxCounterId, m_wifiMacRxDropCounterId, m_wifiMacTxCounterId, m_wifiMacTxDropCounterId, ns3::Simulator::Schedule(), stopTime, TrackWifiMacCounters(), and UpdateNodeCounter().

+ Here is the call graph for this function:

void ns3::AnimationInterface::EnableWifiPhyCounters ( Time  startTime,
Time  stopTime,
Time  pollInterval = Seconds (1) 
)

Enable tracking of Wifi Phy Counters such as TxDrop, RxDrop.

Parameters
startTimeStart Time for capturing values
stopTimeStop Time for capturing values
pollIntervalThe periodic interval at which the counters are written to the trace file Default: 1s
Returns
none

Definition at line 99 of file animation-interface.cc.

References AddNodeCounter(), ns3::NodeList::Begin(), DOUBLE_COUNTER, ns3::NodeList::End(), ns3::Node::GetId(), m_nodeWifiPhyRxDrop, m_nodeWifiPhyTxDrop, m_wifiPhyCountersPollInterval, m_wifiPhyCountersStopTime, m_wifiPhyRxDropCounterId, m_wifiPhyTxDropCounterId, ns3::Simulator::Schedule(), stopTime, TrackWifiPhyCounters(), and UpdateNodeCounter().

+ Here is the call graph for this function:

void ns3::AnimationInterface::EnqueueTrace ( std::string  context,
Ptr< const Packet p 
)
private

Definition at line 715 of file animation-interface.cc.

References GetNodeFromContext(), and m_nodeQueueEnqueue.

Referenced by ConnectCallbacks().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::AnimationInterface::GenericWirelessRxTrace ( std::string  context,
Ptr< const Packet p,
ProtocolType  protocolType 
)
private
void ns3::AnimationInterface::GenericWirelessTxTrace ( std::string  context,
Ptr< const Packet p,
ProtocolType  protocolType 
)
private
uint64_t ns3::AnimationInterface::GetAnimUidFromPacket ( Ptr< const Packet p)
private
const std::vector< std::string > ns3::AnimationInterface::GetElementsFromContext ( const std::string &  context) const
private

Definition at line 550 of file animation-interface.cc.

Referenced by GetNetDeviceFromContext(), and GetNodeFromContext().

+ Here is the caller graph for this function:

std::string ns3::AnimationInterface::GetIpv4Address ( Ptr< NetDevice nd)
private

Definition at line 1515 of file animation-interface.cc.

References ns3::Ipv4InterfaceAddress::GetLocal(), ns3::NodeList::GetNode(), and NS_LOG_WARN.

Referenced by WriteLinkProperties().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::string ns3::AnimationInterface::GetIpv4RoutingTable ( Ptr< Node n)
private

Definition at line 1897 of file animation-interface.cc.

References ns3::Node::GetId(), ns3::Object::GetObject(), ns3::Ipv4::GetRoutingProtocol(), NS_ASSERT, and NS_LOG_WARN.

Referenced by TrackIpv4Route().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::string ns3::AnimationInterface::GetMacAddress ( Ptr< NetDevice nd)
private

Definition at line 1506 of file animation-interface.cc.

Referenced by WriteLinkProperties().

+ Here is the caller graph for this function:

std::vector< Ptr< Node > > ns3::AnimationInterface::GetMovedNodes ( )
private

Definition at line 457 of file animation-interface.cc.

References ns3::NodeList::Begin(), ns3::NodeList::End(), ns3::Object::GetObject(), ns3::MobilityModel::GetPosition(), GetPosition(), third::mobility, NodeHasMoved(), NS_ASSERT, and UpdatePosition().

Referenced by MobilityAutoCheck().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::string ns3::AnimationInterface::GetNetAnimVersion ( )
private

Definition at line 1710 of file animation-interface.cc.

References NETANIM_VERSION.

Referenced by WriteXmlAnim().

+ Here is the caller graph for this function:

Ptr< NetDevice > ns3::AnimationInterface::GetNetDeviceFromContext ( std::string  context)
private
double ns3::AnimationInterface::GetNodeEnergyFraction ( Ptr< const Node node) const

Get node's energy fraction (This used only for testing)

returns current node's remaining energy (between [0, 1])

Definition at line 391 of file animation-interface.cc.

References m_nodeEnergyFraction, and NS_ASSERT.

Referenced by AnimationRemainingEnergyTestCase::CheckLogic().

+ Here is the caller graph for this function:

Ptr< Node > ns3::AnimationInterface::GetNodeFromContext ( const std::string &  context) const
private
std::string ns3::AnimationInterface::GetPacketMetadata ( Ptr< const Packet p)
private

Definition at line 1235 of file animation-interface.cc.

References ns3::Packet::Print().

Referenced by DevTxTrace(), OutputCsmaPacket(), and OutputWirelessPacketTxInfo().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Vector ns3::AnimationInterface::GetPosition ( Ptr< Node n)
private

Definition at line 1495 of file animation-interface.cc.

References ns3::Node::GetId(), m_nodeLocation, and NS_FATAL_ERROR.

Referenced by GetMovedNodes(), MobilityAutoCheck(), MobilityCourseChangeTrace(), and NodeHasMoved().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint64_t ns3::AnimationInterface::GetTracePktCount ( )

Get trace file packet count (This used only for testing)

returns Number of packets recorded in the current trace file

Definition at line 1243 of file animation-interface.cc.

References m_currentPktCount.

Referenced by AnimationInterfaceTestCase::CheckLogic().

+ Here is the caller graph for this function:

void ns3::AnimationInterface::Ipv4DropTrace ( std::string  context,
const Ipv4Header ipv4Header,
Ptr< const Packet p,
Ipv4L3Protocol::DropReason  dropReason,
Ptr< Ipv4 ipv4,
uint32_t   
)
private

Definition at line 703 of file animation-interface.cc.

References GetNodeFromContext(), and m_nodeIpv4Drop.

Referenced by ConnectCallbacks().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::AnimationInterface::Ipv4RxTrace ( std::string  context,
Ptr< const Packet p,
Ptr< Ipv4 ipv4,
uint32_t  interfaceIndex 
)
private

Definition at line 696 of file animation-interface.cc.

References GetNodeFromContext(), and m_nodeIpv4Rx.

Referenced by ConnectCallbacks().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::AnimationInterface::Ipv4TxTrace ( std::string  context,
Ptr< const Packet p,
Ptr< Ipv4 ipv4,
uint32_t  interfaceIndex 
)
private

Definition at line 689 of file animation-interface.cc.

References GetNodeFromContext(), and m_nodeIpv4Tx.

Referenced by ConnectCallbacks().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ns3::AnimationInterface::IsInitialized ( void  )
static

Check if AnimationInterface is initialized.

Returns
true if AnimationInterface was already initialized

Definition at line 256 of file animation-interface.cc.

References ns3::initialized.

bool ns3::AnimationInterface::IsInTimeWindow ( )
private

Definition at line 1653 of file animation-interface.cc.

References m_startTime, m_stopTime, and ns3::Simulator::Now().

+ Here is the call graph for this function:

bool ns3::AnimationInterface::IsPacketPending ( uint64_t  animUid,
AnimationInterface::ProtocolType  protocolType 
)
private

Definition at line 1102 of file animation-interface.cc.

References NS_ASSERT, and ProtocolTypeToPendingPackets().

Referenced by CsmaMacRxTrace(), CsmaPhyRxEndTrace(), CsmaPhyTxEndTrace(), GenericWirelessRxTrace(), LteSpectrumPhyRxStart(), and WifiPhyRxBeginTrace().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ns3::AnimationInterface::IsStarted ( void  )

Is AnimationInterface started.

Returns
true if AnimationInterface was started

Definition at line 262 of file animation-interface.cc.

References m_started.

void ns3::AnimationInterface::LteRxTrace ( std::string  context,
Ptr< const Packet p,
const Mac48Address m 
)
private

Definition at line 898 of file animation-interface.cc.

References GenericWirelessRxTrace(), LTE, and NS_LOG_FUNCTION.

Referenced by ConnectCallbacks().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::AnimationInterface::LteSpectrumPhyRxStart ( std::string  context,
Ptr< const PacketBurst pb 
)
private
void ns3::AnimationInterface::LteSpectrumPhyTxStart ( std::string  context,
Ptr< const PacketBurst pb 
)
private
void ns3::AnimationInterface::LteTxTrace ( std::string  context,
Ptr< const Packet p,
const Mac48Address m 
)
private

Definition at line 891 of file animation-interface.cc.

References GenericWirelessTxTrace(), LTE, and NS_LOG_FUNCTION.

Referenced by ConnectCallbacks().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::AnimationInterface::MobilityAutoCheck ( )
private

Definition at line 435 of file animation-interface.cc.

References CHECK_STARTED_INTIMEWINDOW, CSMA, ns3::Node::GetId(), GetMovedNodes(), GetPosition(), ns3::Simulator::IsFinished(), LTE, m_mobilityPollInterval, NS_ASSERT, PurgePendingPackets(), ns3::Simulator::Schedule(), WIFI, WIMAX, and WriteXmlUpdateNodePosition().

Referenced by StartAnimation().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::AnimationInterface::MobilityCourseChangeTrace ( Ptr< const MobilityModel mob)
private

Definition at line 399 of file animation-interface.cc.

References CHECK_STARTED_INTIMEWINDOW, ns3::Node::GetId(), GetPosition(), NS_ASSERT, UpdatePosition(), and WriteXmlUpdateNodePosition().

Referenced by ConnectCallbacks().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ns3::AnimationInterface::NodeHasMoved ( Ptr< Node n,
Vector  newLocation 
)
private

Definition at line 418 of file animation-interface.cc.

References GetPosition().

Referenced by GetMovedNodes().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::AnimationInterface::OutputWirelessPacketRxInfo ( Ptr< const Packet p,
AnimPacketInfo pktInfo,
uint64_t  animUid 
)
private
void ns3::AnimationInterface::OutputWirelessPacketTxInfo ( Ptr< const Packet p,
AnimPacketInfo pktInfo,
uint64_t  animUid 
)
private
AnimationInterface::AnimUidPacketInfoMap * ns3::AnimationInterface::ProtocolTypeToPendingPackets ( AnimationInterface::ProtocolType  protocolType)
private
std::string ns3::AnimationInterface::ProtocolTypeToString ( AnimationInterface::ProtocolType  protocolType)
private

Definition at line 1176 of file animation-interface.cc.

References CSMA, LTE, UAN, WIFI, and WIMAX.

Referenced by GenericWirelessRxTrace(), and GenericWirelessTxTrace().

+ Here is the caller graph for this function:

void ns3::AnimationInterface::PurgePendingPackets ( AnimationInterface::ProtocolType  protocolType)
private

Definition at line 1110 of file animation-interface.cc.

References ns3::Time::GetSeconds(), ns3::AnimationInterface::AnimPacketInfo::m_fbTx, ns3::Simulator::Now(), NS_ASSERT, ProtocolTypeToPendingPackets(), and PURGE_INTERVAL.

Referenced by MobilityAutoCheck().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::AnimationInterface::QueueDropTrace ( std::string  context,
Ptr< const Packet p 
)
private

Definition at line 731 of file animation-interface.cc.

References GetNodeFromContext(), and m_nodeQueueDrop.

Referenced by ConnectCallbacks().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::AnimationInterface::RecursiveIpv4RoutePathSearch ( std::string  fromIpv4,
std::string  toIpv4,
Ipv4RoutePathElements rpElements 
)
private
void ns3::AnimationInterface::RemainingEnergyTrace ( std::string  context,
double  previousEnergy,
double  currentEnergy 
)
private

Definition at line 626 of file animation-interface.cc.

References CHECK_STARTED_INTIMEWINDOW, GetNodeFromContext(), m_nodeEnergyFraction, m_remainingEnergyCounterId, NS_ASSERT, NS_LOG_INFO, and UpdateNodeCounter().

Referenced by ConnectCallbacks().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::AnimationInterface::ResetAnimWriteCallback ( )

Reset the write callback function.

Returns
none

Definition at line 274 of file animation-interface.cc.

References m_writeCallback.

Referenced by StopAnimation().

+ Here is the caller graph for this function:

void ns3::AnimationInterface::SetAnimWriteCallback ( AnimWriteCallback  cb)

Set a callback function to listen to AnimationInterface write events.

Parameters
cbAddress of callback function
Returns
none

Definition at line 268 of file animation-interface.cc.

References m_writeCallback.

void ns3::AnimationInterface::SetBackgroundImage ( std::string  fileName,
double  x,
double  y,
double  scaleX,
double  scaleY,
double  opacity 
)

Helper function to set the background image.

Parameters
fileNameFile name of the background image
xX co-ordinate of the image
yY co-ordinate of the image
scaleXX scale of the image
scaleYY scale of the image
opacityOpacity of the background: A value between 0.0 and 1.0. 0.0 is transparent, 1.0 is opaque
Returns
none

Definition at line 324 of file animation-interface.cc.

References NS_FATAL_ERROR, and WriteXmlUpdateBackground().

+ Here is the call graph for this function:

void ns3::AnimationInterface::SetConstantPosition ( Ptr< Node n,
double  x,
double  y,
double  z = 0 
)
static

Helper function to set Constant Position for a given node.

Parameters
nPtr to the node
xX co-ordinate of the node
yY co-ordinate of the node
zZ co-ordinate of the node
Returns
none

Definition at line 287 of file animation-interface.cc.

References ns3::Object::AggregateObject(), ns3::Node::GetId(), ns3::Object::GetObject(), NS_ASSERT, and NS_LOG_INFO.

+ Here is the call graph for this function:

void ns3::AnimationInterface::SetMaxPktsPerTraceFile ( uint64_t  maxPktsPerFile)

Set Max packets per trace file.

Parameters
maxPktsPerFileThe maximum number of packets per trace file. AnimationInterface will create trace files with the following filenames : filename, filename-1, filename-2..., filename-N where each file contains packet info for 'maxPktsPerFile' number of packets
Returns
none

Definition at line 222 of file animation-interface.cc.

References m_maxPktsPerFile.

void ns3::AnimationInterface::SetMobilityPollInterval ( Time  t)

Set mobility poll interval:WARNING: setting a low interval can cause slowness.

Parameters
tTime interval between fetching mobility/position information Default: 0.25s
Returns
none

Definition at line 280 of file animation-interface.cc.

References m_mobilityPollInterval.

void ns3::AnimationInterface::SetOutputFile ( const std::string &  fn,
bool  routing = false 
)
private

Definition at line 1663 of file animation-interface.cc.

References f(), m_f, m_outputFileName, m_routingF, m_routingFileName, NS_FATAL_ERROR, and NS_LOG_INFO.

Referenced by EnableIpv4RouteTracking(), and StartAnimation().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::AnimationInterface::SetStartTime ( Time  t)

Specify the time at which capture should start.

Parameters
tThe time at which AnimationInterface should begin capture of traffic info
Returns
none

Definition at line 210 of file animation-interface.cc.

References m_startTime.

void ns3::AnimationInterface::SetStopTime ( Time  t)

Specify the time at which capture should stop.

Parameters
tThe time at which AnimationInterface should stop capture of traffic info
Returns
none

Definition at line 216 of file animation-interface.cc.

References m_stopTime.

void ns3::AnimationInterface::SkipPacketTracing ( )

Do not trace packets.

This helps reduce the trace file size if AnimationInterface is solely used for tracking mobility, routing paths and counters

Returns
none

Definition at line 93 of file animation-interface.cc.

References m_trackPackets.

void ns3::AnimationInterface::StartAnimation ( bool  restart = false)
private
void ns3::AnimationInterface::StopAnimation ( bool  onlyAnimation = false)
private

Definition at line 1249 of file animation-interface.cc.

References m_f, m_routingF, m_started, NS_LOG_INFO, ResetAnimWriteCallback(), and WriteXmlClose().

Referenced by CheckMaxPktsPerTraceFile(), and ~AnimationInterface().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::AnimationInterface::TrackQueueCounters ( )
private
void ns3::AnimationInterface::TrackWifiPhyCounters ( )
private
void ns3::AnimationInterface::UanPhyGenRxTrace ( std::string  context,
Ptr< const Packet p 
)
private

Definition at line 824 of file animation-interface.cc.

References GenericWirelessRxTrace(), NS_LOG_FUNCTION, and UAN.

Referenced by ConnectCallbacks().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::AnimationInterface::UanPhyGenTxTrace ( std::string  context,
Ptr< const Packet p 
)
private

Definition at line 817 of file animation-interface.cc.

References GenericWirelessTxTrace(), NS_LOG_FUNCTION, and UAN.

Referenced by ConnectCallbacks().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::AnimationInterface::UpdateLinkDescription ( uint32_t  fromNode,
uint32_t  toNode,
std::string  linkDescription 
)

Helper function to update the description for a link.

Parameters
fromNodeNode Id of the "from Node" of the p2p link
toNodeNode Id of the "to Node" of the p2p link
linkDescriptionDescription of the link such as link bandwidth
Returns
none

Definition at line 358 of file animation-interface.cc.

References WriteXmlUpdateLink().

Referenced by modify().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::AnimationInterface::UpdateLinkDescription ( Ptr< Node fromNode,
Ptr< Node toNode,
std::string  linkDescription 
)

Helper function to update the description for a link.

Parameters
fromNodePtr to the "from Node" of the p2p link
toNodePtr to the "to Node" of the p2p link
linkDescriptionDescription of the link such as link bandwidth
Returns
none

Definition at line 365 of file animation-interface.cc.

References ns3::Node::GetId(), NS_ASSERT, and WriteXmlUpdateLink().

+ Here is the call graph for this function:

void ns3::AnimationInterface::UpdateNodeColor ( Ptr< Node n,
uint8_t  r,
uint8_t  g,
uint8_t  b 
)

Helper function to update the node color.

Parameters
nPtr to the node
rRed component value (0-255)
gGreen component value (0-255)
bBlue component value (0-255)
Returns
none

Definition at line 342 of file animation-interface.cc.

References ns3::Node::GetId().

Referenced by modify(), and WriteNodeColors().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::AnimationInterface::UpdateNodeColor ( uint32_t  nodeId,
uint8_t  r,
uint8_t  g,
uint8_t  b 
)

Helper function to update the node color.

Parameters
nodeIdId of the node
rRed component value (0-255)
gGreen component value (0-255)
bBlue component value (0-255)
Returns
none

Definition at line 348 of file animation-interface.cc.

References ns3::NodeList::GetNode(), m_nodeColors, NS_ASSERT, NS_LOG_INFO, and WriteXmlUpdateNodeColor().

+ Here is the call graph for this function:

void ns3::AnimationInterface::UpdateNodeCounter ( uint32_t  nodeCounterId,
uint32_t  nodeId,
double  counter 
)

Helper function to update a node's counter referenced by the nodeCounterId.

Parameters
nodeCounterIdThe counter Id obtained from AddNodeCounter
nodeIdNode Id of the node
counterCurrent value of the counter
Returns
none

Definition at line 314 of file animation-interface.cc.

References m_nodeCounters, NS_FATAL_ERROR, and WriteXmlUpdateNodeCounter().

Referenced by EnableIpv4L3ProtocolCounters(), EnableQueueCounters(), EnableWifiMacCounters(), EnableWifiPhyCounters(), modify(), RemainingEnergyTrace(), TrackIpv4L3ProtocolCounters(), TrackQueueCounters(), TrackWifiMacCounters(), TrackWifiPhyCounters(), and WriteNodeEnergies().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::AnimationInterface::UpdateNodeDescription ( Ptr< Node n,
std::string  descr 
)

Helper function to update the description for a given node.

Parameters
nPtr to the node
descrA string to briefly describe the node
Returns
none

Definition at line 374 of file animation-interface.cc.

References ns3::Node::GetId().

Referenced by modify().