A Discrete-Event Network Simulator
API
create-module Namespace Reference

Functions

def create_argument_parser ()
 
def create_file (path, template, **kwargs)
 
def make_cmakelists (moduledir, modname)
 
def make_doc (moduledir, modname)
 
def make_examples (moduledir, modname)
 
def make_helper (moduledir, modname)
 
def make_model (moduledir, modname)
 
def make_module (modpath, modname)
 
def make_test (moduledir, modname)
 

Variables

string CMAKELISTS_TEMPLATE
 
string DOC_RST_TEMPLATE
 
string EXAMPLE_CC_TEMPLATE
 
string EXAMPLES_CMAKELISTS_TEMPLATE
 
 file
 
string HELPER_CC_TEMPLATE
 
string HELPER_H_TEMPLATE
 
string MODEL_CC_TEMPLATE
 
string MODEL_H_TEMPLATE
 
int return_value = 0
 
string TEST_CC_TEMPLATE
 

Function Documentation

◆ create_argument_parser()

def create-module.create_argument_parser ( )

Definition at line 414 of file create-module.py.

References create_argument_parser(), and make_module().

Referenced by create_argument_parser().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ create_file()

def create-module.create_file (   path,
  template,
**  kwargs 
)

Definition at line 297 of file create-module.py.

Referenced by make_cmakelists(), make_doc(), make_examples(), make_helper(), make_model(), and make_test().

+ Here is the caller graph for this function:

◆ make_cmakelists()

def create-module.make_cmakelists (   moduledir,
  modname 
)

Definition at line 305 of file create-module.py.

References create_file().

+ Here is the call graph for this function:

◆ make_doc()

def create-module.make_doc (   moduledir,
  modname 
)

Definition at line 369 of file create-module.py.

References create_file().

+ Here is the call graph for this function:

◆ make_examples()

def create-module.make_examples (   moduledir,
  modname 
)

Definition at line 356 of file create-module.py.

References create_file().

+ Here is the call graph for this function:

◆ make_helper()

def create-module.make_helper (   moduledir,
  modname 
)

Definition at line 342 of file create-module.py.

References create_file().

+ Here is the call graph for this function:

◆ make_model()

def create-module.make_model (   moduledir,
  modname 
)

Definition at line 313 of file create-module.py.

References create_file().

+ Here is the call graph for this function:

◆ make_module()

def create-module.make_module (   modpath,
  modname 
)

Definition at line 384 of file create-module.py.

Referenced by create_argument_parser().

+ Here is the caller graph for this function:

◆ make_test()

def create-module.make_test (   moduledir,
  modname 
)

Definition at line 329 of file create-module.py.

References create_file().

+ Here is the call graph for this function:

Variable Documentation

◆ CMAKELISTS_TEMPLATE

string create-module.CMAKELISTS_TEMPLATE
Initial value:
1= '''\
2check_include_file_cxx(stdint.h HAVE_STDINT_H)
3if(HAVE_STDINT_H)
4 add_definitions(-DHAVE_STDINT_H)
5endif()
6
7set(examples_as_tests_sources)
8if(${{ENABLE_EXAMPLES}})
9 set(examples_as_tests_sources
10 #test/{MODULE}-examples-test-suite.cc
11 )
12endif()
13
14build_lib(
15 LIBNAME {MODULE}
16 SOURCE_FILES model/{MODULE}.cc
17 helper/{MODULE}-helper.cc
18 HEADER_FILES model/{MODULE}.h
19 helper/{MODULE}-helper.h
20 LIBRARIES_TO_LINK ${{libcore}}
21 TEST_SOURCES test/{MODULE}-test-suite.cc
22 ${{examples_as_tests_sources}}
23)
24
25'''

Definition at line 10 of file create-module.py.

◆ DOC_RST_TEMPLATE

string create-module.DOC_RST_TEMPLATE

Definition at line 197 of file create-module.py.

◆ EXAMPLE_CC_TEMPLATE

string create-module.EXAMPLE_CC_TEMPLATE
Initial value:
1= '''\
2#include "ns3/core-module.h"
3#include "ns3/{MODULE}-helper.h"
4
5using namespace ns3;
6
7int
8main(int argc, char* argv[])
9{{
10 bool verbose = true;
11
12 CommandLine cmd(__FILE__);
13 cmd.AddValue("verbose", "Tell application to log if true", verbose);
14
15 cmd.Parse(argc, argv);
16
17 /* ... */
18
19 Simulator::Run();
20 Simulator::Destroy();
21 return 0;
22}}
23'''
cmd
Definition: second.py:33

Definition at line 102 of file create-module.py.

◆ EXAMPLES_CMAKELISTS_TEMPLATE

string create-module.EXAMPLES_CMAKELISTS_TEMPLATE
Initial value:
1= '''\
2build_lib_example(
3 NAME {MODULE}-example
4 SOURCE_FILES {MODULE}-example.cc
5 LIBRARIES_TO_LINK ${{lib{MODULE}}}
6)
7
8'''

Definition at line 93 of file create-module.py.

◆ file

◆ HELPER_CC_TEMPLATE

string create-module.HELPER_CC_TEMPLATE
Initial value:
1= '''\
2#include "{MODULE}-helper.h"
3
4namespace ns3
5{{
6
7/* ... */
8
9}}
10'''

Definition at line 64 of file create-module.py.

◆ HELPER_H_TEMPLATE

string create-module.HELPER_H_TEMPLATE
Initial value:
1= '''\
2#ifndef {INCLUDE_GUARD}
3#define {INCLUDE_GUARD}
4
5#include "ns3/{MODULE}.h"
6
7namespace ns3
8{{
9
10/* ... */
11
12}}
13
14#endif /* {INCLUDE_GUARD} */
15'''

Definition at line 76 of file create-module.py.

◆ MODEL_CC_TEMPLATE

string create-module.MODEL_CC_TEMPLATE
Initial value:
1= '''\
2#include "{MODULE}.h"
3
4namespace ns3
5{{
6
7/* ... */
8
9}}
10'''

Definition at line 37 of file create-module.py.

◆ MODEL_H_TEMPLATE

string create-module.MODEL_H_TEMPLATE
Initial value:
1= '''\
2#ifndef {INCLUDE_GUARD}
3#define {INCLUDE_GUARD}
4
5namespace ns3
6{{
7
8/* ... */
9
10}}
11
12#endif /* {INCLUDE_GUARD} */
13'''

Definition at line 49 of file create-module.py.

◆ return_value

int create-module.return_value = 0

Definition at line 608 of file create-module.py.

◆ TEST_CC_TEMPLATE

string create-module.TEST_CC_TEMPLATE

Definition at line 127 of file create-module.py.