save the global node list
This commit is contained in:
@@ -138,7 +138,11 @@ MultithreadedSimulatorImpl::ScheduleWithContext(uint32_t context,
|
||||
EventImpl* event)
|
||||
{
|
||||
NS_LOG_FUNCTION(this << context << delay.GetTimeStep() << event);
|
||||
LogicalProcess* remote = MtpInterface::GetSystem(NodeList::GetNode(context)->GetSystemId());
|
||||
if (m_savedNodeList.GetN() <= context)
|
||||
{
|
||||
m_savedNodeList = NodeContainer::GetGlobal();
|
||||
}
|
||||
LogicalProcess* remote = MtpInterface::GetSystem(m_savedNodeList.Get(context)->GetSystemId());
|
||||
MtpInterface::GetSystem()->ScheduleWithContext(remote, context, delay, event);
|
||||
}
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "ns3/nstime.h"
|
||||
#include "ns3/object-factory.h"
|
||||
#include "ns3/simulator-impl.h"
|
||||
#include "ns3/node-container.h"
|
||||
|
||||
#include <list>
|
||||
|
||||
@@ -94,6 +95,7 @@ class MultithreadedSimulatorImpl : public SimulatorImpl
|
||||
Time m_minLookahead;
|
||||
TypeId m_schedulerTypeId;
|
||||
std::list<EventId> m_destroyEvents;
|
||||
NodeContainer m_savedNodeList;
|
||||
};
|
||||
|
||||
} // namespace ns3
|
||||
|
||||
Reference in New Issue
Block a user