21 #include "flow-monitor-helper.h"
23 #include "ns3/flow-monitor.h"
24 #include "ns3/ipv4-flow-classifier.h"
25 #include "ns3/ipv4-flow-probe.h"
26 #include "ns3/ipv4-l3-protocol.h"
28 #include "ns3/node-list.h"
35 m_monitorFactory.
SetTypeId (
"ns3::FlowMonitor");
42 m_flowMonitor->Dispose ();
51 m_monitorFactory.
Set (n1, v1);
61 m_flowClassifier = Create<Ipv4FlowClassifier> ();
62 m_flowMonitor->SetFlowClassifier (m_flowClassifier);
71 if (!m_flowClassifier)
73 m_flowClassifier = Create<Ipv4FlowClassifier> ();
75 return m_flowClassifier;
85 DynamicCast<Ipv4FlowClassifier> (classifier),
94 for (NodeContainer::Iterator i = nodes.
Begin (); i != nodes.
End (); ++i)
102 return m_flowMonitor;
116 return m_flowMonitor;
smart pointer class similar to boost::intrusive_ptr
Hold a value for an Attribute.
void SetTypeId(TypeId tid)
Iterator End(void) const
Get an iterator which indicates past-the-last Node in the container.
Ptr< FlowMonitor > GetMonitor()
Retrieve the FlowMonitor object created by the Install* methods.
Ptr< FlowMonitor > Install(NodeContainer nodes)
Enable flow monitoring on a set of nodes.
Ptr< Object > Create(void) const
static Iterator End(void)
Ptr< FlowMonitor > InstallAll()
Enable flow monitoring on all nodes.
void SetMonitorAttribute(std::string n1, const AttributeValue &v1)
Set an attribute for the to-be-created FlowMonitor object.
Ptr< FlowClassifier > GetClassifier()
Retrieve the FlowClassifier object created by the Install* methods.
Implement the Ipv4 layer.
keep track of a set of node pointers.
Iterator Begin(void) const
Get an iterator which refers to the first Node in the container.
void Set(std::string name, const AttributeValue &value)
FlowMonitorHelper()
Construct a FlowMonitorHelper class which makes it easier to configure and use the FlowMonitor...
~FlowMonitorHelper()
Dispose of objects allocated by the helper.
static Iterator Begin(void)
Ptr< T > GetObject(void) const
An object that monitors and reports back packet flows observed during a simulation.