7#include "ns3/command-line.h"
9#include "ns3/global-value.h"
11#include "ns3/nstime.h"
13#include "ns3/realtime-simulator-impl.h"
14#include "ns3/simulator.h"
15#include "ns3/string.h"
37bool gFirstRun =
false;
73FakeNetDevice::FakeNetDevice()
82 std::this_thread::sleep_for(std::chrono::seconds(1));
92 std::this_thread::sleep_for(std::chrono::milliseconds(1));
120 for (
double d = 0.; d < 14.999; d += 0.01)
125 std::thread st3 = std::thread(&FakeNetDevice::Doit3, &fnd);
141main(
int argc,
char* argv[])
144 cmd.Parse(argc, argv);
Parse command-line arguments.
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 EventId Schedule(const Time &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
static void Destroy()
Execute the events scheduled with ScheduleDestroy().
static void ScheduleWithContext(uint32_t context, const Time &delay, FUNC f, Ts &&... args)
Schedule an event with the given context.
static Time Now()
Return the current simulation virtual time.
static void Run()
Run the simulation.
@ NO_CONTEXT
Flag for events not associated with any particular context.
static void Stop()
Tell the Simulator the calling event should be the last one executed.
Hold variables of type string.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
std::enable_if_t< std::is_member_pointer_v< MEM >, EventImpl * > MakeEvent(MEM mem_ptr, OBJ obj, Ts... args)
Make an EventImpl from class method members which take varying numbers of arguments.
#define NS_LOG_UNCOND(msg)
Output the requested message unconditionally.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function.
Time Seconds(double value)
Construct a Time in the indicated unit.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
-ns3 Test suite for the ns3 wrapper script