A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
Manual
Navigation
index
next
|
previous
|
ns-3
Manual
Support
ΒΆ
Creating a new ns-3 model
Design-approach
Example: ErrorModel
Scaffolding
Review the ns-3 coding style document
Decide where in the source tree the model will reside in
waf and wscript
include guards
namespace ns3
Initial Implementation
use of class Object?
initial classes
how to include files from elsewhere
log component
constructor, empty function prototypes
key variables (default values, attributes)
test program 1
Object Framework
Adding-a-sample-script
Add basic support in the class
Add Accessor
Plumb into the system
Create null functional script
Add subclass
How to subclass
Build-core-functions-and-unit-tests
assert macros
Writing unit tests
Adding a New Module to
ns-3
Step 1 - Familiarize yourself with the module layout
Step 2 - Create your new module based on the template module
Step 3 - Adding to your module’s source files
Step 4 - Specify your module’s header files
Step 5 - Specify your module’s tests
Step 6 - Specify your module’s examples
Step 7 - Specify which of your module’s examples should be run as tests
Step 8 - Build and test your new module
Enabling Subsets of
ns-3
Modules
How to enable a subset of
ns-3
‘s modules
Enable modules using waf’s –enable-modules option
Enable modules using the
ns-3
configuration file
Enabling/disabling
ns-3
Tests and Examples
How to enable/disable examples and tests in
ns-3
Enable/disable examples and tests using build.py
Enable/disable examples and tests using waf
Enable/disable examples and tests using the
ns-3
configuration file
Troubleshooting
Build errors
Run-time errors
Previous topic
How to write tests
Next topic
Creating a new ns-3 model
This Page
Show Source
Quick search
Enter search terms or a module, class or function name.
Navigation
index
next
|
previous
|
ns-3
Manual