diff -r 7d43ccc63a96 -r ccd721b6a755 src/netanim/model/animation-interface.h --- a/src/netanim/model/animation-interface.h Sun Mar 18 20:43:18 2012 +0100 +++ b/src/netanim/model/animation-interface.h Mon Mar 19 13:20:16 2012 -0700 @@ -225,6 +225,14 @@ */ void ShowAll802_11 (bool showAll); + /** + * + * \brief Enable Packet metadata + * \param enable if true enables writing the packet metadata to the XML trace file + * if false disables writing the packet metadata + */ + void EnablePacketMetadata (bool enable); + private: #ifndef WIN32 int m_fHandle; // File handle for output (-1 if none) @@ -289,8 +297,8 @@ // Write a string to the specified handle; int WriteN (int, const std::string&); - void OutputWirelessPacket (AnimPacketInfo& pktInfo, AnimRxInfo pktrxInfo); - void OutputCsmaPacket (AnimPacketInfo& pktInfo, AnimRxInfo pktrxInfo); + void OutputWirelessPacket (Ptr p, AnimPacketInfo& pktInfo, AnimRxInfo pktrxInfo); + void OutputCsmaPacket (Ptr p, AnimPacketInfo& pktInfo, AnimRxInfo pktrxInfo); void MobilityAutoCheck (); uint64_t gAnimUid ; // Packet unique identifier used by Animtion @@ -336,6 +344,7 @@ bool m_started; bool m_enforceWifiMacRx; + bool m_enablePacketMetadata; // Path helper std::vector GetElementsFromContext (std::string context); @@ -349,6 +358,8 @@ double topo_maxX; double topo_maxY; + std::string GetPacketMetadata (Ptr p); + std::string GetXMLOpen_anim (uint32_t lp); std::string GetXMLOpen_topology (double minX,double minY,double maxX,double maxY); std::string GetXMLOpenClose_node (uint32_t lp,uint32_t id,double locX,double locY); @@ -357,6 +368,7 @@ std::string GetXMLOpenClose_rx (uint32_t toLp, uint32_t toId, double fbRx, double lbRx); std::string GetXMLOpen_wpacket (uint32_t fromLp,uint32_t fromId, double fbTx, double lbTx, double range); std::string GetXMLClose (std::string name) {return "\n"; } + std::string GetXMLOpenClose_meta (std::string metaInfo); };