A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
create-module Namespace Reference

Functions

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

Variables

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

Function Documentation

◆ create_argument_parser()

create-module.create_argument_parser ( )

Definition at line 454 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()

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

Definition at line 333 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()

create-module.make_cmakelists ( moduledir,
modname )

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

References create_file().

+ Here is the call graph for this function:

◆ make_doc()

create-module.make_doc ( moduledir,
modname )

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

References create_file().

+ Here is the call graph for this function:

◆ make_examples()

create-module.make_examples ( moduledir,
modname )

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

References create_file().

+ Here is the call graph for this function:

◆ make_helper()

create-module.make_helper ( moduledir,
modname )

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

References create_file().

+ Here is the call graph for this function:

◆ make_model()

create-module.make_model ( moduledir,
modname )

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

References create_file().

+ Here is the call graph for this function:

◆ make_module()

create-module.make_module ( modpath,
modname )

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

Referenced by create_argument_parser().

+ Here is the caller graph for this function:

◆ make_test()

create-module.make_test ( moduledir,
modname )

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

References create_file().

+ Here is the call graph for this function:

Variable Documentation

◆ CMAKELISTS_TEMPLATE

str 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"""

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

◆ DOC_RST_TEMPLATE

str create-module.DOC_RST_TEMPLATE

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

◆ EXAMPLE_CC_TEMPLATE

str create-module.EXAMPLE_CC_TEMPLATE
Initial value:
1= """\
2#include "ns3/core-module.h"
3#include "ns3/{MODULE}-helper.h"
4
5/**
6 * \\file
7 *
8 * Explain here what the example does.
9 */
10
11using namespace ns3;
12
13int
14main(int argc, char* argv[])
15{{
16 bool verbose = true;
17
18 CommandLine cmd(__FILE__);
19 cmd.AddValue("verbose", "Tell application to log if true", verbose);
20
21 cmd.Parse(argc, argv);
22
23 /* ... */
24
25 Simulator::Run();
26 Simulator::Destroy();
27 return 0;
28}}
29"""

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

◆ EXAMPLES_CMAKELISTS_TEMPLATE

str 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"""

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

◆ file

create-module.file

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

◆ HELPER_CC_TEMPLATE

str 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 71 of file create-module.py.

◆ HELPER_H_TEMPLATE

str 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// Each class should be documented using Doxygen,
11// and have an \ingroup {MODULE} directive
12
13/* ... */
14
15}}
16
17#endif /* {INCLUDE_GUARD} */
18"""

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

◆ MODEL_CC_TEMPLATE

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

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

◆ MODEL_H_TEMPLATE

str create-module.MODEL_H_TEMPLATE
Initial value:
1= """\
2#ifndef {INCLUDE_GUARD}
3#define {INCLUDE_GUARD}
4
5// Add a doxygen group for this module.
6// If you have more than one file, this should be in only one of them.
7/**
8 * \defgroup {MODULE} Description of the {MODULE}
9 */
10
11namespace ns3
12{{
13
14// Each class should be documented using Doxygen,
15// and have an \ingroup {MODULE} directive
16
17/* ... */
18
19}}
20
21#endif /* {INCLUDE_GUARD} */
22"""

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

◆ return_value

int create-module.return_value = 0

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

◆ TEST_CC_TEMPLATE

str create-module.TEST_CC_TEMPLATE

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