core: Add CommandLine to some examples
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
|
||||
#include "ns3/callback.h"
|
||||
#include "ns3/assert.h"
|
||||
#include "ns3/command-line.h"
|
||||
#include <iostream>
|
||||
|
||||
/**
|
||||
@@ -68,6 +69,9 @@ public:
|
||||
|
||||
int main (int argc, char *argv[])
|
||||
{
|
||||
CommandLine cmd;
|
||||
cmd.Parse(argc, argv);
|
||||
|
||||
// return type: double
|
||||
// first arg type: double
|
||||
// second arg type: double
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
#include "ns3/ptr.h"
|
||||
#include "ns3/object.h"
|
||||
#include "ns3/command-line.h"
|
||||
#include <iostream>
|
||||
|
||||
/**
|
||||
@@ -92,6 +93,9 @@ ClearPtr (void)
|
||||
|
||||
int main (int argc, char *argv[])
|
||||
{
|
||||
CommandLine cmd;
|
||||
cmd.Parse(argc, argv);
|
||||
|
||||
{
|
||||
// Create a new object of type PtrExample, store it in global
|
||||
// variable g_ptr
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "ns3/string.h"
|
||||
#include "ns3/integer.h"
|
||||
#include "ns3/gnuplot.h"
|
||||
#include "ns3/command-line.h"
|
||||
#include <map>
|
||||
#include <cmath>
|
||||
|
||||
@@ -102,6 +103,9 @@ Histogram (Ptr<RandomVariableStream> rndvar,
|
||||
|
||||
int main (int argc, char *argv[])
|
||||
{
|
||||
CommandLine cmd;
|
||||
cmd.Parse(argc, argv);
|
||||
|
||||
unsigned int probes = 1000000;
|
||||
double precision = 0.01;
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "ns3/string.h"
|
||||
#include "ns3/integer.h"
|
||||
#include "ns3/gnuplot.h"
|
||||
#include "ns3/command-line.h"
|
||||
#include <map>
|
||||
#include <cmath>
|
||||
|
||||
@@ -102,6 +103,9 @@ Histogram (Ptr<RandomVariableStream> rndvar,
|
||||
|
||||
int main (int argc, char *argv[])
|
||||
{
|
||||
CommandLine cmd;
|
||||
cmd.Parse(argc, argv);
|
||||
|
||||
unsigned int probes = 1000000;
|
||||
double precision = 0.01;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user