A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::AnimationInterface Class Reference

Interface to network animator. More...

#include "animation-interface.h"

+ Collaboration diagram for ns3::AnimationInterface:

Classes

class  AnimPacketInfo
 AnimPacketInfo class. More...
 
class  AnimXmlElement
 AnimXmlElement class. More...
 
struct  Ipv4RoutePathElement
 Ipv4RoutePathElement structure IPv4 route path element. More...
 
struct  Ipv4RouteTrackElement
 Ipv4RouteTrackElement structure IPv4 route track element. More...
 
struct  LinkPairCompare
 LinkPairCompare structure. More...
 
struct  LinkProperties
 LinkProperties structure link properties. More...
 
struct  NodeSize
 NodeSize structure node size. More...
 
struct  P2pLinkNodeIdPair
 P2pLinkNodeIdPair structure P2P link node id pair. More...
 
struct  Rgb
 RGB structure RGB structure. More...
 

Public Types

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

Public Member Functions

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

Static Public Member Functions

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

Private Types

typedef std::map< uint64_t, AnimPacketInfoAnimUidPacketInfoMap
 AnimUidPacketInfoMap typedef.
 
typedef std::map< uint32_t, doubleEnergyFractionMap
 EnergyFractionMap typedef.
 
typedef std::vector< Ipv4RoutePathElementIpv4RoutePathElements
 Ipv4RoutePathElements typedef.
 
typedef std::map< P2pLinkNodeIdPair, LinkProperties, LinkPairCompareLinkPropertiesMap
 LinkPropertiesMap typedef.
 
typedef std::map< uint32_t, RgbNodeColorsMap
 NodeColorsMap typedef.
 
typedef std::map< uint32_t, uint64_t > NodeCounterMap64
 NodeCounterMap64 typedef.
 
typedef std::map< uint32_t, std::string > NodeDescriptionsMap
 NodeDescriptionsMap typedef.
 
typedef std::multimap< uint32_t, std::string > NodeIdIpv4Map
 NodeIdIpv4Map typedef.
 
typedef std::pair< uint32_t, std::string > NodeIdIpv4Pair
 NodeIdIpv4Pair typedef.
 
typedef std::multimap< uint32_t, std::string > NodeIdIpv6Map
 NodeIdIpv6Map typedef.
 
typedef std::pair< uint32_t, std::string > NodeIdIpv6Pair
 NodeIdIpv6Pair typedef.
 
enum  ProtocolType {
  UAN , LTE , WIFI , WIMAX ,
  CSMA , LRWPAN
}
 ProtocolType enumeration. More...
 

Private Member Functions

void AddByteTag (uint64_t animUid, Ptr< const Packet > p)
 Add byte tag function.
 
void AddPendingPacket (ProtocolType protocolType, uint64_t animUid, AnimPacketInfo pktInfo)
 Add pending packet function.
 
void AddToIpv4AddressNodeIdTable (std::string ipv4Address, uint32_t nodeId)
 Add to IPv4 address node ID table function.
 
void AddToIpv4AddressNodeIdTable (std::vector< std::string > ipv4Addresses, uint32_t nodeId)
 Add to IPv4 address node ID table function.
 
void AddToIpv6AddressNodeIdTable (std::string ipv6Address, uint32_t nodeId)
 Add to IPv6 address node ID table function.
 
void AddToIpv6AddressNodeIdTable (std::vector< std::string > ipv6Addresses, uint32_t nodeId)
 Add to IPv6 address node ID table function.
 
void CheckMaxPktsPerTraceFile ()
 Check maximum packets per trace file function.
 
void ConnectCallbacks ()
 Connect callbacks function.
 
void ConnectLte ()
 Connect LTE function.
 
void ConnectLteEnb (Ptr< Node > n, Ptr< LteEnbNetDevice > nd, uint32_t devIndex)
 Connect LTE ENB function.
 
void ConnectLteUe (Ptr< Node > n, Ptr< LteUeNetDevice > nd, uint32_t devIndex)
 Connect LTE ue function.
 
std::string CounterTypeToString (CounterType counterType)
 Counter type to string function.
 
void CsmaMacRxTrace (std::string context, Ptr< const Packet > p)
 CSMA MAC receive trace function.
 
void CsmaPhyRxEndTrace (std::string context, Ptr< const Packet > p)
 CSMA Phy receive end trace function.
 
void CsmaPhyTxBeginTrace (std::string context, Ptr< const Packet > p)
 CSMA Phy transmit begin trace function.
 
void CsmaPhyTxEndTrace (std::string context, Ptr< const Packet > p)
 CSMA Phy transmit end trace function.
 
void DequeueTrace (std::string context, Ptr< const Packet >)
 Dequeue trace function.
 
void DevTxTrace (std::string context, Ptr< const Packet > p, Ptr< NetDevice > tx, Ptr< NetDevice > rx, Time txTime, Time rxTime)
 Device transmit trace function.
 
void EnqueueTrace (std::string context, Ptr< const Packet >)
 Enqueue trace function.
 
void GenericWirelessRxTrace (std::string context, Ptr< const Packet > p, ProtocolType protocolType)
 Generic wireless receive trace function.
 
void GenericWirelessTxTrace (std::string context, Ptr< const Packet > p, ProtocolType protocolType)
 Generic wireless transmit trace function.
 
uint64_t GetAnimUidFromPacket (Ptr< const Packet >)
 Get anim UID from packet function.
 
const std::vector< std::string > GetElementsFromContext (const std::string &context) const
 Get elements from context.
 
std::string GetIpv4Address (Ptr< NetDevice > nd)
 Get IPv4 address.
 
std::vector< std::string > GetIpv4Addresses (Ptr< NetDevice > nd)
 Get IPv4 addresses.
 
std::string GetIpv4RoutingTable (Ptr< Node > n)
 Get IPv4 routing table function.
 
std::string GetIpv6Address (Ptr< NetDevice > nd)
 Get IPv6 address.
 
std::vector< std::string > GetIpv6Addresses (Ptr< NetDevice > nd)
 Get IPv6 addresses.
 
std::string GetMacAddress (Ptr< NetDevice > nd)
 Get MAC address function.
 
std::vector< Ptr< Node > > GetMovedNodes ()
 Get moved nodes function.
 
std::string GetNetAnimVersion ()
 Get netanim version function.
 
Ptr< NetDeviceGetNetDeviceFromContext (std::string context)
 Get net device from context.
 
Ptr< NodeGetNodeFromContext (const std::string &context) const
 Get node from context.
 
std::string GetPacketMetadata (Ptr< const Packet > p)
 Get packet metadata function.
 
Vector GetPosition (Ptr< Node > n)
 Get position function.
 
void Ipv4DropTrace (std::string context, const Ipv4Header &ipv4Header, Ptr< const Packet > p, Ipv4L3Protocol::DropReason dropReason, Ptr< Ipv4 > ipv4, uint32_t interfaceIndex)
 IPv4 drop trace function.
 
void Ipv4RxTrace (std::string context, Ptr< const Packet > p, Ptr< Ipv4 > ipv4, uint32_t interfaceIndex)
 IPv4 receive trace function.
 
void Ipv4TxTrace (std::string context, Ptr< const Packet > p, Ptr< Ipv4 > ipv4, uint32_t interfaceIndex)
 IPv4 transmit trace function.
 
bool IsInTimeWindow ()
 Is in time window function.
 
bool IsPacketPending (uint64_t animUid, ProtocolType protocolType)
 Is packet pending function.
 
void LrWpanMacRxDropTrace (std::string context, Ptr< const Packet > p)
 LR-WPAN MAC receive drop trace function.
 
void LrWpanMacRxTrace (std::string context, Ptr< const Packet > p)
 LR-WPAN MAC receive trace function.
 
void LrWpanMacTxDropTrace (std::string context, Ptr< const Packet > p)
 LR-WPAN MAC transmit drop trace function.
 
void LrWpanMacTxTrace (std::string context, Ptr< const Packet > p)
 LR-WPAN MAC transmit trace function.
 
void LrWpanPhyRxBeginTrace (std::string context, Ptr< const Packet > p)
 LR-WPAN Phy receive begin trace function.
 
void LrWpanPhyTxBeginTrace (std::string context, Ptr< const Packet > p)
 LR-WPAN Phy receive begin trace function.
 
void LteRxTrace (std::string context, Ptr< const Packet > p, const Mac48Address &m)
 LTE receive trace function.
 
void LteSpectrumPhyRxStart (std::string context, Ptr< const PacketBurst > pb)
 LTE Spectrum Phy receive start function.
 
void LteSpectrumPhyTxStart (std::string context, Ptr< const PacketBurst > pb)
 LTE Spectrum Phy transmit start function.
 
void LteTxTrace (std::string context, Ptr< const Packet > p, const Mac48Address &m)
 LTE transmit trace function.
 
void MobilityAutoCheck ()
 Mobility auto check function.
 
void MobilityCourseChangeTrace (Ptr< const MobilityModel > mob)
 Mobility course change trace function.
 
bool NodeHasMoved (Ptr< Node > n, Vector newLocation)
 Node has moved function.
 
void OutputCsmaPacket (Ptr< const Packet > p, AnimPacketInfo &pktInfo)
 Output CSMA packet function.
 
void OutputWirelessPacketRxInfo (Ptr< const Packet > p, AnimPacketInfo &pktInfo, uint64_t animUid)
 Output wireless packet receive info.
 
void OutputWirelessPacketTxInfo (Ptr< const Packet > p, AnimPacketInfo &pktInfo, uint64_t animUid)
 Output wireless packet transmit info.
 
AnimUidPacketInfoMapProtocolTypeToPendingPackets (ProtocolType protocolType)
 Protocol type to pending packets function.
 
std::string ProtocolTypeToString (ProtocolType protocolType)
 Protocol type to string function.
 
void PurgePendingPackets (ProtocolType protocolType)
 Purge pending packets function.
 
void QueueDropTrace (std::string context, Ptr< const Packet >)
 Queue trace function.
 
void RecursiveIpv4RoutePathSearch (std::string from, std::string to, Ipv4RoutePathElements &rpElements)
 Recursive IPv4 route path search function.
 
void RemainingEnergyTrace (std::string context, double previousEnergy, double currentEnergy)
 Remaining energy trace function.
 
void SetOutputFile (const std::string &fn, bool routing=false)
 Set output file function.
 
void StartAnimation (bool restart=false)
 Start animation function.
 
void StopAnimation (bool onlyAnimation=false)
 Stop animation function.
 
void TrackIpv4L3ProtocolCounters ()
 Track IPv4 L3 protocol counters function.
 
void TrackIpv4Route ()
 Track IPv4 router function.
 
void TrackIpv4RoutePaths ()
 Track IPv4 route paths function.
 
void TrackQueueCounters ()
 Track queue counters function.
 
void TrackWifiMacCounters ()
 Track wifi MAC counters function.
 
void TrackWifiPhyCounters ()
 Track wifi phy counters function.
 
void UanPhyGenRxTrace (std::string context, Ptr< const Packet >)
 UAN Phy gen receive trace function.
 
void UanPhyGenTxTrace (std::string context, Ptr< const Packet >)
 UAN Phy gen transmit trace function.
 
Vector UpdatePosition (Ptr< NetDevice > ndev)
 Update position function.
 
Vector UpdatePosition (Ptr< Node > n)
 Update position function.
 
Vector UpdatePosition (Ptr< Node > n, Vector v)
 Update position function.
 
void WifiMacRxDropTrace (std::string context, Ptr< const Packet > p)
 wifi MAC receive drop trace function
 
void WifiMacRxTrace (std::string context, Ptr< const Packet > p)
 wifi MAC receive trace function
 
void WifiMacTxDropTrace (std::string context, Ptr< const Packet > p)
 wifi MAC transmit drop trace function
 
void WifiMacTxTrace (std::string context, Ptr< const Packet > p)
 wifi MAC transmit trace function
 
void WifiPhyRxBeginTrace (std::string context, Ptr< const Packet > p, RxPowerWattPerChannelBand rxPowersW)
 wifi Phy receive begin trace function
 
void WifiPhyRxDropTrace (std::string context, Ptr< const Packet > p, WifiPhyRxfailureReason reason)
 wifi Phy receive drop trace function
 
void WifiPhyTxBeginTrace (std::string context, WifiConstPsduMap psduMap, WifiTxVector txVector, double txPowerW)
 wifi Phy transmit PSDU begin trace function
 
void WifiPhyTxDropTrace (std::string context, Ptr< const Packet > p)
 wifi Phy transmit drop trace function
 
void WimaxRxTrace (std::string context, Ptr< const Packet > p, const Mac48Address &m)
 WIMax receive trace function.
 
void WimaxTxTrace (std::string context, Ptr< const Packet > p, const Mac48Address &m)
 WIMax transmit trace function.
 
void WriteIpv4Addresses ()
 Write IPv4 Addresses function.
 
void WriteIpv6Addresses ()
 Write IPv6 Addresses function.
 
void WriteLinkProperties ()
 Write link properties function.
 
int WriteN (const char *data, uint32_t count, FILE *f)
 WriteN function.
 
int WriteN (const std::string &st, FILE *f)
 WriteN function.
 
void WriteNodeColors ()
 Write node colors function.
 
void WriteNodeEnergies ()
 Write node energies function.
 
void WriteNodes ()
 Write nodes function.
 
void WriteNodeSizes ()
 Write node sizes function.
 
void WriteNodeUpdate (uint32_t nodeId)
 Write node update function.
 
void WriteNonP2pLinkProperties (uint32_t id, std::string ipv4Address, std::string channelType)
 Write non P2P link properties function.
 
void WriteRoutePath (uint32_t nodeId, std::string destination, Ipv4RoutePathElements rpElements)
 Write route path function.
 
void WriteXmlAddNodeCounter (uint32_t counterId, std::string counterName, CounterType counterType)
 Write XML add node counter function.
 
void WriteXmlAddResource (uint32_t resourceId, std::string resourcePath)
 Write XML add resource function.
 
void WriteXmlAnim (bool routing=false)
 Write XML anim function.
 
void WriteXmlClose (std::string name, bool routing=false)
 Write XML close function.
 
void WriteXmlIpv4Addresses (uint32_t nodeId, std::vector< std::string > ipv4Addresses)
 Write XML Ipv4 addresses function.
 
void WriteXmlIpv6Addresses (uint32_t nodeId, std::vector< std::string > ipv6Addresses)
 Write XML Ipv6 addresses function.
 
void WriteXmlLink (uint32_t fromId, uint32_t toLp, uint32_t toId)
 Write XML link counter function.
 
void WriteXmlNode (uint32_t id, uint32_t sysId, double locX, double locY)
 Write XML node function.
 
void WriteXmlNonP2pLinkProperties (uint32_t id, std::string ipAddress, std::string channelType)
 Write XML non P2P link properties function.
 
void WriteXmlP (std::string pktType, uint32_t fId, double fbTx, double lbTx, uint32_t tId, double fbRx, double lbRx, std::string metaInfo="")
 Write XMLP function.
 
void WriteXmlP (uint64_t animUid, std::string pktType, uint32_t fId, double fbTx, double lbTx)
 Write XMLP function.
 
void WriteXmlPRef (uint64_t animUid, uint32_t fId, double fbTx, std::string metaInfo="")
 Write XMLP Ref function.
 
void WriteXmlRouting (uint32_t id, std::string routingInfo)
 Write XML routing function.
 
void WriteXmlRp (uint32_t nodeId, std::string destination, Ipv4RoutePathElements rpElements)
 Write XMLRP function.
 
void WriteXmlUpdateBackground (std::string fileName, double x, double y, double scaleX, double scaleY, double opacity)
 Write XML update background function.
 
void WriteXmlUpdateLink (uint32_t fromId, uint32_t toId, std::string linkDescription)
 Write XML update link counter function.
 
void WriteXmlUpdateNodeColor (uint32_t nodeId, uint8_t r, uint8_t g, uint8_t b)
 Write XML update node color function.
 
void WriteXmlUpdateNodeCounter (uint32_t counterId, uint32_t nodeId, double value)
 Write XML update node counter function.
 
void WriteXmlUpdateNodeDescription (uint32_t nodeId)
 Write XML update node description function.
 
void WriteXmlUpdateNodeImage (uint32_t nodeId, uint32_t resourceId)
 Write XML update node image function.
 
void WriteXmlUpdateNodePosition (uint32_t nodeId, double x, double y)
 Write XML update node position function.
 
void WriteXmlUpdateNodeSize (uint32_t nodeId, double width, double height)
 Write XML update node size function.
 

Private Attributes

uint64_t gAnimUid
 Packet unique identifier used by AnimationInterface.
 
uint64_t m_currentPktCount
 current packet count
 
bool m_enablePacketMetadata
 enable packet metadata
 
FILE * m_f
 File handle for output (0 if none)
 
Time m_ipv4L3ProtocolCountersPollInterval
 IPv4 L3 protocol counters poll interval.
 
Time m_ipv4L3ProtocolCountersStopTime
 IPv4 L3 protocol counters stop time.
 
uint32_t m_ipv4L3ProtocolDropCounterId
 IPv4 protocol drop counter ID.
 
uint32_t m_ipv4L3ProtocolRxCounterId
 IPv4 L3 protocol receive counter ID.
 
uint32_t m_ipv4L3ProtocolTxCounterId
 IPv4 L3 protocol transmit counter ID.
 
std::vector< Ipv4RouteTrackElementm_ipv4RouteTrackElements
 IPv route track elements.
 
std::map< std::string, uint32_tm_ipv4ToNodeIdMap
 IPv4 to node ID map.
 
std::map< std::string, uint32_tm_ipv6ToNodeIdMap
 IPv6 to node ID map.
 
LinkPropertiesMap m_linkProperties
 link properties
 
std::map< std::string, uint32_tm_macToNodeIdMap
 MAC to node ID map.
 
uint64_t m_maxPktsPerFile
 maximum packets per file
 
Time m_mobilityPollInterval
 mobility poll interval
 
NodeColorsMap m_nodeColors
 node colors
 
std::vector< std::string > m_nodeCounters
 node counters
 
NodeDescriptionsMap m_nodeDescriptions
 node description
 
EnergyFractionMap m_nodeEnergyFraction
 node energy fraction
 
NodeIdIpv4Map m_nodeIdIpv4Map
 node ID to IPv4 map
 
NodeIdIpv6Map m_nodeIdIpv6Map
 node ID to IPv6 map
 
NodeCounterMap64 m_nodeIpv4Drop
 node IPv4 drop
 
NodeCounterMap64 m_nodeIpv4Rx
 node IPv4 receive
 
NodeCounterMap64 m_nodeIpv4Tx
 node IPv4 transmit
 
std::map< uint32_t, Vector > m_nodeLocation
 node location
 
NodeCounterMap64 m_nodeLrWpanMacRx
 node LR-WPAN MAC receive
 
NodeCounterMap64 m_nodeLrWpanMacRxDrop
 node LR-WPAN MAC receive drop
 
NodeCounterMap64 m_nodeLrWpanMacTx
 node LR-WPAN MAC transmit
 
NodeCounterMap64 m_nodeLrWpanMacTxDrop
 node LR-WPAN MAC transmit drop
 
NodeCounterMap64 m_nodeQueueDequeue
 node queue dequeue
 
NodeCounterMap64 m_nodeQueueDrop
 node queue drop
 
NodeCounterMap64 m_nodeQueueEnqueue
 node queue enqueue
 
std::map< uint32_t, NodeSizem_nodeSizes
 node sizes
 
NodeCounterMap64 m_nodeWifiMacRx
 node wifi MAC receive
 
NodeCounterMap64 m_nodeWifiMacRxDrop
 node wifi MAC receive drop
 
NodeCounterMap64 m_nodeWifiMacTx
 node wifi MAC transmit
 
NodeCounterMap64 m_nodeWifiMacTxDrop
 node wifi MAC transmit drop
 
NodeCounterMap64 m_nodeWifiPhyRxDrop
 node wifi Phy receive drop
 
NodeCounterMap64 m_nodeWifiPhyTxDrop
 node wifi Phy transmit drop
 
std::string m_originalFileName
 original file name
 
std::string m_outputFileName
 output file name
 
AnimUidPacketInfoMap m_pendingCsmaPackets
 pending CSMA packets
 
AnimUidPacketInfoMap m_pendingLrWpanPackets
 pending LR-WPAN packets
 
AnimUidPacketInfoMap m_pendingLtePackets
 pending LTE packets
 
AnimUidPacketInfoMap m_pendingUanPackets
 pending UAN packets
 
AnimUidPacketInfoMap m_pendingWifiPackets
 pending wifi packets
 
AnimUidPacketInfoMap m_pendingWimaxPackets
 pending wimax packets
 
Time m_queueCountersPollInterval
 queue counters poll interval
 
Time m_queueCountersStopTime
 queue counters stop time
 
uint32_t m_queueDequeueCounterId
 queue dequeue counter ID
 
uint32_t m_queueDropCounterId
 queue drop counter ID
 
uint32_t m_queueEnqueueCounterId
 queue enqueue counter ID
 
uint32_t m_remainingEnergyCounterId
 remaining energy counter ID
 
std::vector< std::string > m_resources
 resources
 
FILE * m_routingF
 File handle for routing table output (0 if None);.
 
std::string m_routingFileName
 routing file name
 
NodeContainer m_routingNc
 routing node container
 
Time m_routingPollInterval
 routing poll interval
 
Time m_routingStopTime
 routing stop time
 
bool m_started
 started
 
Time m_startTime
 start time
 
Time m_stopTime
 stop time
 
bool m_trackPackets
 track packets
 
Time m_wifiMacCountersPollInterval
 wifi MAC counters poll interval
 
Time m_wifiMacCountersStopTime
 wifi MAC counters stop time
 
uint32_t m_wifiMacRxCounterId
 wifi MAC receive counter ID
 
uint32_t m_wifiMacRxDropCounterId
 wifi MAC receive drop counter ID
 
uint32_t m_wifiMacTxCounterId
 wifi MAC transmit counter ID
 
uint32_t m_wifiMacTxDropCounterId
 wifi MAC transmit drop counter ID
 
Time m_wifiPhyCountersPollInterval
 wifi Phy counters poll interval
 
Time m_wifiPhyCountersStopTime
 wifi Phy counters stop time
 
uint32_t m_wifiPhyRxDropCounterId
 wifi Phy receive drop counter ID
 
uint32_t m_wifiPhyTxDropCounterId
 wifi Phy transmit drop counter ID
 
AnimWriteCallback m_writeCallback
 write callback
 

Static Private Attributes

static RectangleuserBoundary
 user boundary
 

Detailed Description

Interface to network animator.

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

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

Member Typedef Documentation

◆ AnimUidPacketInfoMap

AnimUidPacketInfoMap typedef.

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

◆ AnimWriteCallback

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

typedef for WriteCallBack used for listening to AnimationInterface write messages

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

◆ EnergyFractionMap

EnergyFractionMap typedef.

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

◆ Ipv4RoutePathElements

Ipv4RoutePathElements typedef.

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

◆ LinkPropertiesMap

LinkPropertiesMap typedef.

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

◆ NodeColorsMap

NodeColorsMap typedef.

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

◆ NodeCounterMap64

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

NodeCounterMap64 typedef.

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

◆ NodeDescriptionsMap

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

NodeDescriptionsMap typedef.

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

◆ NodeIdIpv4Map

typedef std::multimap<uint32_t, std::string> ns3::AnimationInterface::NodeIdIpv4Map
private

NodeIdIpv4Map typedef.

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

◆ NodeIdIpv4Pair

typedef std::pair<uint32_t, std::string> ns3::AnimationInterface::NodeIdIpv4Pair
private

NodeIdIpv4Pair typedef.

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

◆ NodeIdIpv6Map

typedef std::multimap<uint32_t, std::string> ns3::AnimationInterface::NodeIdIpv6Map
private

NodeIdIpv6Map typedef.

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

◆ NodeIdIpv6Pair

typedef std::pair<uint32_t, std::string> ns3::AnimationInterface::NodeIdIpv6Pair
private

NodeIdIpv6Pair typedef.

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

Member Enumeration Documentation

◆ CounterType

Counter Types.

Enumerator
UINT32_COUNTER 
DOUBLE_COUNTER 

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

◆ ProtocolType

ProtocolType enumeration.

Enumerator
UAN 
LTE 
WIFI 
WIMAX 
CSMA 
LRWPAN 

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

Constructor & Destructor Documentation

◆ AnimationInterface()

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 ns3::initialized, and StartAnimation().

+ Here is the call graph for this function:

◆ ~AnimationInterface()

ns3::AnimationInterface::~AnimationInterface ( )

Destructor for the animator interface.

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

References StopAnimation().

+ Here is the call graph for this function:

Member Function Documentation

◆ AddByteTag()

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

Add byte tag function.

Parameters
animUidthe UID
pthe packet

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

References ns3::AnimByteTag::Set().

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddNodeCounter()

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 256 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:

◆ AddPendingPacket()

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

Add pending packet function.

Parameters
protocolTypethe protocol type
animUidthe UID
pktInfothe packet info

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

References NS_ASSERT, and ProtocolTypeToPendingPackets().

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddResource()

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 265 of file animation-interface.cc.

References m_resources, and WriteXmlAddResource().

+ Here is the call graph for this function:

◆ AddSourceDestination()

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 230 of file animation-interface.cc.

References m_ipv4RouteTrackElements.

◆ AddToIpv4AddressNodeIdTable() [1/2]

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

Add to IPv4 address node ID table function.

Parameters
ipv4Addressthe IPv4 address
nodeIdthe node ID

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

References m_ipv4ToNodeIdMap, and m_nodeIdIpv4Map.

Referenced by AddToIpv4AddressNodeIdTable(), and WriteLinkProperties().

+ Here is the caller graph for this function:

◆ AddToIpv4AddressNodeIdTable() [2/2]

void ns3::AnimationInterface::AddToIpv4AddressNodeIdTable ( std::vector< std::string > ipv4Addresses,
uint32_t nodeId )
private

Add to IPv4 address node ID table function.

Parameters
ipv4Addressesthe list of IPv4 addresses
nodeIdthe node ID

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

References AddToIpv4AddressNodeIdTable().

+ Here is the call graph for this function:

◆ AddToIpv6AddressNodeIdTable() [1/2]

void ns3::AnimationInterface::AddToIpv6AddressNodeIdTable ( std::string ipv6Address,
uint32_t nodeId )
private

Add to IPv6 address node ID table function.

Parameters
ipv6Addressthe IPv6 address
nodeIdthe node ID

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

References m_ipv6ToNodeIdMap, and m_nodeIdIpv6Map.

Referenced by AddToIpv6AddressNodeIdTable(), and WriteLinkProperties().

+ Here is the caller graph for this function:

◆ AddToIpv6AddressNodeIdTable() [2/2]

void ns3::AnimationInterface::AddToIpv6AddressNodeIdTable ( std::vector< std::string > ipv6Addresses,
uint32_t nodeId )
private

Add to IPv6 address node ID table function.

Parameters
ipv6Addressesthe list of IPv6 addresses
nodeIdthe node ID

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

References AddToIpv6AddressNodeIdTable().

+ Here is the call graph for this function:

◆ CheckMaxPktsPerTraceFile()

void ns3::AnimationInterface::CheckMaxPktsPerTraceFile ( )
private

Check maximum packets per trace file function.

Definition at line 2102 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:

◆ ConnectCallbacks()

void ns3::AnimationInterface::ConnectCallbacks ( )
private

◆ ConnectLte()

void ns3::AnimationInterface::ConnectLte ( )
private

Connect LTE function.

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

References ns3::NodeList::Begin(), ConnectLteEnb(), ConnectLteUe(), ns3::DynamicCast(), ns3::NodeList::End(), and NS_ASSERT.

Referenced by ConnectCallbacks().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ConnectLteEnb()

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

Connect LTE ENB function.

Parameters
nthe node
ndthe device
devIndexthe device index

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

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

Referenced by ConnectLte().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ConnectLteUe()

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

Connect LTE ue function.

Parameters
nthe node
ndthe device
devIndexthe device index

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

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

Referenced by ConnectLte().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CounterTypeToString()

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

Counter type to string function.

Parameters
counterTypethe counter type
Returns
the string

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

References DOUBLE_COUNTER, and UINT32_COUNTER.

Referenced by WriteXmlAddNodeCounter().

+ Here is the caller graph for this function:

◆ CsmaMacRxTrace()

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

CSMA MAC receive trace function.

Parameters
contextthe context
pthe packet
Todo
NS_ASSERT (CsmaPacketIsPending (AnimUid) == true);

Definition at line 1221 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:

◆ CsmaPhyRxEndTrace()

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

CSMA Phy receive end trace function.

Parameters
contextthe context
pthe packet
Todo
NS_ASSERT (CsmaPacketIsPending (AnimUid) == true);

Definition at line 1199 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:

◆ CsmaPhyTxBeginTrace()

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

CSMA Phy transmit begin trace function.

Parameters
contextthe context
pthe packet

Definition at line 1160 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:

◆ CsmaPhyTxEndTrace()

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

CSMA Phy transmit end trace function.

Parameters
contextthe context
pthe packet
Todo
NS_ASSERT (IsPacketPending (AnimUid) == true);

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

References AddPendingPacket(), CHECK_STARTED_INTIMEWINDOW_TRACKPACKETS, CSMA, GetAnimUidFromPacket(), GetNetDeviceFromContext(), ns3::Time::GetSeconds(), IsPacketPending(), ns3::AnimationInterface::AnimPacketInfo::m_lbTx, m_pendingCsmaPackets, ns3::Simulator::Now(), NS_ASSERT, NS_FATAL_ERROR, NS_LOG_FUNCTION, NS_LOG_INFO, NS_LOG_WARN, and UpdatePosition().

Referenced by ConnectCallbacks().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DequeueTrace()

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

Dequeue trace function.

Parameters
contextthe context
pthe packet

Definition at line 796 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:

◆ DevTxTrace()

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

Device transmit trace function.

Parameters
contextthe context
pthe packet
txthe transmit device
rxthe receive device
txTimethe transmit time
rxTimethe receive time

Definition at line 810 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:

◆ EnableIpv4L3ProtocolCounters()

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

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

References AddNodeCounter(), ns3::NodeList::Begin(), DOUBLE_COUNTER, ns3::NodeList::End(), 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:

◆ EnableIpv4RouteTracking() [1/2]

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 219 of file animation-interface.cc.

References EnableIpv4RouteTracking(), m_routingNc, and stopTime.

+ Here is the call graph for this function:

◆ EnableIpv4RouteTracking() [2/2]

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 205 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:

◆ EnablePacketMetadata()

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

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

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

+ Here is the call graph for this function:

◆ EnableQueueCounters()

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

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

References AddNodeCounter(), ns3::NodeList::Begin(), DOUBLE_COUNTER, ns3::NodeList::End(), 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:

◆ EnableWifiMacCounters()

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

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

References AddNodeCounter(), ns3::NodeList::Begin(), DOUBLE_COUNTER, ns3::NodeList::End(), 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:

◆ EnableWifiPhyCounters()

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

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

References AddNodeCounter(), ns3::NodeList::Begin(), DOUBLE_COUNTER, ns3::NodeList::End(), 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:

◆ EnqueueTrace()

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

Enqueue trace function.

Parameters
contextthe context
pthe packet

Definition at line 789 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:

◆ GenericWirelessRxTrace()

void ns3::AnimationInterface::GenericWirelessRxTrace ( std::string context,
Ptr< const Packet > p,
ProtocolType protocolType )
private

Generic wireless receive trace function.

Parameters
contextthe context
pthe packet
protocolTypethe protocol type

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

References CHECK_STARTED_INTIMEWINDOW_TRACKPACKETS, GetAnimUidFromPacket(), GetNetDeviceFromContext(), IsPacketPending(), ns3::Simulator::Now(), NS_ASSERT, NS_LOG_FUNCTION, NS_LOG_INFO, NS_LOG_WARN, OutputWirelessPacketRxInfo(), ProtocolTypeToPendingPackets(), ProtocolTypeToString(), and UpdatePosition().

Referenced by LteRxTrace(), UanPhyGenRxTrace(), and WimaxRxTrace().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GenericWirelessTxTrace()

void ns3::AnimationInterface::GenericWirelessTxTrace ( std::string context,
Ptr< const Packet > p,
ProtocolType protocolType )
private

Generic wireless transmit trace function.

Parameters
contextthe context
pthe packet
protocolTypethe protocol type

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

References AddByteTag(), AddPendingPacket(), CHECK_STARTED_INTIMEWINDOW_TRACKPACKETS, ns3::DynamicCast(), gAnimUid, GetNetDeviceFromContext(), m_macToNodeIdMap, ns3::Simulator::Now(), NS_ASSERT, NS_LOG_FUNCTION, NS_LOG_INFO, OutputWirelessPacketTxInfo(), ProtocolTypeToPendingPackets(), ProtocolTypeToString(), and UpdatePosition().

Referenced by LteTxTrace(), UanPhyGenTxTrace(), and WimaxTxTrace().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetAnimUidFromPacket()

uint64_t ns3::AnimationInterface::GetAnimUidFromPacket ( Ptr< const Packet > p)
private

Get anim UID from packet function.

Parameters
pthe packet
Returns
the UID

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

References ns3::AnimByteTag::Get(), ns3::AnimByteTag::GetInstanceTypeId(), ns3::ByteTagIterator::Item::GetTag(), ns3::ByteTagIterator::Item::GetTypeId(), ns3::ByteTagIterator::HasNext(), and ns3::ByteTagIterator::Next().

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetElementsFromContext()

const std::vector< std::string > ns3::AnimationInterface::GetElementsFromContext ( const std::string & context) const
private

Get elements from context.

Parameters
contextthe context string
Returns
the elements

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

Referenced by GetNetDeviceFromContext(), and GetNodeFromContext().

+ Here is the caller graph for this function:

◆ GetIpv4Address()

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

Get IPv4 address.

Parameters
ndthe device
Returns
the IPv4 address

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

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

Referenced by WriteLinkProperties().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetIpv4Addresses()

std::vector< std::string > ns3::AnimationInterface::GetIpv4Addresses ( Ptr< NetDevice > nd)
private

Get IPv4 addresses.

Parameters
ndthe device
Returns
the IPv4 address list

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

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

Referenced by WriteLinkProperties().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetIpv4RoutingTable()

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

Get IPv4 routing table function.

Parameters
nthe node
Returns
the IPv4 routing table

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

References ns3::Create(), 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:

◆ GetIpv6Address()

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

Get IPv6 address.

Parameters
ndthe device
Returns
the IPv6 address

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

References ns3::Ipv6InterfaceAddress::GetAddress(), ns3::NodeList::GetNode(), ns3::Object::GetObject(), ns3::Ipv6Address::IsLinkLocal(), and NS_LOG_WARN.

Referenced by WriteLinkProperties().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetIpv6Addresses()

std::vector< std::string > ns3::AnimationInterface::GetIpv6Addresses ( Ptr< NetDevice > nd)
private

Get IPv6 addresses.

Parameters
ndthe device
Returns
the IPv6 address list

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

References ns3::Ipv6InterfaceAddress::GetAddress(), ns3::NodeList::GetNode(), ns3::Object::GetObject(), and NS_LOG_WARN.

Referenced by WriteLinkProperties().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetMacAddress()

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

Get MAC address function.

Parameters
ndthe device
Returns
the MAC address

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

Referenced by WriteLinkProperties().

+ Here is the caller graph for this function:

◆ GetMovedNodes()

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

Get moved nodes function.

Returns
the list of moved nodes

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

References ns3::NodeList::Begin(), ns3::NodeList::End(), GetPosition(), NodeHasMoved(), NS_ASSERT, and UpdatePosition().

Referenced by MobilityAutoCheck().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetNetAnimVersion()

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

Get netanim version function.

Returns
the net anim version string

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

References NETANIM_VERSION.

Referenced by WriteXmlAnim().

+ Here is the caller graph for this function:

◆ GetNetDeviceFromContext()

Ptr< NetDevice > ns3::AnimationInterface::GetNetDeviceFromContext ( std::string context)
private

Get net device from context.

Parameters
contextthe context string
Returns
the device

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

References GetElementsFromContext(), and GetNodeFromContext().

Referenced by CsmaMacRxTrace(), CsmaPhyRxEndTrace(), CsmaPhyTxBeginTrace(), CsmaPhyTxEndTrace(), GenericWirelessRxTrace(), GenericWirelessTxTrace(), LrWpanPhyRxBeginTrace(), LrWpanPhyTxBeginTrace(), LteSpectrumPhyRxStart(), LteSpectrumPhyTxStart(), WifiPhyRxBeginTrace(), and WifiPhyTxBeginTrace().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetNodeEnergyFraction()

double ns3::AnimationInterface::GetNodeEnergyFraction ( Ptr< const Node > node) const

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

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

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

References m_nodeEnergyFraction, and NS_ASSERT.

Referenced by AnimationRemainingEnergyTestCase::CheckLogic().

+ Here is the caller graph for this function:

◆ GetNodeFromContext()

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

Get node from context.

Parameters
contextthe context string
Returns
the node

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

References GetElementsFromContext(), ns3::NodeList::GetNode(), and NS_ASSERT.

Referenced by DequeueTrace(), EnqueueTrace(), GetNetDeviceFromContext(), Ipv4DropTrace(), Ipv4RxTrace(), Ipv4TxTrace(), LrWpanMacRxDropTrace(), LrWpanMacRxTrace(), LrWpanMacTxDropTrace(), LrWpanMacTxTrace(), QueueDropTrace(), RemainingEnergyTrace(), WifiMacRxDropTrace(), WifiMacRxTrace(), WifiMacTxDropTrace(), WifiMacTxTrace(), WifiPhyRxDropTrace(), and WifiPhyTxDropTrace().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetPacketMetadata()

std::string ns3::AnimationInterface::GetPacketMetadata ( Ptr< const Packet > p)
private

Get packet metadata function.

Parameters
pthe packet
Returns
the meta data

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

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

+ Here is the caller graph for this function:

◆ GetPosition()

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

Get position function.

Parameters
nthe node
Returns
the position vector

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

References m_nodeLocation, and NS_FATAL_ERROR.

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

+ Here is the caller graph for this function:

◆ GetTracePktCount()

uint64_t ns3::AnimationInterface::GetTracePktCount ( ) const

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

Returns
Number of packets recorded in the current trace file

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

References m_currentPktCount.

Referenced by AnimationInterfaceTestCase::CheckLogic().

+ Here is the caller graph for this function:

◆ Ipv4DropTrace()

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

IPv4 drop trace function.

Parameters
contextthe context
ipv4Headerthe IPv4 header
pthe packet
dropReasonthe reason for the drop
ipv4the IP
interfaceIndexthe interface index

Definition at line 777 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:

◆ Ipv4RxTrace()

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

IPv4 receive trace function.

Parameters
contextthe context
pthe packet
ipv4the IP
interfaceIndexthe interface index

Definition at line 767 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:

◆ Ipv4TxTrace()

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

IPv4 transmit trace function.

Parameters
contextthe context
pthe packet
ipv4the IP
interfaceIndexthe interface index

Definition at line 757 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:

◆ IsInitialized()

bool ns3::AnimationInterface::IsInitialized ( )
static

Check if AnimationInterface is initialized.

Returns
true if AnimationInterface was already initialized

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

References ns3::initialized.

◆ IsInTimeWindow()

bool ns3::AnimationInterface::IsInTimeWindow ( )
private

Is in time window function.

Returns
true if in the time window

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

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

+ Here is the call graph for this function:

◆ IsPacketPending()

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

Is packet pending function.

Parameters
animUidthe UID
protocolTypethe protocol type
Returns
true if a packet is pending

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

References NS_ASSERT, and ProtocolTypeToPendingPackets().

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsStarted()

bool ns3::AnimationInterface::IsStarted ( ) const

Is AnimationInterface started.

Returns
true if AnimationInterface was started

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

References m_started.

◆ LrWpanMacRxDropTrace()

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

LR-WPAN MAC receive drop trace function.

Parameters
contextthe context
pthe packet

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

References GetNodeFromContext(), and m_nodeLrWpanMacRxDrop.

Referenced by ConnectCallbacks().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LrWpanMacRxTrace()

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

LR-WPAN MAC receive trace function.

Parameters
contextthe context
pthe packet

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

References GetNodeFromContext(), and m_nodeLrWpanMacRx.

Referenced by ConnectCallbacks().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LrWpanMacTxDropTrace()

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

LR-WPAN MAC transmit drop trace function.

Parameters
contextthe context
pthe packet

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

References GetNodeFromContext(), and m_nodeLrWpanMacTxDrop.

Referenced by ConnectCallbacks().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LrWpanMacTxTrace()

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

LR-WPAN MAC transmit trace function.

Parameters
contextthe context
pthe packet

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

References GetNodeFromContext(), and m_nodeLrWpanMacTx.

Referenced by ConnectCallbacks().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LrWpanPhyRxBeginTrace()

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

LR-WPAN Phy receive begin trace function.

Parameters
contextthe context
pthe packet

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

References CHECK_STARTED_INTIMEWINDOW_TRACKPACKETS, GetAnimUidFromPacket(), GetNetDeviceFromContext(), IsPacketPending(), LRWPAN, m_pendingLrWpanPackets, ns3::Simulator::Now(), NS_ASSERT, NS_LOG_FUNCTION, NS_LOG_INFO, NS_LOG_WARN, OutputWirelessPacketRxInfo(), and UpdatePosition().

Referenced by ConnectCallbacks().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LrWpanPhyTxBeginTrace()

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

LR-WPAN Phy receive begin trace function.

Parameters
contextthe context
pthe packet

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

References AddByteTag(), AddPendingPacket(), CHECK_STARTED_INTIMEWINDOW_TRACKPACKETS, ns3::DynamicCast(), gAnimUid, GetNetDeviceFromContext(), ns3::lrwpan::LrWpanMacHeader::GetSrcAddrMode(), LRWPAN, m_macToNodeIdMap, m_pendingLrWpanPackets, ns3::Simulator::Now(), NS_ASSERT, NS_LOG_FUNCTION, NS_LOG_INFO, NS_LOG_WARN, OutputWirelessPacketTxInfo(), and UpdatePosition().

Referenced by ConnectCallbacks().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LteRxTrace()

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

LTE receive trace function.

Parameters
contextthe context
pthe packet
mthe MAC address

Definition at line 1093 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:

◆ LteSpectrumPhyRxStart()

void ns3::AnimationInterface::LteSpectrumPhyRxStart ( std::string context,
Ptr< const PacketBurst > pb )
private

LTE Spectrum Phy receive start function.

Parameters
contextthe context
pbthe packet burst

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

References CHECK_STARTED_INTIMEWINDOW_TRACKPACKETS, gAnimUid, GetAnimUidFromPacket(), GetNetDeviceFromContext(), IsPacketPending(), LTE, m_pendingLtePackets, ns3::Simulator::Now(), NS_ASSERT, NS_LOG_FUNCTION, NS_LOG_INFO, NS_LOG_WARN, OutputWirelessPacketRxInfo(), ns3::AnimationInterface::AnimPacketInfo::ProcessRxBegin(), and UpdatePosition().

Referenced by ConnectLteEnb(), and ConnectLteUe().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LteSpectrumPhyTxStart()

void ns3::AnimationInterface::LteSpectrumPhyTxStart ( std::string context,
Ptr< const PacketBurst > pb )
private

LTE Spectrum Phy transmit start function.

Parameters
contextthe context
pbthe packet burst

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

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

Referenced by ConnectLteEnb(), and ConnectLteUe().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LteTxTrace()

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

LTE transmit trace function.

Parameters
contextthe context
pthe packet
mthe MAC address

Definition at line 1086 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:

◆ MobilityAutoCheck()

void ns3::AnimationInterface::MobilityAutoCheck ( )
private

Mobility auto check function.

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

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

Referenced by MobilityAutoCheck(), and StartAnimation().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MobilityCourseChangeTrace()

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

Mobility course change trace function.

Parameters
mobthe mobility model

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

References CHECK_STARTED_INTIMEWINDOW, 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:

◆ NodeHasMoved()

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

Node has moved function.

Parameters
nthe node
newLocationthe new location vector
Returns
true if the node has moved

Definition at line 457 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:

◆ OutputCsmaPacket()

void ns3::AnimationInterface::OutputCsmaPacket ( Ptr< const Packet > p,
AnimPacketInfo & pktInfo )
private

Output CSMA packet function.

Parameters
pthe packet
pktInfothe packet info

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

References CheckMaxPktsPerTraceFile(), ns3::Node::GetId(), ns3::NetDevice::GetNode(), GetPacketMetadata(), m_enablePacketMetadata, ns3::AnimationInterface::AnimPacketInfo::m_fbRx, ns3::AnimationInterface::AnimPacketInfo::m_fbTx, ns3::AnimationInterface::AnimPacketInfo::m_lbRx, ns3::AnimationInterface::AnimPacketInfo::m_lbTx, ns3::AnimationInterface::AnimPacketInfo::m_rxnd, ns3::AnimationInterface::AnimPacketInfo::m_txnd, NS_ASSERT, and WriteXmlP().

Referenced by CsmaMacRxTrace(), and CsmaPhyRxEndTrace().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ OutputWirelessPacketRxInfo()

void ns3::AnimationInterface::OutputWirelessPacketRxInfo ( Ptr< const Packet > p,
AnimPacketInfo & pktInfo,
uint64_t animUid )
private

Output wireless packet receive info.

Parameters
pthe packet
pktInfothe packet info
animUidthe UID

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

References CheckMaxPktsPerTraceFile(), ns3::Node::GetId(), ns3::NetDevice::GetNode(), ns3::AnimationInterface::AnimPacketInfo::m_fbRx, ns3::AnimationInterface::AnimPacketInfo::m_lbRx, ns3::AnimationInterface::AnimPacketInfo::m_rxnd, and WriteXmlP().

Referenced by GenericWirelessRxTrace(), LrWpanPhyRxBeginTrace(), LteSpectrumPhyRxStart(), and WifiPhyRxBeginTrace().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ OutputWirelessPacketTxInfo()

void ns3::AnimationInterface::OutputWirelessPacketTxInfo ( Ptr< const Packet > p,
AnimPacketInfo & pktInfo,
uint64_t animUid )
private

Output wireless packet transmit info.

Parameters
pthe packet
pktInfothe packet info
animUidthe UID

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

References CheckMaxPktsPerTraceFile(), ns3::Node::GetId(), ns3::NetDevice::GetNode(), GetPacketMetadata(), m_enablePacketMetadata, ns3::AnimationInterface::AnimPacketInfo::m_fbTx, ns3::AnimationInterface::AnimPacketInfo::m_txnd, ns3::AnimationInterface::AnimPacketInfo::m_txNodeId, and WriteXmlPRef().

Referenced by GenericWirelessTxTrace(), LrWpanPhyTxBeginTrace(), LteSpectrumPhyTxStart(), and WifiPhyTxBeginTrace().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ProtocolTypeToPendingPackets()

AnimationInterface::AnimUidPacketInfoMap * ns3::AnimationInterface::ProtocolTypeToPendingPackets ( AnimationInterface::ProtocolType protocolType)
private

Protocol type to pending packets function.

Parameters
protocolTypethe protocol type
Returns
AnimUidPacketInfoMap *

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

References CSMA, LRWPAN, LTE, m_pendingCsmaPackets, m_pendingLrWpanPackets, m_pendingLtePackets, m_pendingUanPackets, m_pendingWifiPackets, m_pendingWimaxPackets, UAN, WIFI, and WIMAX.

Referenced by AddPendingPacket(), GenericWirelessRxTrace(), GenericWirelessTxTrace(), IsPacketPending(), PurgePendingPackets(), and WifiPhyTxBeginTrace().

+ Here is the caller graph for this function:

◆ ProtocolTypeToString()

std::string ns3::AnimationInterface::ProtocolTypeToString ( AnimationInterface::ProtocolType protocolType)
private

Protocol type to string function.

Parameters
protocolTypethe protocol type
Returns
the protocol type string

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

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

Referenced by GenericWirelessRxTrace(), and GenericWirelessTxTrace().

+ Here is the caller graph for this function:

◆ PurgePendingPackets()

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

Purge pending packets function.

Parameters
protocolTypethe protocol type

Definition at line 1307 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:

◆ QueueDropTrace()

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

Queue trace function.

Parameters
contextthe context
pthe packet

Definition at line 803 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:

◆ RecursiveIpv4RoutePathSearch()

void ns3::AnimationInterface::RecursiveIpv4RoutePathSearch ( std::string from,
std::string to,
Ipv4RoutePathElements & rpElements )
private

Recursive IPv4 route path search function.

Parameters
fromthe source node
tothe destination node
rpElementsthe IPv4 routing path elements

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

References ns3::Create(), ns3::Socket::ERROR_NOROUTETOHOST, ns3::NodeList::GetNode(), m_ipv4ToNodeIdMap, NS_FATAL_ERROR, NS_LOG_DEBUG, NS_LOG_INFO, NS_LOG_WARN, RecursiveIpv4RoutePathSearch(), and ns3::Ipv4Header::SetDestination().

Referenced by RecursiveIpv4RoutePathSearch(), and TrackIpv4RoutePaths().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RemainingEnergyTrace()

void ns3::AnimationInterface::RemainingEnergyTrace ( std::string context,
double previousEnergy,
double currentEnergy )
private

Remaining energy trace function.

Parameters
contextthe context
previousEnergyThe previous energy
currentEnergyThe current energy

Definition at line 662 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:

◆ ResetAnimWriteCallback()

void ns3::AnimationInterface::ResetAnimWriteCallback ( )

Reset the write callback function.

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

References m_writeCallback.

Referenced by StopAnimation().

+ Here is the caller graph for this function:

◆ SetAnimWriteCallback()

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

Set a callback function to listen to AnimationInterface write events.

Parameters
cbAddress of callback function

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

References m_writeCallback.

◆ SetBackgroundImage()

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 coordinate of the image
yY coordinate 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

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

References NS_FATAL_ERROR, and WriteXmlUpdateBackground().

+ Here is the call graph for this function:

◆ SetConstantPosition()

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 coordinate of the node
yY coordinate of the node
zZ coordinate of the node

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

References ns3::CreateObject(), NS_ASSERT, and NS_LOG_INFO.

Referenced by AnimationInterfaceTestCase::PrepareNetwork(), and AnimationRemainingEnergyTestCase::PrepareNetwork().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetMaxPktsPerTraceFile()

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

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

References m_maxPktsPerFile.

◆ SetMobilityPollInterval()

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

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

References m_mobilityPollInterval.

◆ SetOutputFile()

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

Set output file function.

Parameters
fnthe file name
routing

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

References m_f, m_outputFileName, m_routingF, m_routingFileName, NS_FATAL_ERROR, and NS_LOG_INFO.

Referenced by EnableIpv4RouteTracking(), and StartAnimation().

+ Here is the caller graph for this function:

◆ SetStartTime()

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

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

References m_startTime.

◆ SetStopTime()

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

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

References m_stopTime.

◆ SkipPacketTracing()

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

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

References m_trackPackets.

◆ StartAnimation()

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

Start animation function.

Parameters
restart

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

References ConnectCallbacks(), m_currentPktCount, m_mobilityPollInterval, m_outputFileName, m_started, MobilityAutoCheck(), ns3::Simulator::Schedule(), SetOutputFile(), WriteIpv4Addresses(), WriteIpv6Addresses(), WriteLinkProperties(), WriteNodeColors(), WriteNodeEnergies(), WriteNodes(), WriteNodeSizes(), and WriteXmlAnim().

Referenced by AnimationInterface().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ StopAnimation()

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

Stop animation function.

Parameters
onlyAnimation

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

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

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TrackIpv4L3ProtocolCounters()

void ns3::AnimationInterface::TrackIpv4L3ProtocolCounters ( )
private

Track IPv4 L3 protocol counters function.

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

References ns3::NodeList::Begin(), ns3::NodeList::End(), m_ipv4L3ProtocolCountersPollInterval, m_ipv4L3ProtocolCountersStopTime, m_ipv4L3ProtocolDropCounterId, m_ipv4L3ProtocolRxCounterId, m_ipv4L3ProtocolTxCounterId, m_nodeIpv4Drop, m_nodeIpv4Rx, m_nodeIpv4Tx, ns3::Simulator::Now(), NS_LOG_INFO, ns3::Simulator::Schedule(), TrackIpv4L3ProtocolCounters(), and UpdateNodeCounter().

Referenced by EnableIpv4L3ProtocolCounters(), and TrackIpv4L3ProtocolCounters().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TrackIpv4Route()

void ns3::AnimationInterface::TrackIpv4Route ( )
private

Track IPv4 router function.

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

References ns3::NodeContainer::Begin(), ns3::NodeList::Begin(), ns3::NodeContainer::End(), ns3::NodeList::End(), GetIpv4RoutingTable(), ns3::NodeContainer::GetN(), m_routingNc, m_routingPollInterval, m_routingStopTime, ns3::Simulator::Now(), NS_LOG_INFO, ns3::Simulator::Schedule(), TrackIpv4Route(), TrackIpv4RoutePaths(), and WriteXmlRouting().

Referenced by EnableIpv4RouteTracking(), and TrackIpv4Route().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TrackIpv4RoutePaths()

void ns3::AnimationInterface::TrackIpv4RoutePaths ( )
private

Track IPv4 route paths function.

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

References ns3::Create(), ns3::AnimationInterface::Ipv4RouteTrackElement::destination, ns3::AnimationInterface::Ipv4RouteTrackElement::fromNodeId, ns3::NodeList::GetNode(), m_ipv4RouteTrackElements, m_ipv4ToNodeIdMap, NS_FATAL_ERROR, NS_LOG_INFO, NS_LOG_WARN, RecursiveIpv4RoutePathSearch(), ns3::Ipv4Header::SetDestination(), and WriteRoutePath().

Referenced by TrackIpv4Route().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TrackQueueCounters()

void ns3::AnimationInterface::TrackQueueCounters ( )
private

Track queue counters function.

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

References ns3::NodeList::Begin(), ns3::NodeList::End(), m_nodeQueueDequeue, m_nodeQueueDrop, m_nodeQueueEnqueue, m_queueCountersPollInterval, m_queueCountersStopTime, m_queueDequeueCounterId, m_queueDropCounterId, m_queueEnqueueCounterId, ns3::Simulator::Now(), NS_LOG_INFO, ns3::Simulator::Schedule(), TrackQueueCounters(), and UpdateNodeCounter().

Referenced by EnableQueueCounters(), and TrackQueueCounters().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TrackWifiMacCounters()

void ns3::AnimationInterface::TrackWifiMacCounters ( )
private

Track wifi MAC counters function.

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

References ns3::NodeList::Begin(), ns3::NodeList::End(), m_nodeWifiMacRx, m_nodeWifiMacRxDrop, m_nodeWifiMacTx, m_nodeWifiMacTxDrop, m_wifiMacCountersPollInterval, m_wifiMacCountersStopTime, m_wifiMacRxCounterId, m_wifiMacRxDropCounterId, m_wifiMacTxCounterId, m_wifiMacTxDropCounterId, ns3::Simulator::Now(), NS_LOG_INFO, ns3::Simulator::Schedule(), TrackWifiMacCounters(), and UpdateNodeCounter().

Referenced by EnableWifiMacCounters(), and TrackWifiMacCounters().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TrackWifiPhyCounters()

void ns3::AnimationInterface::TrackWifiPhyCounters ( )
private

Track wifi phy counters function.

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

References ns3::NodeList::Begin(), ns3::NodeList::End(), m_nodeWifiPhyRxDrop, m_nodeWifiPhyTxDrop, m_wifiPhyCountersPollInterval, m_wifiPhyCountersStopTime, m_wifiPhyRxDropCounterId, m_wifiPhyTxDropCounterId, ns3::Simulator::Now(), NS_LOG_INFO, ns3::Simulator::Schedule(), TrackWifiPhyCounters(), and UpdateNodeCounter().

Referenced by EnableWifiPhyCounters(), and TrackWifiPhyCounters().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UanPhyGenRxTrace()

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

UAN Phy gen receive trace function.

Parameters
contextthe context
pthe packet

Definition at line 900 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:

◆ UanPhyGenTxTrace()

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

UAN Phy gen transmit trace function.

Parameters
contextthe context
pthe packet

Definition at line 893 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:

◆ UpdateLinkDescription() [1/2]

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

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

References NS_ASSERT, and WriteXmlUpdateLink().

+ Here is the call graph for this function:

◆ UpdateLinkDescription() [2/2]

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

Definition at line 396 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:

◆ UpdateNodeColor() [1/2]

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)

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

References UpdateNodeColor().

Referenced by modify(), UpdateAnimation(), UpdateNodeColor(), and WriteNodeColors().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UpdateNodeColor() [2/2]

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)

Definition at line 386 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:

◆ UpdateNodeCounter()

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

Definition at line 340 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:

◆ UpdateNodeDescription() [1/2]

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

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

References UpdateNodeDescription().

Referenced by modify(), and UpdateNodeDescription().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UpdateNodeDescription() [2/2]

void ns3::AnimationInterface::UpdateNodeDescription ( uint32_t nodeId,
std::string descr )

Helper function to update the description for a given node.

Parameters
nodeIdId of the node
descrA string to briefly describe the node

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

References ns3::NodeList::GetNode(), m_nodeDescriptions, NS_ASSERT, and WriteXmlUpdateNodeDescription().

+ Here is the call graph for this function:

◆ UpdateNodeImage()

void ns3::AnimationInterface::UpdateNodeImage ( uint32_t nodeId,
uint32_t resourceId )

Helper function to update the image of a node.

Parameters
nodeIdId of the node
resourceIdId of the image resource that was previously added

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

References m_resources, NS_FATAL_ERROR, NS_LOG_INFO, and WriteXmlUpdateNodeImage().

Referenced by modify().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UpdateNodeSize() [1/2]

void ns3::AnimationInterface::UpdateNodeSize ( Ptr< Node > n,
double width,
double height )

Helper function to update the size of a node.

Parameters
nPtr to the node
widthWidth of the node
heightHeight of the node

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

References UpdateNodeSize().

Referenced by modify(), UpdateAnimation(), UpdateNodeSize(), and WriteNodeSizes().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UpdateNodeSize() [2/2]

void ns3::AnimationInterface::UpdateNodeSize ( uint32_t nodeId,
double width,
double height )

Helper function to update the size of a node.

Parameters
nodeIdId of the node
widthWidth of the node
heightHeight of the node

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

References ns3::AnimationInterface::NodeSize::height, m_nodeSizes, ns3::AnimationInterface::NodeSize::width, and WriteXmlUpdateNodeSize().

+ Here is the call graph for this function:

◆ UpdatePosition() [1/3]

Vector ns3::AnimationInterface::UpdatePosition ( Ptr< NetDevice > ndev)
private

Update position function.

Parameters
ndevthe device
Returns
the position vector

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

References NS_ASSERT, and UpdatePosition().

+ Here is the call graph for this function:

◆ UpdatePosition() [2/3]

Vector ns3::AnimationInterface::UpdatePosition ( Ptr< Node > n)
private

Update position function.

Parameters
nthe node
Returns
the position vector

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

References ns3::CreateObject(), m_nodeLocation, and NS_LOG_UNCOND.

Referenced by CsmaPhyRxEndTrace(), CsmaPhyTxBeginTrace(), CsmaPhyTxEndTrace(), GenericWirelessRxTrace(), GenericWirelessTxTrace(), GetMovedNodes(), LrWpanPhyRxBeginTrace(), LrWpanPhyTxBeginTrace(), LteSpectrumPhyRxStart(), LteSpectrumPhyTxStart(), MobilityCourseChangeTrace(), UpdatePosition(), WifiPhyRxBeginTrace(), WifiPhyTxBeginTrace(), WriteLinkProperties(), and WriteNodes().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UpdatePosition() [3/3]

Vector ns3::AnimationInterface::UpdatePosition ( Ptr< Node > n,
Vector v )
private

Update position function.

Parameters
nthe node
vthe vector
Returns
the position vector

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

References m_nodeLocation.

◆ WifiMacRxDropTrace()

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

wifi MAC receive drop trace function

Parameters
contextthe context
pthe packet

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

References GetNodeFromContext(), and m_nodeWifiMacRxDrop.

Referenced by ConnectCallbacks().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WifiMacRxTrace()

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

wifi MAC receive trace function

Parameters
contextthe context
pthe packet

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

References GetNodeFromContext(), and m_nodeWifiMacRx.

Referenced by ConnectCallbacks().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WifiMacTxDropTrace()

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

wifi MAC transmit drop trace function

Parameters
contextthe context
pthe packet

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

References GetNodeFromContext(), and m_nodeWifiMacTxDrop.

Referenced by ConnectCallbacks().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WifiMacTxTrace()

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

wifi MAC transmit trace function

Parameters
contextthe context
pthe packet

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

References GetNodeFromContext(), and m_nodeWifiMacTx.

Referenced by ConnectCallbacks().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WifiPhyRxBeginTrace()

void ns3::AnimationInterface::WifiPhyRxBeginTrace ( std::string context,
Ptr< const Packet > p,
RxPowerWattPerChannelBand rxPowersW )
private

wifi Phy receive begin trace function

Parameters
contextthe context
pthe packet
rxPowersWthe receive power per channel band in Watts
Todo
NS_ASSERT (WifiPacketIsPending (animUid) == true);

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

References AddPendingPacket(), CHECK_STARTED_INTIMEWINDOW_TRACKPACKETS, ns3::WifiMacHeader::GetAddr2(), GetAnimUidFromPacket(), GetNetDeviceFromContext(), ns3::NodeList::GetNode(), IsPacketPending(), m_macToNodeIdMap, m_pendingWifiPackets, ns3::Simulator::Now(), NS_ASSERT, NS_ASSERT_MSG, NS_LOG_FUNCTION, NS_LOG_INFO, NS_LOG_WARN, OutputWirelessPacketRxInfo(), UpdatePosition(), and WIFI.

Referenced by ConnectCallbacks().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WifiPhyRxDropTrace()

void ns3::AnimationInterface::WifiPhyRxDropTrace ( std::string context,
Ptr< const Packet > p,
WifiPhyRxfailureReason reason )
private

wifi Phy receive drop trace function

Parameters
contextthe context
pthe packet
reasonthe reason

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

References GetNodeFromContext(), and m_nodeWifiPhyRxDrop.

Referenced by ConnectCallbacks().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WifiPhyTxBeginTrace()

void ns3::AnimationInterface::WifiPhyTxBeginTrace ( std::string context,
WifiConstPsduMap psduMap,
WifiTxVector txVector,
double txPowerW )
private

wifi Phy transmit PSDU begin trace function

Parameters
contextthe context
psduMapthe PSDU map
txVectorthe TXVECTOR
txPowerWthe tx power in Watts

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

References AddByteTag(), AddPendingPacket(), CHECK_STARTED_INTIMEWINDOW_TRACKPACKETS, ns3::DynamicCast(), gAnimUid, GetNetDeviceFromContext(), m_macToNodeIdMap, ns3::Simulator::Now(), NS_ABORT_MSG, NS_ASSERT, NS_LOG_FUNCTION, NS_LOG_INFO, OutputWirelessPacketTxInfo(), ns3::PeekPointer(), ProtocolTypeToPendingPackets(), UpdatePosition(), and WIFI.

Referenced by ConnectCallbacks().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WifiPhyTxDropTrace()

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

wifi Phy transmit drop trace function

Parameters
contextthe context
pthe packet

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

References GetNodeFromContext(), and m_nodeWifiPhyTxDrop.

Referenced by ConnectCallbacks().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WimaxRxTrace()

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

WIMax receive trace function.

Parameters
contextthe context
pthe packet
mthe MAC address

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

References GenericWirelessRxTrace(), NS_LOG_FUNCTION, and WIMAX.

Referenced by ConnectCallbacks().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WimaxTxTrace()

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

WIMax transmit trace function.

Parameters
contextthe context
pthe packet
mthe MAC address

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

References GenericWirelessTxTrace(), NS_LOG_FUNCTION, and WIMAX.

Referenced by ConnectCallbacks().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WriteIpv4Addresses()

void ns3::AnimationInterface::WriteIpv4Addresses ( )
private

Write IPv4 Addresses function.

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

References m_nodeIdIpv4Map, and WriteXmlIpv4Addresses().

Referenced by StartAnimation().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WriteIpv6Addresses()

void ns3::AnimationInterface::WriteIpv6Addresses ( )
private

Write IPv6 Addresses function.

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

References m_nodeIdIpv6Map, and WriteXmlIpv6Addresses().

Referenced by StartAnimation().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WriteLinkProperties()

void ns3::AnimationInterface::WriteLinkProperties ( )
private

Write link properties function.

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

References AddToIpv4AddressNodeIdTable(), AddToIpv6AddressNodeIdTable(), ns3::NodeList::Begin(), ns3::NodeList::End(), ns3::AnimationInterface::P2pLinkNodeIdPair::fromNode, GetIpv4Address(), GetIpv4Addresses(), GetIpv6Address(), GetIpv6Addresses(), GetMacAddress(), m_linkProperties, NS_ASSERT, NS_LOG_DEBUG, NS_LOG_INFO, ns3::AnimationInterface::P2pLinkNodeIdPair::toNode, UpdatePosition(), WriteNonP2pLinkProperties(), and WriteXmlLink().

Referenced by StartAnimation().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WriteN() [1/2]

int ns3::AnimationInterface::WriteN ( const char * data,
uint32_t count,
FILE * f )
private

WriteN function.

Parameters
datathe data t write
countthe number of bytes to write
fthe file to write to
Returns
the number of bytes written

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

References data.

Referenced by WriteN(), WriteXmlAddNodeCounter(), WriteXmlAddResource(), WriteXmlAnim(), WriteXmlClose(), WriteXmlIpv4Addresses(), WriteXmlIpv6Addresses(), WriteXmlLink(), WriteXmlNode(), WriteXmlNonP2pLinkProperties(), WriteXmlP(), WriteXmlP(), WriteXmlPRef(), WriteXmlRouting(), WriteXmlRp(), WriteXmlUpdateBackground(), WriteXmlUpdateLink(), WriteXmlUpdateNodeColor(), WriteXmlUpdateNodeCounter(), WriteXmlUpdateNodeDescription(), WriteXmlUpdateNodeImage(), WriteXmlUpdateNodePosition(), and WriteXmlUpdateNodeSize().

+ Here is the caller graph for this function:

◆ WriteN() [2/2]

int ns3::AnimationInterface::WriteN ( const std::string & st,
FILE * f )
private

WriteN function.

Parameters
stthe string to output
fthe file to write to
Returns
the number of bytes written

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

References m_writeCallback, and WriteN().

+ Here is the call graph for this function:

◆ WriteNodeColors()

void ns3::AnimationInterface::WriteNodeColors ( )
private

Write node colors function.

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

References ns3::AnimationInterface::Rgb::b, ns3::NodeList::Begin(), ns3::NodeList::End(), ns3::AnimationInterface::Rgb::g, m_nodeColors, ns3::AnimationInterface::Rgb::r, and UpdateNodeColor().

Referenced by StartAnimation().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WriteNodeEnergies()

void ns3::AnimationInterface::WriteNodeEnergies ( )
private

Write node energies function.

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

References AddNodeCounter(), ns3::NodeList::Begin(), DOUBLE_COUNTER, ns3::NodeList::End(), ns3::NodeList::GetNode(), ns3::Object::GetObject(), m_remainingEnergyCounterId, and UpdateNodeCounter().

Referenced by StartAnimation().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WriteNodes()

void ns3::AnimationInterface::WriteNodes ( )
private

Write nodes function.

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

References ns3::NodeList::Begin(), ns3::NodeList::End(), NS_LOG_INFO, UpdatePosition(), and WriteXmlNode().

Referenced by StartAnimation().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WriteNodeSizes()

void ns3::AnimationInterface::WriteNodeSizes ( )
private

Write node sizes function.

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

References ns3::NodeList::Begin(), ns3::NodeList::End(), ns3::AnimationInterface::NodeSize::height, m_nodeSizes, NS_LOG_INFO, UpdateNodeSize(), and ns3::AnimationInterface::NodeSize::width.

Referenced by StartAnimation().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WriteNodeUpdate()

void ns3::AnimationInterface::WriteNodeUpdate ( uint32_t nodeId)
private

Write node update function.

Parameters
nodeIdthe node ID

◆ WriteNonP2pLinkProperties()

void ns3::AnimationInterface::WriteNonP2pLinkProperties ( uint32_t id,
std::string ipv4Address,
std::string channelType )
private

Write non P2P link properties function.

Parameters
idthe ID
ipv4Addressthe IP address
channelTypethe channel type

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

References WriteXmlNonP2pLinkProperties().

Referenced by WriteLinkProperties().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WriteRoutePath()

void ns3::AnimationInterface::WriteRoutePath ( uint32_t nodeId,
std::string destination,
Ipv4RoutePathElements rpElements )
private

Write route path function.

Parameters
nodeIdthe node ID
destinationthe destination
rpElementsthe IPv4 routing path elements

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

References NS_LOG_INFO, and WriteXmlRp().

Referenced by TrackIpv4RoutePaths().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WriteXmlAddNodeCounter()

void ns3::AnimationInterface::WriteXmlAddNodeCounter ( uint32_t counterId,
std::string counterName,
CounterType counterType )
private

Write XML add node counter function.

Parameters
counterIdthe counter ID
counterNamethe counter name
counterTypethe counter type

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

References ns3::AnimationInterface::AnimXmlElement::AddAttribute(), CounterTypeToString(), m_f, ns3::AnimationInterface::AnimXmlElement::ToString(), and WriteN().

Referenced by AddNodeCounter().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WriteXmlAddResource()

void ns3::AnimationInterface::WriteXmlAddResource ( uint32_t resourceId,
std::string resourcePath )
private

Write XML add resource function.

Parameters
resourceIdthe resource ID
resourcePaththe resource path

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

References ns3::AnimationInterface::AnimXmlElement::AddAttribute(), m_f, ns3::AnimationInterface::AnimXmlElement::ToString(), and WriteN().

Referenced by AddResource().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WriteXmlAnim()

void ns3::AnimationInterface::WriteXmlAnim ( bool routing = false)
private

Write XML anim function.

Parameters
routingthe routing

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

References ns3::AnimationInterface::AnimXmlElement::AddAttribute(), GetNetAnimVersion(), m_f, m_routingF, ns3::AnimationInterface::AnimXmlElement::ToString(), and WriteN().

Referenced by EnableIpv4RouteTracking(), and StartAnimation().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WriteXmlClose()

void ns3::AnimationInterface::WriteXmlClose ( std::string name,
bool routing = false )
private

Write XML close function.

Parameters
namethe name
routingtrue if routing

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

References m_f, m_routingF, and WriteN().

Referenced by StopAnimation().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WriteXmlIpv4Addresses()

void ns3::AnimationInterface::WriteXmlIpv4Addresses ( uint32_t nodeId,
std::vector< std::string > ipv4Addresses )
private

Write XML Ipv4 addresses function.

Parameters
nodeIdthe node ID
ipv4Addressesthe list of Ipv4 addresses

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

References ns3::AnimationInterface::AnimXmlElement::AddAttribute(), ns3::AnimationInterface::AnimXmlElement::AppendChild(), m_f, ns3::AnimationInterface::AnimXmlElement::SetText(), ns3::AnimationInterface::AnimXmlElement::ToString(), and WriteN().

Referenced by WriteIpv4Addresses().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WriteXmlIpv6Addresses()

void ns3::AnimationInterface::WriteXmlIpv6Addresses ( uint32_t nodeId,
std::vector< std::string > ipv6Addresses )
private

Write XML Ipv6 addresses function.

Parameters
nodeIdthe node ID
ipv6Addressesthe list of Ipv6 addresses

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

References ns3::AnimationInterface::AnimXmlElement::AddAttribute(), ns3::AnimationInterface::AnimXmlElement::AppendChild(), m_f, ns3::AnimationInterface::AnimXmlElement::SetText(), ns3::AnimationInterface::AnimXmlElement::ToString(), and WriteN().

Referenced by WriteIpv6Addresses().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WriteXmlLink()

void ns3::AnimationInterface::WriteXmlLink ( uint32_t fromId,
uint32_t toLp,
uint32_t toId )
private

Write XML link counter function.

Parameters
fromIdthe from device
toLpthe to device
toIdthe to ID

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

References ns3::AnimationInterface::AnimXmlElement::AddAttribute(), ns3::AnimationInterface::LinkProperties::fromNodeDescription, ns3::AnimationInterface::LinkProperties::linkDescription, m_f, m_linkProperties, ns3::AnimationInterface::LinkProperties::toNodeDescription, ns3::AnimationInterface::AnimXmlElement::ToString(), and WriteN().

Referenced by WriteLinkProperties().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WriteXmlNode()

void ns3::AnimationInterface::WriteXmlNode ( uint32_t id,
uint32_t sysId,
double locX,
double locY )
private

Write XML node function.

Parameters
idthe ID
sysIdthe system ID
locXthe x location
locYthe y location

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

References ns3::AnimationInterface::AnimXmlElement::AddAttribute(), m_f, ns3::AnimationInterface::AnimXmlElement::ToString(), and WriteN().

Referenced by WriteNodes().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WriteXmlNonP2pLinkProperties()

void ns3::AnimationInterface::WriteXmlNonP2pLinkProperties ( uint32_t id,
std::string ipAddress,
std::string channelType )
private

Write XML non P2P link properties function.

Parameters
idthe ID
ipAddressthe IP address
channelTypethe channel type

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

References ns3::AnimationInterface::AnimXmlElement::AddAttribute(), m_f, ns3::AnimationInterface::AnimXmlElement::ToString(), and WriteN().

Referenced by WriteNonP2pLinkProperties().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WriteXmlP() [1/2]

void ns3::AnimationInterface::WriteXmlP ( std::string pktType,
uint32_t fId,
double fbTx,
double lbTx,
uint32_t tId,
double fbRx,
double lbRx,
std::string metaInfo = "" )
private

Write XMLP function.

Parameters
pktTypethe packet type
fIdthe FID
fbTxthe FB transmit
lbTxthe LB transmit
tIdthe TID
fbRxthe FB receive
lbRxthe LB receive
metaInfothe meta info

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

References ns3::AnimationInterface::AnimXmlElement::AddAttribute(), m_f, ns3::AnimationInterface::AnimXmlElement::ToString(), and WriteN().

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WriteXmlP() [2/2]

void ns3::AnimationInterface::WriteXmlP ( uint64_t animUid,
std::string pktType,
uint32_t fId,
double fbTx,
double lbTx )
private

Write XMLP function.

Parameters
animUidthe UID
pktTypethe packet type
fIdthe FID
fbTxthe FB transmit
lbTxthe LB transmit

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

References ns3::AnimationInterface::AnimXmlElement::AddAttribute(), m_f, ns3::AnimationInterface::AnimXmlElement::ToString(), and WriteN().

+ Here is the call graph for this function:

◆ WriteXmlPRef()

void ns3::AnimationInterface::WriteXmlPRef ( uint64_t animUid,
uint32_t fId,
double fbTx,
std::string metaInfo = "" )
private

Write XMLP Ref function.

Parameters
animUidthe UID
fIdthe FID
fbTxthe FB transmit
metaInfothe meta info

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

References ns3::AnimationInterface::AnimXmlElement::AddAttribute(), m_f, ns3::AnimationInterface::AnimXmlElement::ToString(), and WriteN().

Referenced by OutputWirelessPacketTxInfo().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WriteXmlRouting()

void ns3::AnimationInterface::WriteXmlRouting ( uint32_t id,
std::string routingInfo )
private

Write XML routing function.

Parameters
idthe ID
routingInfothe routing info

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

References ns3::AnimationInterface::AnimXmlElement::AddAttribute(), m_routingF, ns3::Simulator::Now(), ns3::AnimationInterface::AnimXmlElement::ToString(), and WriteN().

Referenced by TrackIpv4Route().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WriteXmlRp()

void ns3::AnimationInterface::WriteXmlRp ( uint32_t nodeId,
std::string destination,
Ipv4RoutePathElements rpElements )
private

Write XMLRP function.

Parameters
nodeIdthe node ID
destinationthe destination
rpElementsthe route path elements

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

References ns3::AnimationInterface::AnimXmlElement::AddAttribute(), ns3::AnimationInterface::AnimXmlElement::AppendChild(), m_routingF, ns3::AnimationInterface::Ipv4RoutePathElement::nextHop, ns3::AnimationInterface::Ipv4RoutePathElement::nodeId, ns3::Simulator::Now(), ns3::AnimationInterface::AnimXmlElement::ToString(), and WriteN().

Referenced by WriteRoutePath().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WriteXmlUpdateBackground()

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

Write XML update background function.

Parameters
fileNamethe file name
xthe X value
ythe Y value
scaleXthe X scale
scaleYthe Y scale
opacitythe opacity

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

References ns3::AnimationInterface::AnimXmlElement::AddAttribute(), m_f, ns3::AnimationInterface::AnimXmlElement::ToString(), and WriteN().

Referenced by SetBackgroundImage().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WriteXmlUpdateLink()

void ns3::AnimationInterface::WriteXmlUpdateLink ( uint32_t fromId,
uint32_t toId,
std::string linkDescription )
private

Write XML update link counter function.

Parameters
fromIdthe from device
toIdthe to device
linkDescriptionthe link description

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

References ns3::AnimationInterface::AnimXmlElement::AddAttribute(), m_f, ns3::Simulator::Now(), ns3::AnimationInterface::AnimXmlElement::ToString(), and WriteN().

Referenced by UpdateLinkDescription(), and UpdateLinkDescription().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WriteXmlUpdateNodeColor()

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

Write XML update node color function.

Parameters
nodeIdthe node ID
rthe red color
gthe green color
bthe blue color

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

References ns3::AnimationInterface::AnimXmlElement::AddAttribute(), m_f, ns3::Simulator::Now(), ns3::AnimationInterface::AnimXmlElement::ToString(), and WriteN().

Referenced by UpdateNodeColor().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WriteXmlUpdateNodeCounter()

void ns3::AnimationInterface::WriteXmlUpdateNodeCounter ( uint32_t counterId,
uint32_t nodeId,
double value )
private

Write XML update node counter function.

Parameters
counterIdthe counter ID
nodeIdthe node ID
valuethe node counter value

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

References ns3::AnimationInterface::AnimXmlElement::AddAttribute(), m_f, ns3::Simulator::Now(), ns3::AnimationInterface::AnimXmlElement::ToString(), and WriteN().

Referenced by UpdateNodeCounter().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WriteXmlUpdateNodeDescription()

void ns3::AnimationInterface::WriteXmlUpdateNodeDescription ( uint32_t nodeId)
private

Write XML update node description function.

Parameters
nodeIdthe node ID

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

References ns3::AnimationInterface::AnimXmlElement::AddAttribute(), m_f, m_nodeDescriptions, ns3::Simulator::Now(), ns3::AnimationInterface::AnimXmlElement::ToString(), and WriteN().

Referenced by UpdateNodeDescription().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WriteXmlUpdateNodeImage()

void ns3::AnimationInterface::WriteXmlUpdateNodeImage ( uint32_t nodeId,
uint32_t resourceId )
private

Write XML update node image function.

Parameters
nodeIdthe node ID
resourceIdthe resource ID

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

References ns3::AnimationInterface::AnimXmlElement::AddAttribute(), m_f, ns3::Simulator::Now(), ns3::AnimationInterface::AnimXmlElement::ToString(), and WriteN().

Referenced by UpdateNodeImage().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WriteXmlUpdateNodePosition()

void ns3::AnimationInterface::WriteXmlUpdateNodePosition ( uint32_t nodeId,
double x,
double y )
private

Write XML update node position function.

Parameters
nodeIdthe node ID
xthe X position
ythe Y position

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

References ns3::AnimationInterface::AnimXmlElement::AddAttribute(), m_f, ns3::Simulator::Now(), ns3::AnimationInterface::AnimXmlElement::ToString(), and WriteN().

Referenced by MobilityAutoCheck(), and MobilityCourseChangeTrace().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WriteXmlUpdateNodeSize()

void ns3::AnimationInterface::WriteXmlUpdateNodeSize ( uint32_t nodeId,
double width,
double height )
private

Write XML update node size function.

Parameters
nodeIdthe node ID
widththe width
heightthe height

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

References ns3::AnimationInterface::AnimXmlElement::AddAttribute(), m_f, ns3::Simulator::Now(), ns3::AnimationInterface::AnimXmlElement::ToString(), and WriteN().

Referenced by UpdateNodeSize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ gAnimUid

uint64_t ns3::AnimationInterface::gAnimUid
private

◆ m_currentPktCount

uint64_t ns3::AnimationInterface::m_currentPktCount
private

current packet count

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

Referenced by CheckMaxPktsPerTraceFile(), GetTracePktCount(), and StartAnimation().

◆ m_enablePacketMetadata

bool ns3::AnimationInterface::m_enablePacketMetadata
private

enable packet metadata

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

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

◆ m_f

◆ m_ipv4L3ProtocolCountersPollInterval

Time ns3::AnimationInterface::m_ipv4L3ProtocolCountersPollInterval
private

IPv4 L3 protocol counters poll interval.

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

Referenced by EnableIpv4L3ProtocolCounters(), and TrackIpv4L3ProtocolCounters().

◆ m_ipv4L3ProtocolCountersStopTime

Time ns3::AnimationInterface::m_ipv4L3ProtocolCountersStopTime
private

IPv4 L3 protocol counters stop time.

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

Referenced by EnableIpv4L3ProtocolCounters(), and TrackIpv4L3ProtocolCounters().

◆ m_ipv4L3ProtocolDropCounterId

uint32_t ns3::AnimationInterface::m_ipv4L3ProtocolDropCounterId
private

IPv4 protocol drop counter ID.

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

Referenced by EnableIpv4L3ProtocolCounters(), and TrackIpv4L3ProtocolCounters().

◆ m_ipv4L3ProtocolRxCounterId

uint32_t ns3::AnimationInterface::m_ipv4L3ProtocolRxCounterId
private

IPv4 L3 protocol receive counter ID.

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

Referenced by EnableIpv4L3ProtocolCounters(), and TrackIpv4L3ProtocolCounters().

◆ m_ipv4L3ProtocolTxCounterId

uint32_t ns3::AnimationInterface::m_ipv4L3ProtocolTxCounterId
private

IPv4 L3 protocol transmit counter ID.

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

Referenced by EnableIpv4L3ProtocolCounters(), and TrackIpv4L3ProtocolCounters().

◆ m_ipv4RouteTrackElements

std::vector<Ipv4RouteTrackElement> ns3::AnimationInterface::m_ipv4RouteTrackElements
private

IPv route track elements.

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

Referenced by AddSourceDestination(), and TrackIpv4RoutePaths().

◆ m_ipv4ToNodeIdMap

std::map<std::string, uint32_t> ns3::AnimationInterface::m_ipv4ToNodeIdMap
private

IPv4 to node ID map.

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

Referenced by AddToIpv4AddressNodeIdTable(), RecursiveIpv4RoutePathSearch(), and TrackIpv4RoutePaths().

◆ m_ipv6ToNodeIdMap

std::map<std::string, uint32_t> ns3::AnimationInterface::m_ipv6ToNodeIdMap
private

IPv6 to node ID map.

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

Referenced by AddToIpv6AddressNodeIdTable().

◆ m_linkProperties

LinkPropertiesMap ns3::AnimationInterface::m_linkProperties
private

link properties

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

Referenced by WriteLinkProperties(), and WriteXmlLink().

◆ m_macToNodeIdMap

std::map<std::string, uint32_t> ns3::AnimationInterface::m_macToNodeIdMap
private

MAC to node ID map.

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

Referenced by GenericWirelessTxTrace(), LrWpanPhyTxBeginTrace(), WifiPhyRxBeginTrace(), and WifiPhyTxBeginTrace().

◆ m_maxPktsPerFile

uint64_t ns3::AnimationInterface::m_maxPktsPerFile
private

maximum packets per file

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

Referenced by CheckMaxPktsPerTraceFile(), and SetMaxPktsPerTraceFile().

◆ m_mobilityPollInterval

Time ns3::AnimationInterface::m_mobilityPollInterval
private

mobility poll interval

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

Referenced by MobilityAutoCheck(), SetMobilityPollInterval(), and StartAnimation().

◆ m_nodeColors

NodeColorsMap ns3::AnimationInterface::m_nodeColors
private

node colors

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

Referenced by UpdateNodeColor(), and WriteNodeColors().

◆ m_nodeCounters

std::vector<std::string> ns3::AnimationInterface::m_nodeCounters
private

node counters

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

Referenced by AddNodeCounter(), and UpdateNodeCounter().

◆ m_nodeDescriptions

NodeDescriptionsMap ns3::AnimationInterface::m_nodeDescriptions
private

node description

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

Referenced by UpdateNodeDescription(), and WriteXmlUpdateNodeDescription().

◆ m_nodeEnergyFraction

EnergyFractionMap ns3::AnimationInterface::m_nodeEnergyFraction
private

node energy fraction

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

Referenced by GetNodeEnergyFraction(), and RemainingEnergyTrace().

◆ m_nodeIdIpv4Map

NodeIdIpv4Map ns3::AnimationInterface::m_nodeIdIpv4Map
private

node ID to IPv4 map

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

Referenced by AddToIpv4AddressNodeIdTable(), and WriteIpv4Addresses().

◆ m_nodeIdIpv6Map

NodeIdIpv6Map ns3::AnimationInterface::m_nodeIdIpv6Map
private

node ID to IPv6 map

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

Referenced by AddToIpv6AddressNodeIdTable(), and WriteIpv6Addresses().

◆ m_nodeIpv4Drop

NodeCounterMap64 ns3::AnimationInterface::m_nodeIpv4Drop
private

node IPv4 drop

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

Referenced by EnableIpv4L3ProtocolCounters(), Ipv4DropTrace(), and TrackIpv4L3ProtocolCounters().

◆ m_nodeIpv4Rx

NodeCounterMap64 ns3::AnimationInterface::m_nodeIpv4Rx
private

node IPv4 receive

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

Referenced by EnableIpv4L3ProtocolCounters(), Ipv4RxTrace(), and TrackIpv4L3ProtocolCounters().

◆ m_nodeIpv4Tx

NodeCounterMap64 ns3::AnimationInterface::m_nodeIpv4Tx
private

node IPv4 transmit

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

Referenced by EnableIpv4L3ProtocolCounters(), Ipv4TxTrace(), and TrackIpv4L3ProtocolCounters().

◆ m_nodeLocation

std::map<uint32_t, Vector> ns3::AnimationInterface::m_nodeLocation
private

node location

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

Referenced by GetPosition(), UpdatePosition(), and UpdatePosition().

◆ m_nodeLrWpanMacRx

NodeCounterMap64 ns3::AnimationInterface::m_nodeLrWpanMacRx
private

node LR-WPAN MAC receive

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

Referenced by LrWpanMacRxTrace().

◆ m_nodeLrWpanMacRxDrop

NodeCounterMap64 ns3::AnimationInterface::m_nodeLrWpanMacRxDrop
private

node LR-WPAN MAC receive drop

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

Referenced by LrWpanMacRxDropTrace().

◆ m_nodeLrWpanMacTx

NodeCounterMap64 ns3::AnimationInterface::m_nodeLrWpanMacTx
private

node LR-WPAN MAC transmit

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

Referenced by LrWpanMacTxTrace().

◆ m_nodeLrWpanMacTxDrop

NodeCounterMap64 ns3::AnimationInterface::m_nodeLrWpanMacTxDrop
private

node LR-WPAN MAC transmit drop

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

Referenced by LrWpanMacTxDropTrace().

◆ m_nodeQueueDequeue

NodeCounterMap64 ns3::AnimationInterface::m_nodeQueueDequeue
private

node queue dequeue

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

Referenced by DequeueTrace(), EnableQueueCounters(), and TrackQueueCounters().

◆ m_nodeQueueDrop

NodeCounterMap64 ns3::AnimationInterface::m_nodeQueueDrop
private

node queue drop

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

Referenced by EnableQueueCounters(), QueueDropTrace(), and TrackQueueCounters().

◆ m_nodeQueueEnqueue

NodeCounterMap64 ns3::AnimationInterface::m_nodeQueueEnqueue
private

node queue enqueue

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

Referenced by EnableQueueCounters(), EnqueueTrace(), and TrackQueueCounters().

◆ m_nodeSizes

std::map<uint32_t, NodeSize> ns3::AnimationInterface::m_nodeSizes
private

node sizes

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

Referenced by UpdateNodeSize(), and WriteNodeSizes().

◆ m_nodeWifiMacRx

NodeCounterMap64 ns3::AnimationInterface::m_nodeWifiMacRx
private

node wifi MAC receive

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

Referenced by EnableWifiMacCounters(), TrackWifiMacCounters(), and WifiMacRxTrace().

◆ m_nodeWifiMacRxDrop

NodeCounterMap64 ns3::AnimationInterface::m_nodeWifiMacRxDrop
private

node wifi MAC receive drop

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

Referenced by EnableWifiMacCounters(), TrackWifiMacCounters(), and WifiMacRxDropTrace().

◆ m_nodeWifiMacTx

NodeCounterMap64 ns3::AnimationInterface::m_nodeWifiMacTx
private

node wifi MAC transmit

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

Referenced by EnableWifiMacCounters(), TrackWifiMacCounters(), and WifiMacTxTrace().

◆ m_nodeWifiMacTxDrop

NodeCounterMap64 ns3::AnimationInterface::m_nodeWifiMacTxDrop
private

node wifi MAC transmit drop

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

Referenced by EnableWifiMacCounters(), TrackWifiMacCounters(), and WifiMacTxDropTrace().

◆ m_nodeWifiPhyRxDrop

NodeCounterMap64 ns3::AnimationInterface::m_nodeWifiPhyRxDrop
private

node wifi Phy receive drop

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

Referenced by EnableWifiPhyCounters(), TrackWifiPhyCounters(), and WifiPhyRxDropTrace().

◆ m_nodeWifiPhyTxDrop

NodeCounterMap64 ns3::AnimationInterface::m_nodeWifiPhyTxDrop
private

node wifi Phy transmit drop

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

Referenced by EnableWifiPhyCounters(), TrackWifiPhyCounters(), and WifiPhyTxDropTrace().

◆ m_originalFileName

std::string ns3::AnimationInterface::m_originalFileName
private

original file name

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

◆ m_outputFileName

std::string ns3::AnimationInterface::m_outputFileName
private

output file name

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

Referenced by SetOutputFile(), and StartAnimation().

◆ m_pendingCsmaPackets

AnimUidPacketInfoMap ns3::AnimationInterface::m_pendingCsmaPackets
private

pending CSMA packets

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

Referenced by CsmaMacRxTrace(), CsmaPhyRxEndTrace(), CsmaPhyTxEndTrace(), and ProtocolTypeToPendingPackets().

◆ m_pendingLrWpanPackets

AnimUidPacketInfoMap ns3::AnimationInterface::m_pendingLrWpanPackets
private

pending LR-WPAN packets

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

Referenced by LrWpanPhyRxBeginTrace(), LrWpanPhyTxBeginTrace(), and ProtocolTypeToPendingPackets().

◆ m_pendingLtePackets

AnimUidPacketInfoMap ns3::AnimationInterface::m_pendingLtePackets
private

pending LTE packets

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

Referenced by LteSpectrumPhyRxStart(), and ProtocolTypeToPendingPackets().

◆ m_pendingUanPackets

AnimUidPacketInfoMap ns3::AnimationInterface::m_pendingUanPackets
private

pending UAN packets

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

Referenced by ProtocolTypeToPendingPackets().

◆ m_pendingWifiPackets

AnimUidPacketInfoMap ns3::AnimationInterface::m_pendingWifiPackets
private

pending wifi packets

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

Referenced by ProtocolTypeToPendingPackets(), and WifiPhyRxBeginTrace().

◆ m_pendingWimaxPackets

AnimUidPacketInfoMap ns3::AnimationInterface::m_pendingWimaxPackets
private

pending wimax packets

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

Referenced by ProtocolTypeToPendingPackets().

◆ m_queueCountersPollInterval

Time ns3::AnimationInterface::m_queueCountersPollInterval
private

queue counters poll interval

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

Referenced by EnableQueueCounters(), and TrackQueueCounters().

◆ m_queueCountersStopTime

Time ns3::AnimationInterface::m_queueCountersStopTime
private

queue counters stop time

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

Referenced by EnableQueueCounters(), and TrackQueueCounters().

◆ m_queueDequeueCounterId

uint32_t ns3::AnimationInterface::m_queueDequeueCounterId
private

queue dequeue counter ID

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

Referenced by EnableQueueCounters(), and TrackQueueCounters().

◆ m_queueDropCounterId

uint32_t ns3::AnimationInterface::m_queueDropCounterId
private

queue drop counter ID

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

Referenced by EnableQueueCounters(), and TrackQueueCounters().

◆ m_queueEnqueueCounterId

uint32_t ns3::AnimationInterface::m_queueEnqueueCounterId
private

queue enqueue counter ID

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

Referenced by EnableQueueCounters(), and TrackQueueCounters().

◆ m_remainingEnergyCounterId

uint32_t ns3::AnimationInterface::m_remainingEnergyCounterId
private

remaining energy counter ID

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

Referenced by RemainingEnergyTrace(), and WriteNodeEnergies().

◆ m_resources

std::vector<std::string> ns3::AnimationInterface::m_resources
private

resources

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

Referenced by AddResource(), and UpdateNodeImage().

◆ m_routingF

FILE* ns3::AnimationInterface::m_routingF
private

File handle for routing table output (0 if None);.

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

Referenced by SetOutputFile(), StopAnimation(), WriteXmlAnim(), WriteXmlClose(), WriteXmlRouting(), and WriteXmlRp().

◆ m_routingFileName

std::string ns3::AnimationInterface::m_routingFileName
private

routing file name

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

Referenced by SetOutputFile().

◆ m_routingNc

NodeContainer ns3::AnimationInterface::m_routingNc
private

routing node container

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

Referenced by EnableIpv4RouteTracking(), and TrackIpv4Route().

◆ m_routingPollInterval

Time ns3::AnimationInterface::m_routingPollInterval
private

routing poll interval

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

Referenced by EnableIpv4RouteTracking(), and TrackIpv4Route().

◆ m_routingStopTime

Time ns3::AnimationInterface::m_routingStopTime
private

routing stop time

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

Referenced by EnableIpv4RouteTracking(), and TrackIpv4Route().

◆ m_started

bool ns3::AnimationInterface::m_started
private

started

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

Referenced by IsStarted(), StartAnimation(), and StopAnimation().

◆ m_startTime

Time ns3::AnimationInterface::m_startTime
private

start time

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

Referenced by IsInTimeWindow(), and SetStartTime().

◆ m_stopTime

Time ns3::AnimationInterface::m_stopTime
private

stop time

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

Referenced by IsInTimeWindow(), and SetStopTime().

◆ m_trackPackets

bool ns3::AnimationInterface::m_trackPackets
private

track packets

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

Referenced by SkipPacketTracing().

◆ m_wifiMacCountersPollInterval

Time ns3::AnimationInterface::m_wifiMacCountersPollInterval
private

wifi MAC counters poll interval

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

Referenced by EnableWifiMacCounters(), and TrackWifiMacCounters().

◆ m_wifiMacCountersStopTime

Time ns3::AnimationInterface::m_wifiMacCountersStopTime
private

wifi MAC counters stop time

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

Referenced by EnableWifiMacCounters(), and TrackWifiMacCounters().

◆ m_wifiMacRxCounterId

uint32_t ns3::AnimationInterface::m_wifiMacRxCounterId
private

wifi MAC receive counter ID

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

Referenced by EnableWifiMacCounters(), and TrackWifiMacCounters().

◆ m_wifiMacRxDropCounterId

uint32_t ns3::AnimationInterface::m_wifiMacRxDropCounterId
private

wifi MAC receive drop counter ID

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

Referenced by EnableWifiMacCounters(), and TrackWifiMacCounters().

◆ m_wifiMacTxCounterId

uint32_t ns3::AnimationInterface::m_wifiMacTxCounterId
private

wifi MAC transmit counter ID

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

Referenced by EnableWifiMacCounters(), and TrackWifiMacCounters().

◆ m_wifiMacTxDropCounterId

uint32_t ns3::AnimationInterface::m_wifiMacTxDropCounterId
private

wifi MAC transmit drop counter ID

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

Referenced by EnableWifiMacCounters(), and TrackWifiMacCounters().

◆ m_wifiPhyCountersPollInterval

Time ns3::AnimationInterface::m_wifiPhyCountersPollInterval
private

wifi Phy counters poll interval

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

Referenced by EnableWifiPhyCounters(), and TrackWifiPhyCounters().

◆ m_wifiPhyCountersStopTime

Time ns3::AnimationInterface::m_wifiPhyCountersStopTime
private

wifi Phy counters stop time

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

Referenced by EnableWifiPhyCounters(), and TrackWifiPhyCounters().

◆ m_wifiPhyRxDropCounterId

uint32_t ns3::AnimationInterface::m_wifiPhyRxDropCounterId
private

wifi Phy receive drop counter ID

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

Referenced by EnableWifiPhyCounters(), and TrackWifiPhyCounters().

◆ m_wifiPhyTxDropCounterId

uint32_t ns3::AnimationInterface::m_wifiPhyTxDropCounterId
private

wifi Phy transmit drop counter ID

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

Referenced by EnableWifiPhyCounters(), and TrackWifiPhyCounters().

◆ m_writeCallback

AnimWriteCallback ns3::AnimationInterface::m_writeCallback
private

write callback

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

Referenced by ResetAnimWriteCallback(), SetAnimWriteCallback(), and WriteN().

◆ userBoundary

Rectangle* ns3::AnimationInterface::userBoundary
staticprivate

user boundary

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


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