2025-12-01 15:56:02 +01:00
2025-11-25 10:24:45 +01:00
2025-12-01 15:56:02 +01:00

#Eden-sim

Description

This repository contains a ns-3 library implementation to simulate embedded TSN networks. In addition to the implementation, this library comes with examples and non-regression tests for the implemented TSN mechanisms. This library is a result of the EDEN2 project and is still under development.

Prerequisites

  • A ns-3 3.40 installation. See ns-3 GitLab.
    • Clone the Git repository and checkout ns-3.40
      • Note that ns-3 doesn't need to be build at this step as this will be done when adding the simulator add-ons (cf. next subsection).

Installation

git clone https://sahara.irt-saintexupery.com/embedded-systems/eden-sim.git
cp -r eden-sim/contrib/* <path to your ns-3 installation>/contrib/
cd <path to your ns-3 installation>
./ns3 clean
./ns3 configure --enable-tests --enable-examples
./ns3 build

Usage

To test the installation :

cd <path to your ns-3 installation>
./test.py

or to run a specific test suite (e.g ethernet) or test example (e.g. ethernet-point2point-withPropagationDelay) :

cd <path to your ns-3 installation>
./test.py --list
./test.py --suite ethernet --text test-logs
./test.py --example ethernet-point2point-withPropagationDelay

Note that with version 3.40 of ns-3, the “neighbor-cache” test fails without any connection or consequence to our library. However, the “mobility-trace,” “attributes,” “data-rate,” and “time” tests fail because of our library. Indeed, in order to simulate communications at over 1Gb/s, the “ethernet-test-suite.cc” test sets the time resolution to picoseconds instead of nanoseconds, thus causing side effects in other tests. Line 996 (i.e. “Time::SetResolution(Time::PS);”) can be commented out to resolve this issue.

To run an example (e.g. "ethernet-point2point.cc") :

cd <path to your ns-3 installation>
mkdir output
cp contrib/ethernet/examples/ethernet-point2point.cc scratch/
./ns3 run scratch/ethernet-point2point.cc --cwd output/

Note that ns-3 examples can be run with "./ns3 run <example name>" but we recommand to use the above method in order to modify/experiment with the example.

To run a simulation script you have written :

cd <path to your ns-3 installation>
mkdir output
./ns3 run scratch/<your simulation script> --cwd output/

To run a simulation script with gdb :

cd <path to your ns-3 installation>
mkdir output
./ns3 run scratch/<your simulation script> --cwd output/ --command-template="gdb --args %s"

Documentation

Before attempting to understand this library, we recommend reading the ns-3 documentation. A very good entry point is the ns-3 tutorial.

Next, a set of commented simulation scripts illustrating the use of the libraries can be found at the following paths :

  • contrib/ethernet/examples/
  • contrib/traffic-generator/examples/
  • contrib/tsn/examples/

Contact

Contact: embedded-systems@irt-saintexupery.com

Description
A ns-3 library to simulate embedded TSN networks.
Readme GPL-2.0 219 KiB
Languages
C++ 98.3%
CMake 1.1%
Python 0.6%