using flowmonitor with nodes created during simulation

54 views
Skip to first unread message

Amel Ltifi

unread,
Mar 31, 2014, 11:52:39 AM3/31/14
to ns-3-...@googlegroups.com
Hi all,
I'm working on vanet simulation with ns3. the nodes are created one by
one during the simulation.
my question is how can I use flowmonitor in this case? in all examples
that I found, nodes are created before simulation.

Konstantinos

unread,
Mar 31, 2014, 2:58:19 PM3/31/14
to ns-3-...@googlegroups.com
Have you tried to install FlowMonitor on that node when it is created? Actually after the internet stack is installed on it, otherwise it will complain
FlowMonitorHelper has a method Install(Ptr<Node> node) which installs flowmonitor to the specified node. 
You may need to either pass the FlowMonitorHelper reference in that class that creates the node, or use a callback and get informed when a node is created so that you can install the flowmonitor in the main script.

Tommaso Pecorella

unread,
Mar 31, 2014, 3:22:09 PM3/31/14
to ns-3-...@googlegroups.com
Hi,


On Monday, March 31, 2014 5:52:39 PM UTC+2, amel wrote:
Hi all,
I'm working on vanet simulation with ns3. the nodes are created one by
one during the simulation.

Sorry, but I don't believe it. I mean, in ns-3 nodes must be created before the call to Simulation::Run().
If you try to create them "dynamically" during the simulation, you'll face a countless number of problems, mainly related to the configuration storage, probes, traces, and so on.

Basically, creating nodes on the fly is not supported.
 
my question is how can I use flowmonitor in this case? in all examples
that I found, nodes are created before simulation.

That's because this case shouldn't exist...

Cheers,

T.
 
Reply all
Reply to author
Forward
0 new messages