21 #ifndef IPV4_RATE_L3_TRACER_H
22 #define IPV4_RATE_L3_TRACER_H
24 #include "ipv4-l3-tracer.h"
26 #include "ns3/nstime.h"
27 #include "ns3/event-id.h"
28 #include "ns3/node-container.h"
30 #include <boost/tuple/tuple.hpp>
31 #include <boost/shared_ptr.hpp>
60 static boost::tuple< boost::shared_ptr<std::ostream>, std::list<Ptr<Ipv4RateL3Tracer> > >
61 InstallAll (
const std::string &file, Time averagingPeriod = Seconds (0.5));
74 static boost::tuple< boost::shared_ptr<std::ostream>, std::list<Ptr<Ipv4RateL3Tracer> > >
75 Install (
const NodeContainer &nodes,
const std::string &file, Time averagingPeriod = Seconds (0.5));
88 static boost::tuple< boost::shared_ptr<std::ostream>, std::list<Ptr<Ipv4RateL3Tracer> > >
89 Install (Ptr<Node> node,
const std::string &file, Time averagingPeriod = Seconds (0.5));
101 static Ptr<Ipv4RateL3Tracer>
102 Install (Ptr<Node> node, boost::shared_ptr<std::ostream> outputStream, Time averagingPeriod = Seconds (0.5));
105 SetAveragingPeriod (
const Time &period);
108 PrintHeader (std::ostream &os)
const;
111 Print (std::ostream &os)
const;
114 Rx (Ptr<const Packet>, Ptr<Ipv4>, uint32_t);
117 Tx (Ptr<const Packet>, Ptr<Ipv4>, uint32_t);
120 Drop (
const Ipv4Header &, Ptr<const Packet>, Ipv4L3Protocol::DropReason, Ptr<Ipv4>, uint32_t);
130 boost::shared_ptr<std::ostream> m_os;
132 EventId m_printEvent;
134 mutable std::map<uint32_t, boost::tuple<Stats, Stats, Stats, Stats> > m_stats;
139 #endif // IPV4_RATE_L3_TRACER_H
static boost::tuple< boost::shared_ptr< std::ostream >, std::list< Ptr< Ipv4RateL3Tracer > > > Install(const NodeContainer &nodes, const std::string &file, Time averagingPeriod=Seconds(0.5))
Helper method to install tracers on the selected simulation nodes.
static boost::tuple< boost::shared_ptr< std::ostream >, std::list< Ptr< Ipv4RateL3Tracer > > > InstallAll(const std::string &file, Time averagingPeriod=Seconds(0.5))
Helper method to install tracers on all simulation nodes.
Base class for IPv4 network-layer tracers.
Ipv4RateL3Tracer(boost::shared_ptr< std::ostream > os, Ptr< Node > node)
Network layer tracer constructor.
IPv4 network-layer rate tracer.