[Ns-developers] Internal Time Keeping Question

Hagen Paul Pfeifer hagen at jauu.net
Mon Jul 21 16:03:08 PDT 2008


OK, the time synchronization is implemented in a similar way to GTNetS.

Mathieu: one question regards Packet mutliplexing at Channel level. If you
consider e.g. the point to point channel. Simulator::Schedule schedules the
Packet "p" for time "txTime + m_delay", at class "m_link[wire].m_dst" and
method "&PointToPointNetDevice::Receive". The question that arise is that the
peer federate (the other psysical ns-3 instance) does not share the memory.

Currently:
Simulator::Schedule (txTime + m_delay, &PointToPointNetDevice::Receive, m_link[wire].m_dst, p);

Better for me would something like:
Simulator::Schedule (txTime + m_delay, &PointToPointNetDevice::Receive, m_link[wire].m_dst.getID(), p);

Where m_link[wire].m_dst.getID() would be unique across the whole scenario.

This mean "m_link[wire].m_dst" (of type Ptr<PointToPointNetDevice>) does not
exist on the other instance. There are several workarounds but neither is
optimal: the one will consume memory (cause every instance will allocate and
set-up infrastructure for the whole simulated topology, furthermore the
multiplexing logic must decide based on an unique ID what is the correct
destination device (maybe a hashmap of all devices with a unique device ID
might be sufficient).

@George: should I adopt the concept of Ghost in this scenario? Build a
lightweight infrastructure based on federate information? This will lead to
huge infrastructure changes in ns-3, as far as I can estimate.


Hagen


PS: I added some text to the wiki on how to compile and run the parallelized branch



More information about the Ns-developers mailing list