{"id":40917488,"url":"https://github.com/rticommunity/rticonnextdds-usecases-tsn-arch-sim","last_synced_at":"2026-01-22T03:17:41.793Z","repository":{"id":250678602,"uuid":"834065248","full_name":"rticommunity/rticonnextdds-usecases-tsn-arch-sim","owner":"rticommunity","description":"This Case+Code example simulates a distributed application using RTI Connext whose DataWriters and DataReader communicate via specific VLANs leaving discovery and meta-traffic sent and received over the non-VLAN network.","archived":false,"fork":false,"pushed_at":"2024-07-29T08:57:08.000Z","size":59,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-07-29T12:08:53.729Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rticommunity.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-26T10:43:04.000Z","updated_at":"2024-07-29T12:09:02.181Z","dependencies_parsed_at":"2024-07-29T12:23:28.061Z","dependency_job_id":null,"html_url":"https://github.com/rticommunity/rticonnextdds-usecases-tsn-arch-sim","commit_stats":null,"previous_names":["rticommunity/rticonnextdds-usecases-tsn-arch-sim"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rticommunity/rticonnextdds-usecases-tsn-arch-sim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rticommunity%2Frticonnextdds-usecases-tsn-arch-sim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rticommunity%2Frticonnextdds-usecases-tsn-arch-sim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rticommunity%2Frticonnextdds-usecases-tsn-arch-sim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rticommunity%2Frticonnextdds-usecases-tsn-arch-sim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rticommunity","download_url":"https://codeload.github.com/rticommunity/rticonnextdds-usecases-tsn-arch-sim/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rticommunity%2Frticonnextdds-usecases-tsn-arch-sim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28652085,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T01:17:37.254Z","status":"online","status_checked_at":"2026-01-22T02:00:07.137Z","response_time":144,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-22T03:17:41.219Z","updated_at":"2026-01-22T03:17:41.787Z","avatar_url":"https://github.com/rticommunity.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TSN Simulator based on Docker containers \n\nThe intention is to simulate a distributed application using RTI Connext whose\nDataWriters and DataReader communicate via specific VLANs leaving discovery and\nmeta-traffic sent and received over the non-VLAN network.\n\n## Cloning the repository\n\nTo clone the repository you will need to run `git clone` as follows to download\nboth the repository and its submodule dependencies:\n\n```bash\ngit clone --recurse-submodule https://github.com/rticommunity/rticonnextdds-usecases-tsn-arch-sim.git\n```\n\nIf you forget to clone the repository with `--recurse-submodule`, simply run\nthe following command to pull all the dependencies:\n\n```bash\ngit submodule update --init --recursive\n```\n\n## Build Connext Docker image\n\nThe initial step in this Case+Code is to configure a Docker image, which will\nserve as a node within the application architecture. During the image build process,\nthe applications associated with this Case+Code will be automatically compiled and\nincluded inside the Docker image. These applications will be accessible in the\nresulting image at the `/root/app/` directory.\"\n\nThere is a docker file in the `docker` subdirectory. To create the docker image\nadjust the line in the Dockerfile that reads `ENV TZ=Europe/Madrid` to set the\ncorrect timezone, then run the following command to build the Connext image for\nthe 7.3.0 release, take into account that you are accepting the RTI license\nagreement by setting the `RTI_LICENSE_AGREEMENT_ACCEPTED` argument to \"accepted\":\n\n```bash\ndocker build -t connext:7.3.0 -f docker/Dockerfile --build-arg RTI_LICENSE_AGREEMENT_ACCEPTED=accepted --build-arg CONNEXT_VERSION=7.3.0 .\n```\n\n\nIf you want to target a different version of Connext, then you must set the following\narguments to match your requirements \n\n- CONNEXT_VERSION: supported values are 7.3.0 and 6.1.2\n\nHere's an example of what that would look like for a 6.1.2 release:\n\n```bash\ndocker build -t connext:6.1.2 -f docker/Dockerfile --build-arg RTI_LICENSE_AGREEMENT_ACCEPTED=accepted --build-arg CONNEXT_VERSION=6.1.2 .\n```\n\n## Networks\n\nThe docker images will be using bridged networking. For that propose we are going\nto create three different networks the `stdnet` used for discovery and meta-traffic\nand two networks added to simulate VLANs `tsnnet1` and `tsnnet2`. To create these\ndocker networks, run\n\n```bash\ndocker network create --subnet=10.1.0.0/24 stdnet\ndocker network create --subnet=10.2.1.0/24 tsnnet1\ndocker network create --subnet=10.2.2.0/24 tsnnet2\n```\n\n## Application configuration\n\nThe application will consist of three nodes based on the ShapeTypeExtended type\nused by ShapesDemo. An Orange sample will represent video command data, and Cyan\nsamples will be used to represent effector command data. The samples differ in\ncolour to permit easy visualisation in WireShark. Below is a summary of the\nthree applications and their network configurations.\n\n![Network Diagram](resources/img/network_diagram.png)\n\n### Surgeon Console\n\n- discovery/meta-traffic: `10.1.0.11`  \n- Console/Effector VLAN (tsnnet1): `10.2.1.11`  \n- Console/Video VLAN (tsnnet2): `10.2.2.11`  \n\nThe \"Surgeon Console\" has two data writers, one to send commands to the \"Video\nServer\" (Orange) and one to send commands to the \"Effector Server\" (Cyan).\n\n### Video Server\n\n- discovery/meta-traffic: `10.1.0.12`  \n- Console/Video VLAN (tsnnet2): `10.2.2.12`  \n\nThe DataReader in the \"Video Server\" will receive samples via the tsnnet2 network.\n\n### Effector Server\n\n- discovery/meta-traffic: `10.1.0.13`  \n- Console/Effector VLAN (tsnnet1): `10.2.1.13  \n\nThe DataReader in the \"Effector Server\" will receive samples via the tsnnet1 network.\n\n## Starting the docker containers\n\nThe default configuration used for the development of this simulation is to share\nthe display with an X server to allow ShapesDemo to be executed from within the\ncontainer and rendered on the host's display. \n\nIf this isn't required, remove the `-e DISPLAY`, `-v $XAUTHORITY:/root/.Xauthority`\nand `-v /tmp/.X11-unix:/tmp/.X11-unix` parameters from the provided docker run commands.\n\n### Surgeon Console\n\nIn a terminal window run:  \n\n```bash\ndocker run --rm -it -e DISPLAY --privileged --network stdnet --ip 10.1.0.11 --hostname surgeon_console --name surgeon_console -v $XAUTHORITY:/root/.Xauthority -v /tmp/.X11-unix:/tmp/.X11-unix -v $RTI_LICENSE_FILE:/root/rti_license.dat connext:7.3.0 bash\n```\n\nIn a separate terminal window run the following commands to connect the \"Surgeon\nConsole\" container to the tsnnet1 and tsnnet2 networks:\n\n```bash\ndocker network connect tsnnet1 --ip 10.2.1.11 surgeon_console\ndocker network connect tsnnet2 --ip 10.2.2.11 surgeon_console\n```\n\nRun `ip a` in the \"Surgeon Console\" terminal to verify the network configuration:\n\n```bash\nroot@surgeon_console:~# ip a\n1: lo: \u003cLOOPBACK,UP,LOWER_UP\u003e mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000\n    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00\n    inet 127.0.0.1/8 scope host lo\n       valid_lft forever preferred_lft forever\n108: eth0@if109: \u003cBROADCAST,MULTICAST,UP,LOWER_UP\u003e mtu 1500 qdisc noqueue state UP group default \n    link/ether 02:42:ac:11:00:03 brd ff:ff:ff:ff:ff:ff link-netnsid 0\n    inet 10.1.0.11/24 brd 10.1.0.255 scope global eth0\n       valid_lft forever preferred_lft forever\n110: eth1@if111: \u003cBROADCAST,MULTICAST,UP,LOWER_UP\u003e mtu 1500 qdisc noqueue state UP group default \n    link/ether 02:42:c0:a8:01:0b brd ff:ff:ff:ff:ff:ff link-netnsid 0\n    inet 10.2.1.11/24 brd 10.2.1.255 scope global eth1\n       valid_lft forever preferred_lft forever\n112: eth2@if113: \u003cBROADCAST,MULTICAST,UP,LOWER_UP\u003e mtu 1500 qdisc noqueue state UP group default \n    link/ether 02:42:c0:a8:02:0b brd ff:ff:ff:ff:ff:ff link-netnsid 0\n    inet 10.2.2.11/24 brd 10.2.2.255 scope global eth2\n       valid_lft forever preferred_lft forever\n```\n\n### Video Server\n\nIn a new terminal window run:  \n\n```bash\ndocker run --rm -it -e DISPLAY --privileged --network stdnet --ip 10.1.0.12 --hostname video_server --name video_server -v $XAUTHORITY:/root/.Xauthority -v /tmp/.X11-unix:/tmp/.X11-unix -v $RTI_LICENSE_FILE:/root/rti_license.dat connext:7.3.0 bash\n```\n\nIn a separate terminal window run the following command to connect the \"Video\nServer\" container to the tsnnet2 network:  \n\n```bash\ndocker network connect tsnnet2 --ip 10.2.2.12 video_server\n```\n\nRun `ip a` in the \"Video Server\" terminal to verify the network configuration:  \n\n```bash\nroot@video_server:~# ip a\n1: lo: \u003cLOOPBACK,UP,LOWER_UP\u003e mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000\n    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00\n    inet 127.0.0.1/8 scope host lo\n       valid_lft forever preferred_lft forever\n114: eth0@if115: \u003cBROADCAST,MULTICAST,UP,LOWER_UP\u003e mtu 1500 qdisc noqueue state UP group default \n    link/ether 02:42:ac:11:00:04 brd ff:ff:ff:ff:ff:ff link-netnsid 0\n    inet 10.1.0.12/24 brd 10.1.0.255 scope global eth0\n       valid_lft forever preferred_lft forever\n116: eth1@if117: \u003cBROADCAST,MULTICAST,UP,LOWER_UP\u003e mtu 1500 qdisc noqueue state UP group default \n    link/ether 02:42:c0:a8:02:0c brd ff:ff:ff:ff:ff:ff link-netnsid 0\n    inet 10.2.2.12/24 brd 10.2.2.255 scope global eth1\n       valid_lft forever preferred_lft forever\n```\n\n### Effector Server\n\nIn a new terminal window run:  \n\n```bash\ndocker run --rm -it -e DISPLAY --privileged --network stdnet --ip 10.1.0.13 --hostname effector_server --name effector_server -v $XAUTHORITY:/root/.Xauthority -v /tmp/.X11-unix:/tmp/.X11-unix -v $RTI_LICENSE_FILE:/root/rti_license.dat connext:7.3.0 bash\n```\n\nIn a separate terminal window run the following command to connect the \"Effector\nServer\" container to the tsnnet2 network:  \n\n```bash\ndocker network connect tsnnet1 --ip 10.2.1.13 effector_server\n```\n\nRun `ip a` in the \"Effector Server\" terminal to verify the network configuration:  \n\n```bash\nroot@effector_server:~# ip a\n1: lo: \u003cLOOPBACK,UP,LOWER_UP\u003e mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000\n    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00\n    inet 127.0.0.1/8 scope host lo\n       valid_lft forever preferred_lft forever\n118: eth0@if119: \u003cBROADCAST,MULTICAST,UP,LOWER_UP\u003e mtu 1500 qdisc noqueue state UP group default \n    link/ether 02:42:ac:11:00:05 brd ff:ff:ff:ff:ff:ff link-netnsid 0\n    inet 10.1.0.13/24 brd 10.1.0.255 scope global eth0\n       valid_lft forever preferred_lft forever\n120: eth1@if121: \u003cBROADCAST,MULTICAST,UP,LOWER_UP\u003e mtu 1500 qdisc noqueue state UP group default \n    link/ether 02:42:c0:a8:01:0d brd ff:ff:ff:ff:ff:ff link-netnsid 0\n    inet 10.2.1.13/24 brd 10.2.1.255 scope global eth1\n       valid_lft forever preferred_lft forever\n```\n\n## Usage\n\nThe three applications have the same usage:\n\n```bash\nUsage:\n    -d, --domain       \u003cint\u003e   Domain ID this application will\n                               subscribe in.  \n                               Default: 0\n    -q, --qos_file     \u003cstr\u003e   XML file containing QoS profiles\n                               for the application.\n                               Required: True\n    -s, --sample_count \u003cint\u003e   Number of samples to receive before\n                               cleanly shutting down. \n                               Default: infinite\n    -v, --verbosity    \u003cint\u003e   How much debugging output to show.\n                               Range: 0-3 \n                               Default: 1\n```\n\n-   Surgeon Console:\n\n    ```bash\n    /root/app/surgeon_console -q /root/app/surgeon_qos_profiles.xml\n    ```\n\n-   Video Server:  \n\n    ```bash\n    /root/app/video_server -q /root/app/video_qos_profiles.xml\n    ```\n\n-   Effector Server:  \n\n    ```bash\n    /root/app/effector_server -q /root/app/effector_qos_profiles.xml\n    ```\n\n## Quality of Service\n\nThe three applications have distinct QoS profiles, but they all follow a common theme. \nThe base `tsn_profile` sets up and configures UDP transports which are given\naliases defined as stdnet, tsnnet1 and tsnnet2. Only all three are defined in the\n\"Surgeon Console\" QoS, the other applications define only those that are used in\ntheir specific cases.\n\nThe transport_builtin QoS is set to MASK_NONE, meaning no builtin transports are\nenabled which ensures the traffic only goes through those registered.\n\nDiscovery is configured to use the transport defined with the alias \"stdnet\",\nwhich is the default docker bridge network. The initial peers are configured,\nas in a TSN scenario using VLANs it would be expected to know the addresses, and\naccept_unknown_peers is set to false.\n\n### Surgeon Console\n\nIn the \"Surgeon Console\" QoS, two additional profiles are defined, both deriving\nfrom `tsn_profile`. The first, `video_profile` configures the DataWriter for the\n`video_control` topic to use the transport with the `tsnnet2` alias, while the \nsecond `effector_profile` configures the DataWriter for the `effector control`\ntopic to use the transport with the `tsnnet1` alias.\n\n### Video Server\n\nIn the \"Video Server\" QoS, the discovery configuration differs in that only the\n\"Surgeon Console\" node is defined in the peer list.\nThe transport configuration also differs, as the transport with the alias `stdnet`\nis using the address docker assigned to the default bridge network (10.1.0.12),\nand the `tsnnet1` transport is absent as it is not used by the \"Video Server\".\n\nIn the `video_profile` QoS profile, the DataReader is configured to use the `tsnnet2`\ntransport, and additionally the unicast endpoint is defined as using the `tsnnet2`\ntransport and the specific receive port (2345). (This port can be anything as long\nas it doesn't conflict with those defined for builtin transports)\n\n### Effector Server\n\nIn the \"Effector Server\" QoS, the discovery configuration again differs from that\nof the \"Surgeon Console\" in the discovery configuration. The transport configuration\nagain differs, as the transport with the alias `stdnet` is using the address docker\nassigned to the default bridge network (10.1.0.13), and the `tsnnet2` transport is\nabsent as it is not used by the \"Effector Server\".\n\nIn the `effector_profile` QoS profile, the DataReader is configured to use the `tsnnet1`\ntransport, and additionally the unicast endpoint is defined as using the `tsnnet1`\ntransport and the specific receive port (1234).\n\n## Building the applications\n\nIf you want to build the applications from source in your local machine, you will\nneed to have Connext, CMake and review the [Building Applications](https://community.rti.com/static/documentation/connext-dds/7.3.0/doc/manuals/connext_dds_professional/platform_notes/platform_notes/BuildingApplications.htm#Chapter_2_Building_Applications%E2%80%94Notes_for_All_Platforms)\ndocumentation section. The applications have been tested with Connext 7.3.0 and 6.1.2.\n\nCreate a build directory and run `cmake` to build as follows:\n\n```bash\nmkdir build \ncd build\ncmake ..\ncmake --build .\n```\n\nYou can run your own builded applications by running the distribute script from the\nbuild directory and then the three applications should be ready to be executed from\nwithin the docker containers from the `/root/app` folder.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frticommunity%2Frticonnextdds-usecases-tsn-arch-sim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frticommunity%2Frticonnextdds-usecases-tsn-arch-sim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frticommunity%2Frticonnextdds-usecases-tsn-arch-sim/lists"}