DDS Extensions for TSN

Time-Sensitive Networking (TSN)

Time-Sensitive Networking (TSN) is a set of IEEE 802.1 standards that provide deterministic data delivery, low latency, and high reliability over Ethernet networks. TSN enables real-time communication for critical applications by ensuring that time-critical data is delivered within strict timing constraints, even in the presence of non-critical traffic on the same network.

OMG DDS-TSN Specification

The Object Management Group (OMG) created the DDS-TSN specification to define standard mappings between the Data Distribution Service (DDS) and Time-Sensitive Networking (TSN). This integration allows DDS applications to leverage TSN capabilities to achieve deterministic, real-time communication while maintaining the data-centric approach of DDS.

The specification defines:

  • Mapping of DDS QoS policies to TSN capabilities

  • Support for DDSI-RTPS over TSN, both for UDP/IP and raw Ethernet transports

  • Flow configuration based on transport identifiers:
    • UDPv4 (IPv4Tuple): source/destination IP, DSCP, protocol, source/destination port

    • Ethernet: source/destination MAC addresses, PCP, VLAN ID

Safe DDS TSN Implementation

Safe DDS provides the required scaffolding for using DDS over TSN compliant with the OMG specification:

  • UDP Transport Support (POSIX UDPv4)

    Safe DDS supports DDSI-RTPS communication over standard POSIX UDPv4 sockets. This enables seamless operation on TSN-capable networks while preserving compatibility with existing DDS deployments. This transport option is certified up to ASIL D (Supported platforms for more information), making it suitable for safety-critical systems.

    In this transport, the tuple parameters can be set as follows:

  • Ethernet Transport Support (POSIX Ethernet)

    Safe DDS includes a custom Ethernet transport that operates directly at Layer 2 (data link layer), bypassing the TCP/IP stack for reduced latency and direct control over Ethernet frames.

    In this transport, the tuple parameters can be set as follows:

    • Source MAC address, PCP, VLAN ID

      Configured via DataWriterWireProtocolQosPolicy::sending_locator.

      Optionally, a virtual sending logical port may be defined to allow multiple DataWriters to share a MAC address while still offering a useful way to identify the source of the traffic.

          uint16_t vlanid = 10;
          uint8_t pcp = 5;
          uint16_t sending_logical_port = 9999;
          transport::Locator::MAC datawriter_mac_address = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
          datawriter_qos.wire_protocol_qos().sending_locator =
                  transport::Locator::from_mac(datawriter_mac_address, sending_logical_port, vlanid, pcp);
      
    • Destination MAC address

      Configured via DataReaderWireProtocolQosPolicy::unicast_endpoint_locator.

      Optionally, a virtual reception logical port may be defined to allow multiple DataReaders to share a MAC address while still isolating traffic.

          uint16_t reception_logical_port = 8888;
          transport::Locator::MAC datareader_mac_address = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
          datareader_qos.wire_protocol_qos().unicast_endpoint_locator =
                  transport::Locator::from_mac(datareader_mac_address, reception_logical_port, 0, 0);
      

    Safe DDS extends the standard Locator class with a new kind for Ethernet communication:

    enum LocatorKind
    {
        INVALID = -1,
        RESERVED = 0,
        UDPv4 = 1,
        UDPv6 = 2,
        ETHERNET = 0x02000000,
        CUSTOM = INT32_MAX
    };
    
  • Compatible QoS Policies

    When using TSN transport, the following QoS configurations shall be enforced:

    • Reliability: Must use BEST_EFFORT_RELIABILITY_QOS

    • Durability: Must use VOLATILE_DURABILITY_QOS

    • History: Must use KEEP_LAST_HISTORY_QOS with depth=1

    These restrictions are in place to align with the deterministic nature of TSN networks, where retransmissions and history caching would potentially disrupt the time-critical delivery of messages.

    See Custom Transports: POSIX Ethernet 802.1Q Tutorial example configuration for more details on how to make Safe DDS enforce QoS policy compatibility with the DDS-TSN specification, ensuring that applications using the TSN transport adhere to the required communication parameters.

Example Configuration

For a detailed implementation example, see the Custom Transports: POSIX Ethernet 802.1Q Tutorial section, which includes a POSIX Ethernet 802.1Q custom transport tutorial.