GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - idaholab/Code_Generator: The ns-3 code generator provides a way to automatically generate C++ simulation code for ns-3 from a high level network topology description.

This repository was archived by the owner on Dec 22, 2022. It is now read-only.
BranchesTags
Open more actions menu

Latest commit

 

History

255 Commits
255 Commits

Folders and files

NameName
Last commit message
Last commit date
kern
kern
 
 
AMISimpleWireless_xml
AMISimpleWireless_xml
 
 
AUTHORS
AUTHORS
 
 
COPYING
COPYING
 
 
Makefile
Makefile
 
 
NOTICE
NOTICE
 
 
README.md
README.md
 
 
TopologySchema.xsd
TopologySchema.xsd
 
 
ns-3-codegenerator.cxx
ns-3-codegenerator.cxx
 
 

Repository files navigation

The ns-3 code generator

The ns-3 code generator project aims to provide a quick and easy way to automatically generate valid ns-3 C++ simulation scripts. It incorporates the CodeSynthesis XSD product to validate and generate the XML to C++ data bindings to allow for easier parsing of the XML file used to define a network topology. The code generator can be invoked stand alone from the command line, or integrated into a larger system that requires ns-3 code generation capability.

  1. Build / install

You need the CodeSynthesis XSD library to compile and use ns-3 code generator. XSD utilizes the Xerces XML parser, so that needs to be installed also.

If not already installed, the code generator depends on SQLite3, and GNOME XML, they can be installed by issuing the following commands (Ubuntu);

$ sudo apt-get install sqlite sqlite3 libsqlite3-dev

$ sudo apt-get install libxml2 libxml2-dev

To build the project: Make sure a valid XML instance specification (XML Schema) file is colocated with the Makefile. An example would be;

TopologySchema.xsd XML Schema which describes a network topology.

Then simply issue:

$ make

Issuing the make command will generate the following files;

TopologySchema.hxx

TopologySchema.ixx

TopologySchema.cxx

C++ types that represent the given vocabulary, a set of parsing functions that convert XML documents to a tree-like in-memory object model, and a set of serialization functions that convert the object model back to XML. These are generated by XSD from TopologySchema.xsd.

Other files;

ns-3-codegenerator.cxx

Is the main program for the project. It first calls one of the parsing functions that constructs the object model from the input file. It then makes the API calls to generate the ns-3 compliant code.

  1. Execute

Make sure the XML Schema file (TopologySchema.xsd) is colocated with the code generator executable.

Then simply issue:

$ ./ns-3-codegenerator filename.xml output_filename

The filename.xml contains a high level description of a network topology. The provided output filename contains the ns-3 C++ statements that can be executed in ns-3 environment.

To generate the XML class documentation (you need doxygen tool):

$ make docs

The HTML generated documentation is located in the same directory.

  1. ns-3

The output_filename file that is generated can then be executed in the ns-3 simulation environment. See ns-3 documentation for how to run an ns-3 script.

Note - If you generate an ns-3 script with any of the COSEM applications, your ns-3 install will need to include those helper/models. The DLMS/COSEM repository can be found at;

https://github.com/joaopedrotaveira/dlms-cosem-ns-3

License

Copyright (c) 2016 Idaho National Laboratory

Copyright (c) 2009 University of Strasbourg

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

About

The ns-3 code generator provides a way to automatically generate C++ simulation code for ns-3 from a high level network topology description.

Resources

Readme
GPL-2.0 license
Activity
Custom properties

Stars

10 stars

Watchers

1 watching

Forks

5 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.