|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
23 #ifndef ANIMATION_INTERFACE__H
24 #define ANIMATION_INTERFACE__H
31 #include "ns3/net-device.h"
32 #include "ns3/node-container.h"
33 #include "ns3/nstime.h"
35 #include "ns3/node-list.h"
36 #include "ns3/random-variable-stream.h"
37 #include "ns3/simulator.h"
38 #include "ns3/config.h"
39 #include "ns3/mac48-address.h"
40 #include "ns3/lte-ue-net-device.h"
41 #include "ns3/lte-enb-net-device.h"
42 #include "ns3/uan-phy-gen.h"
43 #include "ns3/wifi-phy.h"
44 #include "ns3/rectangle.h"
46 #include "ns3/ipv4-l3-protocol.h"
47 #include "ns3/wifi-phy.h"
51 #define MAX_PKTS_PER_TRACE_FILE 100000
52 #define PURGE_INTERVAL 5
53 #define NETANIM_VERSION "netanim-3.108"
54 #define CHECK_STARTED_INTIMEWINDOW {if (!m_started || !IsInTimeWindow ()) {return; }}
55 #define CHECK_STARTED_INTIMEWINDOW_TRACKPACKETS {if (!m_started || !IsInTimeWindow () || !m_trackPackets) {return; }}
288 void UpdateNodeSize (uint32_t nodeId,
double width,
double height);
310 void UpdateNodeColor (uint32_t nodeId, uint8_t r, uint8_t g, uint8_t b);
320 void UpdateNodeCounter (uint32_t nodeCounterId, uint32_t nodeId,
double counter);
334 void SetBackgroundImage (std::string fileName,
double x,
double y,
double scaleX,
double scaleY,
double opacity);
345 std::string linkDescription);
356 std::string linkDescription);
506 std::ostringstream oss1;
508 std::ostringstream oss2;
510 return oss1.str () < oss2.str ();
574 template <
typename T>
581 void AddAttribute (std::string attribute, T value,
bool xmlEscape =
false);
586 void SetText (std::string text);
597 std::string
ToString (
bool autoClose =
true);
732 void SetOutputFile (
const std::string& fn,
bool routing =
false);
764 int WriteN (
const char*
data, uint32_t count, FILE *
f);
771 int WriteN (
const std::string& st, FILE *
f);
942 uint32_t interfaceIndex);
952 uint32_t interfaceIndex);
966 uint32_t interfaceIndex);
1383 void WriteXmlNode (uint32_t
id, uint32_t sysId,
double locX,
double locY);
1390 void WriteXmlLink (uint32_t fromId, uint32_t toLp, uint32_t toId);
1397 void WriteXmlUpdateLink (uint32_t fromId, uint32_t toId, std::string linkDescription);
1416 std::string metaInfo =
"");
1425 void WriteXmlP (uint64_t animUid, std::string pktType, uint32_t fId,
double fbTx,
double lbTx);
1433 void WriteXmlPRef (uint64_t animUid, uint32_t fId,
double fbTx, std::string metaInfo =
"");
1439 void WriteXmlClose (std::string name,
bool routing =
false);
1542 virtual void Print (std::ostream &os)
const;
1549 void Set (uint64_t AnimUid);
1556 uint64_t
Get (
void)
const;
void WriteRoutePath(uint32_t nodeId, std::string destination, Ipv4RoutePathElements rpElements)
Write route path function.
void EnableQueueCounters(Time startTime, Time stopTime, Time pollInterval=Seconds(1))
Enable tracking of Queue Counters such as Enqueue, Dequeue, Queue Drops.
void WriteNonP2pLinkProperties(uint32_t id, std::string ipv4Address, std::string channelType)
Write non P2P link properties function.
void WavePhyRxBeginTrace(std::string context, Ptr< const Packet > p)
WAVE Phy receive begin trace function.
a unique identifier for an interface.
Time m_queueCountersPollInterval
queue counters poll interval
Time m_routingPollInterval
routing poll interval
void EnableWifiMacCounters(Time startTime, Time stopTime, Time pollInterval=Seconds(1))
Enable tracking of Wifi Mac Counters such as Tx, TxDrop, Rx, RxDrop.
uint32_t m_wifiPhyTxDropCounterId
wifi Phy transmit drop counter ID
void PurgePendingPackets(ProtocolType protocolType)
Purge pending packets function.
void WriteNodeColors()
Write node colors function.
void ConnectLteUe(Ptr< Node > n, Ptr< LteUeNetDevice > nd, uint32_t devIndex)
Connect LTE ue function.
void WriteNodeSizes()
Write node sizes function.
void UpdateNodeColor(Ptr< Node > n, uint8_t r, uint8_t g, uint8_t b)
Helper function to update the node color.
NodeCounterMap64 m_nodeWifiMacTxDrop
node wifi MAC transmit drop
void SetMaxPktsPerTraceFile(uint64_t maxPktsPerFile)
Set Max packets per trace file.
void WriteXmlIpv6Addresses(uint32_t nodeId, std::vector< std::string > ipv6Addresses)
Write XML Ipv6 addresses function.
LinkPropertiesMap m_linkProperties
link properties
void CheckMaxPktsPerTraceFile()
Check maximum packets per trace file function.
uint32_t fromNodeId
from node ID
void ProcessRxBegin(Ptr< const NetDevice > nd, const double fbRx)
Process receive begin.
uint32_t fromNode
from node
void UpdateNodeCounter(uint32_t nodeCounterId, uint32_t nodeId, double counter)
Helper function to update a node's counter referenced by the nodeCounterId.
std::string GetPacketMetadata(Ptr< const Packet > p)
Get packet metadata function.
void AppendChild(AnimXmlElement e)
Append child function.
void WriteXmlUpdateBackground(std::string fileName, double x, double y, double scaleX, double scaleY, double opacity)
Write XML update background function.
void ConnectCallbacks()
Connect callbacks function.
std::string ToString(bool autoClose=true)
Get text for the element function.
void WriteXmlLink(uint32_t fromId, uint32_t toLp, uint32_t toId)
Write XML link counter function.
void EnableWifiPhyCounters(Time startTime, Time stopTime, Time pollInterval=Seconds(1))
Enable tracking of Wifi Phy Counters such as TxDrop, RxDrop.
NodeCounterMap64 m_nodeIpv4Rx
node IPv4 receive
std::pair< uint32_t, std::string > NodeIdIpv6Pair
NodeIdIpv6Pair typedef.
std::string toNodeDescription
to node description
NodeCounterMap64 m_nodeLrWpanMacRx
node LR-WPAN MAC receive
void DequeueTrace(std::string context, Ptr< const Packet >)
Dequeue trace function.
ProtocolType
ProtocolType enumeration.
NodeCounterMap64 m_nodeIpv4Tx
node IPv4 transmit
std::map< std::string, uint32_t > m_macToNodeIdMap
MAC to node ID map.
void QueueDropTrace(std::string context, Ptr< const Packet >)
Queue trace function.
void TrackIpv4Route()
Track IPv4 router function.
std::string nextHop
next hop
virtual void Deserialize(TagBuffer i)
Deserialize function.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint64_t gAnimUid
Packet unique identifier used by AnimationInterface.
NodeCounterMap64 m_nodeQueueEnqueue
node queue enqueue
std::vector< Ipv4RoutePathElement > Ipv4RoutePathElements
Ipv4RoutePathElements typedef.
void LteRxTrace(std::string context, Ptr< const Packet > p, const Mac48Address &m)
LTE receive trace function.
static bool IsInitialized(void)
Check if AnimationInterface is initialized.
uint32_t m_wifiMacTxDropCounterId
wifi MAC transmit drop counter ID
AnimationInterface & AddSourceDestination(uint32_t fromNodeId, std::string destinationIpv4Address)
Helper function to print the routing path from a source node to destination IP.
int WriteN(const char *data, uint32_t count, FILE *f)
WriteN function.
void WriteXmlAddResource(uint32_t resourceId, std::string resourcePath)
Write XML add resource function.
bool IsPacketPending(uint64_t animUid, ProtocolType protocolType)
Is packet pending function.
std::vector< std::string > GetIpv6Addresses(Ptr< NetDevice > nd)
Get IPv6 addresses.
AnimUidPacketInfoMap m_pendingWavePackets
pending WAVE packets
void EnableIpv4L3ProtocolCounters(Time startTime, Time stopTime, Time pollInterval=Seconds(1))
Enable tracking of Ipv4 L3 Protocol Counters such as Tx, Rx, Drop.
void LrWpanMacTxTrace(std::string context, Ptr< const Packet > p)
LR-WPAN MAC transmit trace function.
uint32_t m_remainingEnergyCounterId
remaining energy counter ID
void SetBackgroundImage(std::string fileName, double x, double y, double scaleX, double scaleY, double opacity)
Helper function to set the background image.
std::map< uint32_t, Rgb > NodeColorsMap
NodeColorsMap typedef.
std::string GetIpv6Address(Ptr< NetDevice > nd)
Get IPv6 address.
Vector UpdatePosition(Ptr< Node > n)
Update position function.
NodeCounterMap64 m_nodeWifiPhyTxDrop
node wifi Phy transmit drop
std::string m_outputFileName
output file name
NodeCounterMap64 m_nodeLrWpanMacRxDrop
node LR-WPAN MAC receive drop
NodeCounterMap64 m_nodeWifiMacTx
node wifi MAC transmit
AnimUidPacketInfoMap m_pendingCsmaPackets
pending CSMA packets
Ptr< const NetDevice > m_rxnd
receive device
std::map< uint32_t, NodeSize > m_nodeSizes
node sizes
P2pLinkNodeIdPair structure.
Time m_wifiMacCountersPollInterval
wifi MAC counters poll interval
void WriteXmlNode(uint32_t id, uint32_t sysId, double locX, double locY)
Write XML node function.
Byte tag using by Anim to uniquely identify packets.
void WriteXmlUpdateNodeDescription(uint32_t nodeId)
Write XML update node description function.
Interface to network animator.
std::string GetIpv4RoutingTable(Ptr< Node > n)
Get IPv4 routing table function.
static void SetConstantPosition(Ptr< Node > n, double x, double y, double z=0)
Helper function to set Constant Position for a given node.
void EnqueueTrace(std::string context, Ptr< const Packet >)
Enqueue trace function.
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
virtual TypeId GetInstanceTypeId(void) const
Get Instance Type Id.
void WifiPhyTxDropTrace(std::string context, Ptr< const Packet > p)
wifi Phy transmit drop trace function
void WriteXmlAddNodeCounter(uint32_t counterId, std::string counterName, CounterType counterType)
Write XML add node counter function.
void LrWpanPhyRxBeginTrace(std::string context, Ptr< const Packet > p)
LR-WPAN Phy receive begin trace function.
void CsmaMacRxTrace(std::string context, Ptr< const Packet > p)
CSMA MAC receive trace function.
bool m_trackPackets
track packets
std::unordered_map< uint16_t, Ptr< const WifiPsdu > > WifiConstPsduMap
Map of const PSDUs indexed by STA-ID.
uint64_t m_AnimUid
the UID
NodeIdIpv4Map m_nodeIdIpv4Map
node ID to IPv4 map
DropReason
Reason why a packet has been dropped.
NodeContainer m_routingNc
routing node container
NodeIdIpv6Map m_nodeIdIpv6Map
node ID to IPv6 map
std::map< uint64_t, AnimPacketInfo > AnimUidPacketInfoMap
AnimUidPacketInfoMap typedef.
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 StopAnimation(bool onlyAnimation=false)
Stop animation function.
void MobilityAutoCheck()
Mobility auto check function.
void WriteXmlUpdateNodeSize(uint32_t nodeId, double width, double height)
Write XML update node size function.
void LrWpanPhyTxBeginTrace(std::string context, Ptr< const Packet > p)
LR-WPAN Phy receive begin trace function.
std::vector< std::string > GetIpv4Addresses(Ptr< NetDevice > nd)
Get IPv4 addresses.
Time m_wifiPhyCountersStopTime
wifi Phy counters stop time
std::vector< Ptr< Node > > GetMovedNodes()
Get moved nodes function.
std::map< P2pLinkNodeIdPair, LinkProperties, LinkPairCompare > LinkPropertiesMap
LinkPropertiesMap typedef.
uint32_t m_ipv4L3ProtocolDropCounterId
IPv4 protocol drop counter ID.
void WriteXmlUpdateNodeColor(uint32_t nodeId, uint8_t r, uint8_t g, uint8_t b)
Write XML update node color function.
std::string GetNetAnimVersion()
Get netanim version function.
CounterType
Counter Types.
AnimWriteCallback m_writeCallback
write callback
void SetOutputFile(const std::string &fn, bool routing=false)
Set output file function.
uint64_t Get(void) const
Get Uid in tag.
void GenericWirelessRxTrace(std::string context, Ptr< const Packet > p, ProtocolType protocolType)
Generic wireless receive trace function.
void AddPendingPacket(ProtocolType protocolType, uint64_t animUid, AnimPacketInfo pktInfo)
Add pending packet function.
uint32_t m_ipv4L3ProtocolTxCounterId
IPv4 L3 protocol transmit counter ID.
Ptr< const NetDevice > m_txnd
transmit device
void OutputWirelessPacketRxInfo(Ptr< const Packet > p, AnimPacketInfo &pktInfo, uint64_t animUid)
Output wireless packet receive info.
uint32_t m_wifiMacRxCounterId
wifi MAC receive counter ID
void RecursiveIpv4RoutePathSearch(std::string from, std::string to, Ipv4RoutePathElements &rpElements)
Recursive IPv4 route path search function.
uint32_t m_queueEnqueueCounterId
queue enqueue counter ID
virtual uint32_t GetSerializedSize(void) const
Get Serialized Size.
WifiPhyRxfailureReason
Enumeration of the possible reception failure reasons.
std::string m_originalFileName
original file name
void UpdateLinkDescription(uint32_t fromNode, uint32_t toNode, std::string linkDescription)
Helper function to update the description for a link.
std::vector< std::string > m_children
list of children
NodeCounterMap64 m_nodeWifiPhyRxDrop
node wifi Phy receive drop
void WriteXmlUpdateLink(uint32_t fromId, uint32_t toId, std::string linkDescription)
Write XML update link counter function.
void WifiPhyRxDropTrace(std::string context, Ptr< const Packet > p, WifiPhyRxfailureReason reason)
wifi Phy receive drop trace function
void TrackIpv4L3ProtocolCounters()
Track IPv4 L3 protocol counters function.
std::string fromNodeDescription
from node description
void WimaxRxTrace(std::string context, Ptr< const Packet > p, const Mac48Address &m)
WIMax receive trace function.
void EnablePacketMetadata(bool enable=true)
Enable Packet metadata.
void LteSpectrumPhyTxStart(std::string context, Ptr< const PacketBurst > pb)
LTE Spectrum Phy transmit start function.
void SetAnimWriteCallback(AnimWriteCallback cb)
Set a callback function to listen to AnimationInterface write events.
Time m_ipv4L3ProtocolCountersStopTime
IPv4 L3 protocol counters stop time.
tag a set of bytes in a packet
static Rectangle * userBoundary
user boundary
void WriteXmlClose(std::string name, bool routing=false)
Write XML close function.
NodeDescriptionsMap m_nodeDescriptions
node description
void TrackQueueCounters()
Track queue counters function.
Time m_routingStopTime
routing stop time
std::map< uint32_t, double > EnergyFractionMap
EnergyFractionMap typedef.
Ptr< NetDevice > GetNetDeviceFromContext(std::string context)
Get net device from context.
bool IsStarted(void)
Is AnimationInterface started.
uint32_t AddResource(std::string resourcePath)
Add a resource such as the path to an image file.
uint64_t m_maxPktsPerFile
maximum pakets per file
std::string m_routingFileName
routing file name
void ConnectLte()
Connect LTE function.
void WifiMacRxDropTrace(std::string context, Ptr< const Packet > p)
wifi MAC receive drop trace function
AnimationInterface & EnableIpv4RouteTracking(std::string fileName, Time startTime, Time stopTime, Time pollInterval=Seconds(5))
Enable tracking of the Ipv4 routing table for all Nodes.
NodeCounterMap64 m_nodeLrWpanMacTx
node LR-WPAN MAC transmit
uint64_t GetAnimUidFromPacket(Ptr< const Packet >)
Get anim UID from packet function.
void SetText(std::string text)
Set text function.
void(* AnimWriteCallback)(const char *str)
typedef for WriteCallBack used for listening to AnimationInterface write messages
std::multimap< uint32_t, std::string > NodeIdIpv4Map
NodeIdIpv4Map typedef.
void StartAnimation(bool restart=false)
Start animation function.
void CsmaPhyTxEndTrace(std::string context, Ptr< const Packet > p)
CSMA Phy transmit end trace function.
AnimUidPacketInfoMap m_pendingWifiPackets
pending wifi packets
void WriteXmlRp(uint32_t nodeId, std::string destination, Ipv4RoutePathElements rpElements)
Write XMLRP function.
Simulation virtual time values and global simulation resolution.
AnimUidPacketInfoMap * ProtocolTypeToPendingPackets(ProtocolType protocolType)
Protocol type to pending packets function.
bool operator()(P2pLinkNodeIdPair first, P2pLinkNodeIdPair second) const
comparison operator
std::vector< std::string > m_attributes
list of attributes
Ipv4RoutePathElement structure.
void SkipPacketTracing()
Do not trace packets.
void WriteXmlRouting(uint32_t id, std::string routingInfo)
Write XML routing function.
void UpdateNodeSize(uint32_t nodeId, double width, double height)
Helper function to update the size of a node.
FILE * m_f
File handle for output (0 if none)
uint32_t m_queueDropCounterId
queue drop counter ID
void SetStopTime(Time t)
Specify the time at which capture should stop.
std::string CounterTypeToString(CounterType counterType)
Counter type to string function.
Time m_wifiPhyCountersPollInterval
wifi Phy counters poll interval
void WriteIpv4Addresses()
Write IPv4 Addresses function.
void TrackWifiMacCounters()
Track wifi MAC counters function.
uint64_t m_currentPktCount
current packet count
static TypeId GetTypeId(void)
Get Type Id.
void WriteLinkProperties()
Write link properties function.
void WriteXmlIpv4Addresses(uint32_t nodeId, std::vector< std::string > ipv4Addresses)
Write XML Ipv4 addresses function.
NodeColorsMap m_nodeColors
node colors
uint32_t m_ipv4L3ProtocolRxCounterId
IPv4 L3 protocol receive counter ID.
double GetNodeEnergyFraction(Ptr< const Node > node) const
Get node's energy fraction (This used only for testing)
LinkProperties structure.
void WifiMacTxDropTrace(std::string context, Ptr< const Packet > p)
wifi MAC transmit drop trace function
uint32_t m_wifiMacRxDropCounterId
wifi MAC receive drop counter ID
Ptr< Node > GetNodeFromContext(const std::string &context) const
Get node from context.
NodeCounterMap64 m_nodeWifiMacRxDrop
node wifi MAC receive drop
void WriteNodeUpdate(uint32_t nodeId)
Write node update function.
void Ipv4RxTrace(std::string context, Ptr< const Packet > p, Ptr< Ipv4 > ipv4, uint32_t interfaceIndex)
IPv4 receive trace function.
uint32_t m_wifiMacTxCounterId
wifi MAC transmit counter ID
void Ipv4TxTrace(std::string context, Ptr< const Packet > p, Ptr< Ipv4 > ipv4, uint32_t interfaceIndex)
IPv4 transmit trace function.
AnimUidPacketInfoMap m_pendingWimaxPackets
pending wimax packets
const std::vector< std::string > GetElementsFromContext(const std::string &context) const
Get elements from context.
bool m_enablePacketMetadata
enable packet metadata
Ipv4RouteTrackElement structure.
void ResetAnimWriteCallback()
Reset the write callback function.
Time Seconds(double value)
Construct a Time in the indicated unit.
NodeCounterMap64 m_nodeIpv4Drop
node IPv4 drop
void UanPhyGenRxTrace(std::string context, Ptr< const Packet >)
UAN Phy gen receive trace function.
std::pair< uint32_t, std::string > NodeIdIpv4Pair
NodeIdIpv4Pair typedef.
void ConnectLteEnb(Ptr< Node > n, Ptr< LteEnbNetDevice > nd, uint32_t devIndex)
Connect LTE ENB function.
double f(double x, void *params)
void LrWpanMacRxTrace(std::string context, Ptr< const Packet > p)
LR-WPAN MAC receive trace function.
std::vector< std::string > m_resources
resources
std::map< std::string, uint32_t > m_ipv6ToNodeIdMap
IPv6 to node ID map.
NodeCounterMap64 m_nodeLrWpanMacTxDrop
node LR-WPAN MAC transmit drop
AnimUidPacketInfoMap m_pendingLrWpanPackets
pending LR-WPAN packets
uint32_t m_wifiPhyRxDropCounterId
wifi Phy receive drop counter ID
std::string GetMacAddress(Ptr< NetDevice > nd)
Get MAC address function.
LinkPairCompare structure.
keep track of a set of node pointers.
void WriteXmlUpdateNodeCounter(uint32_t counterId, uint32_t nodeId, double value)
Write XML update node counter function.
void WifiPhyRxBeginTrace(std::string context, Ptr< const Packet > p, RxPowerWattPerChannelBand rxPowersW)
wifi Phy receive begin trace function
NodeCounterMap64 m_nodeQueueDrop
node queue drop
virtual void Print(std::ostream &os) const
Print tag info.
void WriteXmlUpdateNodeImage(uint32_t nodeId, uint32_t resourceId)
Write XML update node image function.
uint64_t GetTracePktCount()
Get trace file packet count (This used only for testing)
void WifiMacRxTrace(std::string context, Ptr< const Packet > p)
wifi MAC receive trace function
std::map< WifiSpectrumBand, double > RxPowerWattPerChannelBand
A map of the received power (Watts) for each band.
uint32_t m_queueDequeueCounterId
queue dequeue counter ID
void AddToIpv4AddressNodeIdTable(std::string ipv4Address, uint32_t nodeId)
Add to IPv4 address node ID table function.
AnimXmlElement(std::string tagName, bool emptyElement=true)
Constructor.
void WifiPhyTxBeginTrace(std::string context, WifiConstPsduMap psduMap, WifiTxVector txVector, double txPowerW)
wifi Phy transmit PSDU begin trace function
EnergyFractionMap m_nodeEnergyFraction
node energy fraction
Time m_queueCountersStopTime
queue counters stop time
NodeCounterMap64 m_nodeWifiMacRx
node wifi MAC receive
void WavePhyTxBeginTrace(std::string context, Ptr< const Packet > p)
WAVE Phy transmit begin trace function.
Time m_ipv4L3ProtocolCountersPollInterval
IPv4 L3 protocol counters poll interval.
void LrWpanMacTxDropTrace(std::string context, Ptr< const Packet > p)
LR-WPAN MAC transmit drop trace function.
std::map< uint32_t, Vector > m_nodeLocation
node location
NodeCounterMap64 m_nodeQueueDequeue
node queue dequeue
void CsmaPhyTxBeginTrace(std::string context, Ptr< const Packet > p)
CSMA Phy transmit begin trace function.
void WriteXmlPRef(uint64_t animUid, uint32_t fId, double fbTx, std::string metaInfo="")
Write XMLP Ref function.
void OutputWirelessPacketTxInfo(Ptr< const Packet > p, AnimPacketInfo &pktInfo, uint64_t animUid)
Output wireless packet transmit info.
void AddToIpv6AddressNodeIdTable(std::string ipv6Address, uint32_t nodeId)
Add to IPv6 address node ID table function.
std::string GetIpv4Address(Ptr< NetDevice > nd)
Get IPv4 address.
void WimaxTxTrace(std::string context, Ptr< const Packet > p, const Mac48Address &m)
WIMax transmit trace function.
AnimUidPacketInfoMap m_pendingUanPackets
pending UAN packets
void MobilityCourseChangeTrace(Ptr< const MobilityModel > mob)
Mobility course change trace function.
AnimUidPacketInfoMap m_pendingLtePackets
pending LTE packets
bool IsInTimeWindow()
Is in time window function.
void WriteXmlNonP2pLinkProperties(uint32_t id, std::string ipAddress, std::string channelType)
Write XML non P2P link properties function.
void CsmaPhyRxEndTrace(std::string context, Ptr< const Packet > p)
CSMA Phy receive end trace function.
Vector GetPosition(Ptr< Node > n)
Get position function.
std::map< uint32_t, uint64_t > NodeCounterMap64
NodeCounterMap64 typedef.
void OutputCsmaPacket(Ptr< const Packet > p, AnimPacketInfo &pktInfo)
Output CSMA packet function.
std::map< uint32_t, std::string > NodeDescriptionsMap
NodeDescriptionsMap typedef.
std::string m_text
element string
AnimationInterface(const std::string filename)
Constructor.
void UpdateNodeImage(uint32_t nodeId, uint32_t resourceId)
Helper function to update the image of a node.
void WriteXmlAnim(bool routing=false)
Write XML anim function.
void UpdateNodeDescription(Ptr< Node > n, std::string descr)
Helper function to update the description for a given node.
void Set(uint64_t AnimUid)
Set global Uid in tag.
void SetMobilityPollInterval(Time t)
Set mobility poll interval:WARNING: setting a low interval can cause slowness.
uint32_t m_txNodeId
node ID
void TrackWifiPhyCounters()
Track wifi phy counters 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 WriteXmlUpdateNodePosition(uint32_t nodeId, double x, double y)
Write XML update node position function.
void TrackIpv4RoutePaths()
Track IPv4 route paths function.
void SetStartTime(Time t)
Specify the time at which capture should start.
void WriteIpv6Addresses()
Write IPv6 Addresses function.
uint32_t AddNodeCounter(std::string counterName, CounterType counterType)
Setup a node counter.
void GenericWirelessTxTrace(std::string context, Ptr< const Packet > p, ProtocolType protocolType)
Generic wireless transmit trace function.
std::string linkDescription
link description
Time m_startTime
start time
Time m_wifiMacCountersStopTime
wifi MAC counters stop time
void WriteNodeEnergies()
Write node energies function.
void AddAttribute(std::string attribute, T value, bool xmlEscape=false)
Add attribute function.
void UanPhyGenTxTrace(std::string context, Ptr< const Packet >)
UAN Phy gen transmit trace function.
void WifiMacTxTrace(std::string context, Ptr< const Packet > p)
wifi MAC transmit trace function
Time m_mobilityPollInterval
mobility poll interval
void LrWpanMacRxDropTrace(std::string context, Ptr< const Packet > p)
LR-WPAN MAC receive drop trace function.
std::vector< Ipv4RouteTrackElement > m_ipv4RouteTrackElements
IPv route track elements.
~AnimationInterface()
Destructor for the animator interface.
void DevTxTrace(std::string context, Ptr< const Packet > p, Ptr< NetDevice > tx, Ptr< NetDevice > rx, Time txTime, Time rxTime)
Device transmit trace function.
void RemainingEnergyTrace(std::string context, double previousEnergy, double currentEnergy)
Remaining energy trace function.
bool NodeHasMoved(Ptr< Node > n, Vector newLocation)
Node has moved function.
std::vector< std::string > m_nodeCounters
node counters
std::string destination
destination
void LteSpectrumPhyRxStart(std::string context, Ptr< const PacketBurst > pb)
LTE Spectrum Phy receive start function.
std::string m_tagName
tag name
void AddByteTag(uint64_t animUid, Ptr< const Packet > p)
Add byte tag function.
std::string ProtocolTypeToString(ProtocolType protocolType)
Protocol type to string function.
void WriteNodes()
Write nodes function.
std::multimap< uint32_t, std::string > NodeIdIpv6Map
NodeIdIpv6Map typedef.
std::map< std::string, uint32_t > m_ipv4ToNodeIdMap
IPv4 to node ID map.
FILE * m_routingF
File handle for routing table output (0 if None);.
virtual void Serialize(TagBuffer i) const
Serialize function.
void LteTxTrace(std::string context, Ptr< const Packet > p, const Mac48Address &m)
LTE transmit trace function.