[ndnSIM] when is a node‘s aggregated object being initialized?
yao930 at mail.ustc.edu.cn
yao930 at mail.ustc.edu.cn
Sun Apr 21 00:04:30 PDT 2019
I notice that in ndnSIM2.7, source code ndn-stack-helper.cpp, the implementation of Install() is different from that of ndnSIM2.6.
In ndnSIM2.7, a DoInstall() is called by Simulator::SchedulerWithContext(), which does the same thing as Install() function in ndnSIM2.6. And ProcessWarmupEvents() runs Simulator::Run(). What's the difference between here and the example file's Simulator::Run()?
Since Simulator::Run() in function ProcessWarmupEvents() invokes Node::DoInitialize(), I wonder if that might be the reason traffic-control-layer cannot be initialized correctly, because it's aggregated to a node after the node's DoInitialize() is called.
At2019-04-21 10:42:33,yao930 at mail.ustc.edu.cnwrote:
Hello all,
I am doing experiment with ndnSIM2.7, and I want to use traffic control model in ns-3 to help realize queue scheduling.
I tried to aggregate a traffic-control-layer model on a node by modifying ndn-stack-helper.cc DoInstall() like this:
ObjectFactory factory;
factory.SetTypeId ("ns3::TrafficControlLayer");
Ptr<Object> protocol = factory.Create <Object> ();
node->AggregateObject (protocol);
which is similar to add a L3Protocol like this: node->AggregateObject(ndn)
But the traffic-control cannot start correctly, and later a SIGSEV error appeared.
From logs I can't see traffic-control-layer's DoInitialize() being called, so I think that might be the reason of the error.
After reading some documents and source code, now I understand the relationship between the function Initialize() and DoInitialize(), and Object and it's subclasses. Since ndnSIM simply starts the simulation like: Simulator::Run(), I am confused about when is all those Initialize work being done before starting simulation?
Any hints would be really appreciated!
Thanks advance~
Sincerely,
Chris Chen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20190421/d9e77ab4/attachment.html>
More information about the ndnSIM
mailing list