Important: when using run.sh, users should modify the corresponding .json.i file NOT the generated .json file. .json.i denotes incomplete or interim json file as it has fields intentionally left blank for run.sh to fill in automatically.
Category | Field | Type | Min | Max |
---|---|---|---|---|
Mandatory/General | publisher_interface | String | ||
Mandatory/General | subscriber_interface | String | ||
Mandatory/General | use_xdp | Boolean | ||
Mandatory/General | packet_count | Int | 1 | 10000000 |
Mandatory/General | cycle_time_ns | Int | 100000 | 5000000 |
Mandatory/General | polling_duration_ns | Int | 0 | 10000000 |
Publisher | url | String | ||
Publisher | pub_id | String | ||
Publisher | dataset_writer_id | Int | 0 | 99999 |
Publisher | writer_group_id | Int | 0 | 99999 |
Publisher | early_offset_ns | Int | 0 | 1000000 |
Publisher | publish_offset_ns | Int | 0 | 10000000 |
Publisher | socket_prio | Int | 0 | 7 |
Publisher | two_way_data | Boolean | ||
Publisher | cpu_affinity | Int | 0 | 3 |
Publisher | xdp_queue | Int | 1 | 3 |
Subscriber | url | String | ||
Subscriber | sub_id | String | 0 | 99999 |
Subscriber | subscribed_pub_id | Int | 0 | 99999 |
Subscriber | subscribed_dataset_writer_id | Int | 0 | 99999 |
Subscriber | subscribed_writer_group_id | Int | 0 | 99999 |
Subscriber | offset_ns | Int | 0 | 10000000 |
Subscriber | subscriber_output_file | String | ||
Subscriber | temp_file_dir | String | ||
Subscriber | two_way_data | Boolean | ||
Subscriber | cpu_affinity | Int | 0 | 3 |
Subscriber | xdp_queue | Int | 1 | 3 |
Refer to examples provided by the project.
OPCUA-SERVER is a C-application that can transmit and receive ETH_UADP packets using AF_PACKET or AF_XDP sockets using libopen62541 (OPCUA-based library) APIs. It accepts only 1 .json.i file as input.
Very simple, just 1 pub/sub thread
At the end userspace-userpsace example, 1mil packet blabla
Similar to TSQ & TXRX-TSN examples, 2 platforms are required to be connected to each other via a single-ethernet connection.
-
[Board A & B] Build the project.
cd /usr/share/iotg-tsn-ref-sw/ ./build.sh
-
[Board A] Run the setup script to initialize IP and MAC address, then start clock synchronization and setup TAPRIO + ETF qdiscs.
cd /usr/share/iotg-tsn-ref-sw/ ./run.sh $PLAT $IFACE opcua-pkt1a init ./run.sh $PLAT $IFACE opcua-pkt1a setup
-
[Board A] Run the setup script to initialize IP and MAC address, then start clock synchronization and setup ingress qdisc.
cd /usr/share/iotg-tsn-ref-sw/ ./run.sh $PLAT $IFACE opcua-pkt1b init ./run.sh $PLAT $IFACE opcua-pkt1b setup
-
[Board B] Start listening for packets.
./run.sh $PLAT $IFACE opcua-pkt1b run
-
[Board B] Immediately after step 3, start transmitting packets. The application will terminate itself after completion. Note that AF_PACKET or opcua-pkt* configurations will take longer as they use much higher packet intervals compared to AF_XDP or opuca-xdp* configurations.
./run.sh $PLAT $IFACE opcua-pkt1a run
-
[Board B] A gnuplot window should appear showing the time taken for each packet to traverse from the application in Board A to Board B.
Each run will enumerate and store its raw timestamps/data & plot images in the results- folder for easy reference, repeat steps 3-4 as needed.
In this example type, 2 platforms are required to be connected to each other via two ethernet connections. Meaning there is a total of four ethernet interfaces (as opposed to the usual two).
A simplified explanation of the data flow:
- Board A's first interface ($IFACE1) is used to transmit
- Board B's first interface ($IFACE1) is used to receive
- Board B's second interface ($IFACE2) is used to transmit back to Board A
- Board A's second interface ($IFACE2) is used to receive
When using dual-ports, the $PLAT should be replaced with "ehl2". (TGL not supported)
-
[Board A & B] Build the project.
cd /usr/share/iotg-tsn-ref-sw/ ./build.sh
-
[Board A] Run the setup script to initialize IP and MAC address, then start clock synchronization and setup TAPRIO + ETF qdiscs.
cd /usr/share/iotg-tsn-ref-sw/ ./run.sh $PLAT $IFACE $IFACE2 opcua-pkt3a init ./run.sh $PLAT $IFACE $IFACE2 opcua-pkt3a setup
-
[Board B] Run the setup script to initialize IP and MAC address, then start clock synchronization and setup ingress qdisc.
cd /usr/share/iotg-tsn-ref-sw/ ./run.sh $PLAT $IFACE $IFACE2 opcua-pkt3b init ./run.sh $PLAT $IFACE $IFACE2 opcua-pkt3b setup
-
[Board B] Start listening for packets.
./run.sh $PLAT $IFACE $IFACE2 opcua-pkt3b run
-
[Board A] Immediately after step 3, start transmitting packets.
./run.sh $PLAT $IFACE opcua-pkt3a run
-
[Board A] A gnuplot window should appear showing the time taken for each packet to traverse from the application in Board A to Board B and back to Board A.
Each run will enumerate and store its raw timestamps/data & plot images in the results- folder for easy reference, repeat steps 3-4 as needed.