A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
animation-interface.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or modify
3  * it under the terms of the GNU General Public License version 2 as
4  * published by the Free Software Foundation;
5  *
6  * This program is distributed in the hope that it will be useful,
7  * but WITHOUT ANY WARRANTY; without even the implied warranty of
8  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9  * GNU General Public License for more details.
10  *
11  * You should have received a copy of the GNU General Public License
12  * along with this program; if not, write to the Free Software
13  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
14  *
15  * Author: George F. Riley<riley@ece.gatech.edu>
16  * Author: John Abraham <john.abraham@gatech.edu>
17  */
18 
19 // Interface between ns3 and the network animator
20 
21 #ifndef ANIMATION_INTERFACE__H
22 #define ANIMATION_INTERFACE__H
23 
24 #include <string>
25 #include <cstdio>
26 #include <map>
27 #include "ns3/ptr.h"
28 #include "ns3/net-device.h"
29 #include "ns3/node-container.h"
30 #include "ns3/nstime.h"
31 #include "ns3/log.h"
32 #include "ns3/node-list.h"
33 #include "ns3/random-variable-stream.h"
34 #include "ns3/simulator.h"
35 #include "ns3/config.h"
36 #include "ns3/animation-interface-helper.h"
37 #include "ns3/mac48-address.h"
38 #include "ns3/lte-ue-net-device.h"
39 #include "ns3/lte-enb-net-device.h"
40 #include "ns3/uan-phy-gen.h"
41 #include "ns3/rectangle.h"
42 
43 namespace ns3 {
44 
45 #define MAX_PKTS_PER_TRACE_FILE 100000
46 struct Rgb;
47 typedef struct
48 {
49  uint32_t fromNode;
50  uint32_t toNode;
52 
53 typedef struct
54 {
55  std::string fromNodeDescription;
56  std::string toNodeDescription;
57  std::string linkDescription;
59 
61 {
63  {
64  //Check if they are the same node pairs but flipped
65  if ( ((first.fromNode == second.fromNode) && (first.toNode == second.toNode)) ||
66  ((first.fromNode == second.toNode) && (first.toNode == second.fromNode)) )
67  {
68  return false;
69  }
70  std::ostringstream oss1;
71  oss1 << first.fromNode << first.toNode;
72  std::ostringstream oss2;
73  oss2 << second.fromNode << second.toNode;
74  return oss1.str () < oss2.str ();
75  }
76 
77 };
78 
80  std::string destination;
81  uint32_t fromNodeId;
82 };
83 
84 
85 typedef struct {
86  uint32_t nodeId;
87  std::string nextHop;
88 
90 
106 {
107 public:
108 
119  AnimationInterface (const std::string filename,
120  uint64_t maxPktsPerFile = MAX_PKTS_PER_TRACE_FILE,
121  bool usingXML = true);
122 
128 
140  AnimationInterface & EnableIpv4RouteTracking (std::string fileName, Time startTime, Time stopTime, Time pollInterval = Seconds(5));
141 
154  AnimationInterface & EnableIpv4RouteTracking (std::string fileName, Time startTime, Time stopTime, NodeContainer nc, Time pollInterval = Seconds(5));
155 
161  static bool IsInitialized (void);
162 
170  void SetStartTime (Time t);
171 
179  void SetStopTime (Time t);
180 
189  void SetMobilityPollInterval (Time t);
190 
198  void SetRandomPosition (bool setRandPos);
199 
205  typedef void (*AnimWriteCallback) (const char * str);
206 
214 
219  void ResetAnimWriteCallback ();
220 
229  static void SetConstantPosition (Ptr <Node> n, double x, double y, double z=0);
230 
239  static void SetBoundary (double minX, double minY, double maxX, double maxY);
240 
247  static void SetNodeDescription (Ptr <Node> n, std::string descr);
248 
255  void UpdateNodeDescription (Ptr <Node> n, std::string descr);
256 
263  void UpdateNodeDescription (uint32_t nodeId, std::string descr);
264 
271  void ShowNode (uint32_t nodeId, bool show = true);
272 
279  void ShowNode (Ptr <Node> n, bool show = true);
280 
287  static void SetNodeDescription (NodeContainer nc, std::string descr);
288 
297  static void SetNodeColor (Ptr <Node> n, uint8_t r, uint8_t g, uint8_t b);
298 
299 
308  void UpdateNodeColor (Ptr <Node> n, uint8_t r, uint8_t g, uint8_t b);
309 
318  void UpdateNodeColor (uint32_t nodeId, uint8_t r, uint8_t g, uint8_t b);
319 
320 
329  static void SetNodeColor (NodeContainer nc, uint8_t r, uint8_t g, uint8_t b);
330 
340  static void SetLinkDescription (uint32_t fromNode, uint32_t toNode,
341  std::string linkDescription,
342  std::string fromNodeDescription = "",
343  std::string toNodeDescription = "");
344 
354  static void SetLinkDescription (Ptr <Node> fromNode, Ptr <Node> toNode,
355  std::string linkDescription,
356  std::string fromNodeDescription = "",
357  std::string toNodeDescription = "");
358 
359 
367  void UpdateLinkDescription (uint32_t fromNode, uint32_t toNode,
368  std::string linkDescription);
369 
377  void UpdateLinkDescription (Ptr <Node> fromNode, Ptr <Node> toNode,
378  std::string linkDescription);
379 
387  AnimationInterface & AddSourceDestination (uint32_t fromNodeId, std::string destinationIpv4Address);
388 
394  bool IsStarted (void);
395 
402  void EnablePacketMetadata (bool enable);
403 
411  uint64_t GetTracePktCount ();
412 
421  int64_t AssignStreams (int64_t stream);
422 
423 private:
424  FILE * m_f; // File handle for output (0 if none)
425  FILE * m_routingF; // File handle for routing table output (0 if None);
426  // Write specified amount of data to the specified handle
427  int WriteN (const char*, uint32_t, FILE * f);
428  bool m_xml; // True if xml format desired
430  std::string m_outputFileName;
432  uint64_t gAnimUid ; // Packet unique identifier used by Animtion
435  bool m_started;
440  std::string m_originalFileName;
442  std::string m_routingFileName;
445 
446  void TrackIpv4Route ();
447  void TrackIpv4RoutePaths ();
448  std::string GetIpv4RoutingTable (Ptr <Node> n);
449 
461  bool SetOutputFile (const std::string& fn);
462  bool SetRoutingOutputFile (const std::string& fn);
463 
471  void SetXMLOutput ();
472 
484  void StartAnimation (bool restart = false);
485 
490  void StopAnimation (bool onlyAnimation = false);
491 
492  void DevTxTrace (std::string context,
494  Ptr<NetDevice> tx,
495  Ptr<NetDevice> rx,
496  Time txTime,
497  Time rxTime);
498  void WifiPhyTxBeginTrace (std::string context,
500  void WifiPhyTxEndTrace (std::string context,
502  void WifiPhyTxDropTrace (std::string context,
504  void WifiPhyRxBeginTrace (std::string context,
506  void WifiPhyRxEndTrace (std::string context,
508  void WifiMacRxTrace (std::string context,
510  void WifiPhyRxDropTrace (std::string context,
512  void WimaxTxTrace (std::string context,
514  const Mac48Address &);
515  void WimaxRxTrace (std::string context,
517  const Mac48Address &);
518  void CsmaPhyTxBeginTrace (std::string context,
520  void CsmaPhyTxEndTrace (std::string context,
522  void CsmaPhyRxEndTrace (std::string context,
524  void CsmaMacRxTrace (std::string context,
526 
527  void LteTxTrace (std::string context,
529  const Mac48Address &);
530 
531  void LteRxTrace (std::string context,
533  const Mac48Address &);
534 
535  void LteSpectrumPhyTxStart (std::string context,
537  void LteSpectrumPhyRxStart (std::string context,
539 
540  void UanPhyGenTxTrace (std::string context,
542  void UanPhyGenRxTrace (std::string context,
544 
546 
547  // Write a string to the specified handle;
548  int WriteN (const std::string&, FILE * f);
549 
550  void OutputWirelessPacket (Ptr<const Packet> p, AnimPacketInfo& pktInfo, AnimRxInfo pktrxInfo);
551  void OutputCsmaPacket (Ptr<const Packet> p, AnimPacketInfo& pktInfo, AnimRxInfo pktrxInfo);
552  void MobilityAutoCheck ();
553 
554 
555  std::map<uint64_t, AnimPacketInfo> m_pendingWifiPackets;
556  void AddPendingWifiPacket (uint64_t AnimUid, AnimPacketInfo&);
557  bool WifiPacketIsPending (uint64_t AnimUid);
558 
559  std::map<uint64_t, AnimPacketInfo> m_pendingWimaxPackets;
560  void AddPendingWimaxPacket (uint64_t AnimUid, AnimPacketInfo&);
561  bool WimaxPacketIsPending (uint64_t AnimUid);
562 
563  std::map<uint64_t, AnimPacketInfo> m_pendingLtePackets;
564  void AddPendingLtePacket (uint64_t AnimUid, AnimPacketInfo&);
565  bool LtePacketIsPending (uint64_t AnimUid);
566 
567  std::map<uint64_t, AnimPacketInfo> m_pendingCsmaPackets;
568  void AddPendingCsmaPacket (uint64_t AnimUid, AnimPacketInfo&);
569  bool CsmaPacketIsPending (uint64_t AnimUid);
570 
571  std::map<uint64_t, AnimPacketInfo> m_pendingUanPackets;
572  void AddPendingUanPacket (uint64_t AnimUid, AnimPacketInfo&);
573  bool UanPacketIsPending (uint64_t AnimUid);
574 
576 
577  std::map<uint32_t, Vector> m_nodeLocation;
581  void WriteDummyPacket ();
582  bool NodeHasMoved (Ptr <Node> n, Vector newLocation);
583 
584  void PurgePendingWifi ();
585  void PurgePendingWimax ();
586  void PurgePendingLte ();
587  void PurgePendingCsma ();
588 
589  // Recalculate topology bounds
590  void RecalcTopoBounds (Vector v);
591  std::vector < Ptr <Node> > RecalcTopoBounds ();
592 
593  void ConnectCallbacks ();
594  void ConnectLte ();
595  void ConnectLteUe (Ptr <Node> n, Ptr <LteUeNetDevice> nd, uint32_t devIndex);
596  void ConnectLteEnb (Ptr <Node> n, Ptr <LteEnbNetDevice> nd, uint32_t devIndex);
597 
598 
599  std::map <std::string, uint32_t> m_macToNodeIdMap;
600  std::map <std::string, uint32_t> m_ipv4ToNodeIdMap;
601  void AddToIpv4AddressNodeIdTable (std::string, uint32_t);
602  std::vector <Ipv4RouteTrackElement> m_ipv4RouteTrackElements;
603  typedef std::vector <Ipv4RoutePathElement> Ipv4RoutePathElements;
604  void RecursiveIpv4RoutePathSearch (std::string fromIpv4, std::string toIpv4, Ipv4RoutePathElements &);
605  void WriteRoutePath (uint32_t nodeId, std::string destination, Ipv4RoutePathElements rpElements);
606  bool IsInTimeWindow ();
607 
608  // Path helper
609  std::vector<std::string> GetElementsFromContext (std::string context);
610  Ptr <NetDevice> GetNetDeviceFromContext (std::string context);
611 
612  static std::map <uint32_t, Rgb> nodeColors;
613  static std::map <uint32_t, std::string> nodeDescriptions;
614  static std::map <P2pLinkNodeIdPair, LinkProperties, LinkPairCompare> linkProperties;
616 
617  void StartNewTraceFile();
618 
619  std::string GetMacAddress (Ptr <NetDevice> nd);
620  std::string GetIpv4Address (Ptr <NetDevice> nd);
621  void WriteNonP2pLinkProperties (uint32_t id, std::string ipv4Address, std::string channelType);
622 
623  std::string GetNetAnimVersion ();
624 
625  // XML helpers
626  std::string GetPreamble (void);
627  // Topology element dimensions
628  double m_topoMinX;
629  double m_topoMinY;
630  double m_topoMaxX;
631  double m_topoMaxY;
633 
634  std::string GetPacketMetadata (Ptr<const Packet> p);
635 
636  std::string GetXMLOpen_anim (uint32_t lp);
637  std::string GetXMLOpen_topology (double minX, double minY, double maxX, double maxY);
638  std::string GetXMLOpenClose_node (uint32_t lp, uint32_t id, double locX, double locY);
639  std::string GetXMLOpenClose_node (uint32_t lp, uint32_t id, double locX, double locY, struct Rgb rgb);
640  std::string GetXMLOpenClose_nodeupdate (uint32_t id, bool visible = true);
641  std::string GetXMLOpenClose_link (uint32_t fromLp, uint32_t fromId, uint32_t toLp, uint32_t toId);
642  std::string GetXMLOpenClose_linkupdate (uint32_t fromId, uint32_t toId, std::string);
643  std::string GetXMLOpen_packet (uint32_t fromLp, uint32_t fromId, double fbTx, double lbTx, std::string auxInfo = "");
644  std::string GetXMLOpenClose_p (std::string pktType, uint32_t fId, double fbTx, double lbTx, uint32_t tId, double fbRx, double lbRx,
645  std::string metaInfo = "", std::string auxInfo = "");
646  std::string GetXMLOpenClose_rx (uint32_t toLp, uint32_t toId, double fbRx, double lbRx);
647  std::string GetXMLOpen_wpacket (uint32_t fromLp, uint32_t fromId, double fbTx, double lbTx, double range);
648  std::string GetXMLClose (std::string name) {return "</" + name + ">\n"; }
649  std::string GetXMLOpenClose_meta (std::string metaInfo);
650  std::string GetXMLOpenClose_NonP2pLinkProperties (uint32_t id, std::string ipv4Address, std::string channelType);
651  std::string GetXMLOpenClose_routing (uint32_t id, std::string routingInfo);
652  std::string GetXMLOpenClose_rp (uint32_t nodeId, std::string destination, Ipv4RoutePathElements rpElements);
653 
654 
655 
658 };
659 
665 struct Rgb
666 {
667  uint8_t r;
668  uint8_t g;
669  uint8_t b;
670 };
671 
683 class AnimByteTag : public Tag
684 {
685 public:
686 
692  static TypeId GetTypeId (void);
693 
699  virtual TypeId GetInstanceTypeId (void) const;
700 
706  virtual uint32_t GetSerializedSize (void) const;
707 
713  virtual void Serialize (TagBuffer i) const;
714 
720  virtual void Deserialize (TagBuffer i);
721 
727  virtual void Print (std::ostream &os) const;
728 
734  void Set (uint64_t AnimUid);
735 
741  uint64_t Get (void) const;
742 
743 private:
744  uint64_t m_AnimUid;
745 };
746 
747 }
748 #endif
749 
uint64_t GetAnimUidFromPacket(Ptr< const Packet >)
void Set(uint64_t AnimUid)
Set global Uid in tag.
std::string GetXMLOpenClose_nodeupdate(uint32_t id, bool visible=true)
uint64_t GetTracePktCount()
Get trace file packet count (This used only for testing)
void AddToIpv4AddressNodeIdTable(std::string, uint32_t)
bool WifiPacketIsPending(uint64_t AnimUid)
void CsmaMacRxTrace(std::string context, Ptr< const Packet > p)
keep track of time values and allow control of global simulation resolution
Definition: nstime.h:81
std::vector< std::string > GetElementsFromContext(std::string context)
std::string GetXMLOpen_anim(uint32_t lp)
bool CsmaPacketIsPending(uint64_t AnimUid)
std::vector< Ptr< Node > > RecalcTopoBounds()
void AddPendingWifiPacket(uint64_t AnimUid, AnimPacketInfo &)
bool LtePacketIsPending(uint64_t AnimUid)
std::string GetIpv4Address(Ptr< NetDevice > nd)
AnimationInterface & AddSourceDestination(uint32_t fromNodeId, std::string destinationIpv4Address)
Helper function to print the routing path from a source node to destination IP.
AnimRxInfo helper class.
void EnablePacketMetadata(bool enable)
Enable Packet metadata.
static TypeId GetTypeId(void)
Get Type Id.
std::string GetXMLOpenClose_NonP2pLinkProperties(uint32_t id, std::string ipv4Address, std::string channelType)
void CsmaPhyTxBeginTrace(std::string context, Ptr< const Packet > p)
static void SetNodeColor(Ptr< Node > n, uint8_t r, uint8_t g, uint8_t b)
Helper function to set the node color.
static bool IsInitialized(void)
Check if AnimationInterface is initialized.
std::string GetXMLClose(std::string name)
void WifiMacRxTrace(std::string context, Ptr< const Packet > p)
void OutputCsmaPacket(Ptr< const Packet > p, AnimPacketInfo &pktInfo, AnimRxInfo pktrxInfo)
std::map< std::string, uint32_t > m_macToNodeIdMap
void LteSpectrumPhyRxStart(std::string context, Ptr< const PacketBurst > pb)
Ptr< NetDevice > GetNetDeviceFromContext(std::string context)
void WifiPhyTxBeginTrace(std::string context, Ptr< const Packet > p)
std::map< uint64_t, AnimPacketInfo > m_pendingWimaxPackets
bool SetRoutingOutputFile(const std::string &fn)
std::string GetXMLOpenClose_rx(uint32_t toLp, uint32_t toId, double fbRx, double lbRx)
void LteTxTrace(std::string context, Ptr< const Packet > p, const Mac48Address &)
void WimaxRxTrace(std::string context, Ptr< const Packet > p, const Mac48Address &)
std::map< std::string, uint32_t > m_ipv4ToNodeIdMap
void RecursiveIpv4RoutePathSearch(std::string fromIpv4, std::string toIpv4, Ipv4RoutePathElements &)
virtual void Deserialize(TagBuffer i)
Deserialize function.
void ConnectLteEnb(Ptr< Node > n, Ptr< LteEnbNetDevice > nd, uint32_t devIndex)
std::string GetIpv4RoutingTable(Ptr< Node > n)
void SetStartTime(Time t)
Specify the time at which capture should start.
void SetStopTime(Time t)
Specify the time at which capture should stop.
a 3d vector
Definition: vector.h:31
void WifiPhyRxBeginTrace(std::string context, Ptr< const Packet > p)
void UpdateNodeColor(Ptr< Node > n, uint8_t r, uint8_t g, uint8_t b)
Helper function to update the node color.
double stopTime
void ResetAnimWriteCallback()
Reset the write callback function.
std::string GetXMLOpenClose_node(uint32_t lp, uint32_t id, double locX, double locY)
AnimWriteCallback m_writeCallback
void WifiPhyRxDropTrace(std::string context, Ptr< const Packet > p)
void UanPhyGenTxTrace(std::string context, Ptr< const Packet >)
static void SetConstantPosition(Ptr< Node > n, double x, double y, double z=0)
Helper function to set Constant Position for a given node.
void ConnectLteUe(Ptr< Node > n, Ptr< LteUeNetDevice > nd, uint32_t devIndex)
std::map< uint32_t, Vector > m_nodeLocation
virtual void Print(std::ostream &os) const
Print tag info.
static void SetLinkDescription(uint32_t fromNode, uint32_t toNode, std::string linkDescription, std::string fromNodeDescription="", std::string toNodeDescription="")
Helper function to set the description for a link.
static void SetBoundary(double minX, double minY, double maxX, double maxY)
Helper function to set the topology boundary rectangle.
void SetXMLOutput()
Specify that animation commands are to be written in XML format.
std::string GetXMLOpen_packet(uint32_t fromLp, uint32_t fromId, double fbTx, double lbTx, std::string auxInfo="")
void CsmaPhyRxEndTrace(std::string context, Ptr< const Packet > p)
std::string GetXMLOpenClose_p(std::string pktType, uint32_t fId, double fbTx, double lbTx, uint32_t tId, double fbRx, double lbRx, std::string metaInfo="", std::string auxInfo="")
void SetRandomPosition(bool setRandPos)
Set random position if a Mobility Model does not exists for the node.
~AnimationInterface()
Destructor for the animator interface.
double startTime
Ptr< UniformRandomVariable > m_uniformRandomVariable
Provides uniform random variables.
static void SetNodeDescription(Ptr< Node > n, std::string descr)
Helper function to set a brief description for a given node.
void UanPhyGenRxTrace(std::string context, Ptr< const Packet >)
std::map< uint64_t, AnimPacketInfo > m_pendingLtePackets
void StartAnimation(bool restart=false)
Writes the topology information and sets up the appropriate animation packet tx callback.
int64_t AssignStreams(int64_t stream)
std::vector< Ipv4RoutePathElement > Ipv4RoutePathElements
AnimationInterface & EnableIpv4RouteTracking(std::string fileName, Time startTime, Time stopTime, Time pollInterval=Seconds(5))
Enable tracking of the Ipv4 routing table for all Nodes.
void OutputWirelessPacket(Ptr< const Packet > p, AnimPacketInfo &pktInfo, AnimRxInfo pktrxInfo)
static std::map< uint32_t, Rgb > nodeColors
void WifiPhyTxDropTrace(std::string context, Ptr< const Packet > p)
std::map< uint64_t, AnimPacketInfo > m_pendingCsmaPackets
void CsmaPhyTxEndTrace(std::string context, Ptr< const Packet > p)
std::string GetPacketMetadata(Ptr< const Packet > p)
std::string GetXMLOpen_wpacket(uint32_t fromLp, uint32_t fromId, double fbTx, double lbTx, double range)
int WriteN(const char *, uint32_t, FILE *f)
void DevTxTrace(std::string context, Ptr< const Packet > p, Ptr< NetDevice > tx, Ptr< NetDevice > rx, Time txTime, Time rxTime)
tag a set of bytes in a packet
Definition: tag.h:36
void AddPendingUanPacket(uint64_t AnimUid, AnimPacketInfo &)
keep track of a set of node pointers.
void UpdateLinkDescription(uint32_t fromNode, uint32_t toNode, std::string linkDescription)
Helper function to update the description for a link.
void AddPendingWimaxPacket(uint64_t AnimUid, AnimPacketInfo &)
bool NodeHasMoved(Ptr< Node > n, Vector newLocation)
static Rectangle * userBoundary
an EUI-48 address
Definition: mac48-address.h:41
virtual void Serialize(TagBuffer i) const
Serialize function.
bool UanPacketIsPending(uint64_t AnimUid)
bool SetOutputFile(const std::string &fn)
Specify that animation commands are to be written to the specified output file.
Byte tag using by Anim to uniquely identify packets.
virtual TypeId GetInstanceTypeId(void) const
Get Instance Type Id.
void StopAnimation(bool onlyAnimation=false)
Closes the interface to the animator.
Vector UpdatePosition(Ptr< Node > n)
uint64_t Get(void) const
Get Uid in tag.
std::vector< Ipv4RouteTrackElement > m_ipv4RouteTrackElements
void MobilityCourseChangeTrace(Ptr< const MobilityModel > mob)
read and write tag data
Definition: tag-buffer.h:51
std::map< uint64_t, AnimPacketInfo > m_pendingWifiPackets
std::map< uint64_t, AnimPacketInfo > m_pendingUanPackets
std::string GetXMLOpenClose_linkupdate(uint32_t fromId, uint32_t toId, std::string)
std::string GetXMLOpenClose_routing(uint32_t id, std::string routingInfo)
std::string GetMacAddress(Ptr< NetDevice > nd)
#define MAX_PKTS_PER_TRACE_FILE
AnimationInterface(const std::string filename, uint64_t maxPktsPerFile=MAX_PKTS_PER_TRACE_FILE, bool usingXML=true)
Constructor.
std::string GetXMLOpenClose_rp(uint32_t nodeId, std::string destination, Ipv4RoutePathElements rpElements)
void WifiPhyTxEndTrace(std::string context, Ptr< const Packet > p)
virtual uint32_t GetSerializedSize(void) const
Get Serialized Size.
Interface to network animator.
void WriteNonP2pLinkProperties(uint32_t id, std::string ipv4Address, std::string channelType)
void WifiPhyRxEndTrace(std::string context, Ptr< const Packet > p)
static std::map< P2pLinkNodeIdPair, LinkProperties, LinkPairCompare > linkProperties
void SetAnimWriteCallback(AnimWriteCallback cb)
Set a callback function to listen to AnimationInterface write events.
void SetMobilityPollInterval(Time t)
Set mobility poll interval:WARNING: setting a low interval can cause slowness.
void AddPendingLtePacket(uint64_t AnimUid, AnimPacketInfo &)
void AddPendingCsmaPacket(uint64_t AnimUid, AnimPacketInfo &)
void WriteRoutePath(uint32_t nodeId, std::string destination, Ipv4RoutePathElements rpElements)
A structure to store red, blue and green components for entities such as nodes.
std::string GetXMLOpenClose_meta(std::string metaInfo)
void ShowNode(uint32_t nodeId, bool show=true)
Helper function to show/hide a node.
bool IsStarted(void)
Is AnimationInterface started.
bool WimaxPacketIsPending(uint64_t AnimUid)
Vector GetPosition(Ptr< Node > n)
a unique identifier for an interface.
Definition: type-id.h:49
static std::map< uint32_t, std::string > nodeDescriptions
a 2d rectangle
Definition: rectangle.h:33
std::string GetXMLOpenClose_link(uint32_t fromLp, uint32_t fromId, uint32_t toLp, uint32_t toId)
std::string GetXMLOpen_topology(double minX, double minY, double maxX, double maxY)
void(* AnimWriteCallback)(const char *str)
typedef for WriteCallBack used for listening to AnimationInterface write messages ...
void LteRxTrace(std::string context, Ptr< const Packet > p, const Mac48Address &)
void UpdateNodeDescription(Ptr< Node > n, std::string descr)
Helper function to update the description for a given node.
void LteSpectrumPhyTxStart(std::string context, Ptr< const PacketBurst > pb)
void WimaxTxTrace(std::string context, Ptr< const Packet > p, const Mac48Address &)
AnimPacketInfo helper class.