Attention

You are viewing an older version of the documentation. The latest version is v3.3.

Preparing the Software

All the applications are available as source in GitLab or provided with ECI under the /opt/intel/ngsf directory. The project is organized into the following folders:

  • config/ptp4l: ptp4l configuration files

  • docker: Ingredients to build NGSF applications as Docker Containers

  • scripts: Scripts used to configure the nodes before running the application

  • ngsf: OPC UA applications for IPCs, FPGAs, and dashboard source code

  • README.md: Simple description of the project

The first step is to prepare the binaries. NGSF uses Docker files to simplify the dependencies and build details, and also guarantee reproducibility when compiling all applications. The dependencies include Open62541 for communication, json-c library (JSON-C) for configuration, and Boost, QT, SQLite, and QChart for the dashboard.

Docker also provides a transparent process for the compilation process, as the documentation of flags, compiler, and required dependencies with the commit used are present in the Docker files. Usually after a Docker build, the result of the build resides in the running container, however, NGSF provides an additional script to automate the extraction of the results from the build. The following are the three Docker files provided together with their companion script files:

  • Dockerfile_dash, copy_binaries_dash.sh: Used to build the dashboard

  • Dockerfile_ipc, copy_binaries_ipc.sh: Used to compile the binaries for the IPC, mainly OPC UA applications except dashboard

  • Dockerfile_fpga, copy_binaries_fpga: Used to build the binaries for the FPGAs

  • Dockerfile_ipc_apps, copy_binaries_ipcs_apps: Collection of binaries used as companion for the demo, not in use in combination with ECI

Once compiled, the command line applications can run directly in ECI. The tsn_dashboard can run as a Docker container in ECI, carrying the dependencies it requires as a typical ECI microservice.

Using the Dockerfile makes building and retrieving the applications simple. To start the Docker build, use a PC running Ubuntu 20.04 and install Docker with the commands:

sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io

Note: There is no need to set up TSN Ethernet ports before running these commands.

Once the project is checked, go to the main directory folder, for instance, /home/user/src/ngsf-i4.0/, and run the following commands (note that the commands include a . at the end):

Note: These commands include a period at the end, indicating to use the current path and the docker name must not change.

sudo docker build -t ngsf_dash-builder -f $HOME/src/ngsf-i4.0-master/docker/Dockerfile_dash .
sudo docker build -t ngsf_ipc-builder -f $HOME/src/ngsf-i4.0-master/docker/Dockerfile_ipc .
sudo docker build -t ngsf_fpga-builder -f $HOME/src/ngsf-i4.0-master/docker/Dockerfile_fpga .

Once the docker build is complete copy the files from the docker container using the script copy_binaries.sh located in the docker folder. After changing the directory to docker, perform the commands:

./docker/copy_binaries_dash.sh
./docker/copy_binaries_ipc.sh
./docker/copy_binaries_fpga.sh

The scripts copy the following files to the current directory: bin-deliver_dash.tar, bin-deliver_ipc.tar, and bin-deliver_fpga.tar. When the files are unpacked, there will be two folders inside the IPCs and FPGA with the applications and the ngsf.json configuration file.

Now that the applications are compiled, you must configure them. The configuration process is very closely related to the network topology present in the setup.