31 #include <ns3/global-value.h>
33 #include <ns3/string.h>
92 bool useDefault =
true;
96 std::string simulationType = simulationTypeValue.
Get();
100 if (simulationType ==
"ns3::NullMessageSimulatorImpl")
105 else if (simulationType ==
"ns3::DistributedSimulatorImpl")
118 NS_LOG_WARN(
"SimulatorImplementationType was set to non-parallel simulator; setting type "
119 "to ns3::DistributedSimulatorImp");
static void Bind(std::string name, const AttributeValue &value)
Iterate over the set of GlobalValues until a matching name is found and then set its value with Globa...
static bool GetValueByNameFailSafe(std::string name, AttributeValue &value)
Finds the GlobalValue with the given name and returns its value.
Interface between ns-3 and MPI.
static ParallelCommunicationInterface * g_parallelCommunicationInterface
Static instance of the instantiated parallel controller.
static MPI_Comm GetCommunicator()
Return the communicator used to run ns-3.
static void SendPacket(Ptr< Packet > p, const Time &rxTime, uint32_t node, uint32_t dev)
Send a packet to a remote node.
static bool IsEnabled()
Returns enabled state of parallel environment.
static void Destroy()
Deletes storage used by the parallel environment.
static uint32_t GetSystemId()
Get the id number of this rank.
static uint32_t GetSize()
Get the number of ranks used by ns-3.
static void Disable()
Clean up the ns-3 parallel communications interface.
static void Enable(int *pargc, char ***pargv)
Setup the parallel communication interface.
static void SetParallelSimulatorImpl()
Common enable logic.
Interface between ns-3 and MPI for the Null Message distributed simulation implementation.
virtual void SendPacket(Ptr< Packet > p, const Time &rxTime, uint32_t node, uint32_t dev)=0
Send a packet to a remote node.
virtual void Enable(int *pargc, char ***pargv)=0
Setup the parallel communication interface.
virtual bool IsEnabled()=0
Returns enabled state of parallel environment.
virtual MPI_Comm GetCommunicator()=0
Return the communicator used to run ns-3.
virtual uint32_t GetSystemId()=0
Get the id number of this rank.
virtual void Destroy()=0
Deletes storage used by the parallel environment.
virtual uint32_t GetSize()=0
Get the number of ranks used by ns-3.
virtual void Disable()=0
Clean up the ns-3 parallel communications interface.
Hold variables of type string.
Simulation virtual time values and global simulation resolution.
Declaration of classes ns3::SentBuffer and ns3::GrantedTimeWindowMpiInterface.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_WARN(msg)
Use NS_LOG to output a message of level LOG_WARN.
Declaration of class ns3::MpiInterface.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Declaration of classes ns3::NullMessageSentBuffer and ns3::NullMessageMpiInterface.