Vspec DDS Exporter

March 23, 2026 ยท View on GitHub

The vspec dds exporter is used to export VSS file data to DDS IDL file (4.2 version)

Acronyms used:

  • DDS : Data Distribution Service
  • IDL : Interface Definition Language
  • VSS : Vehicle Signal Specification

Reference to the specifications:

  • VSS description can be found at : link
  • DDS IDL specification can be found at : link

Various VSS elements considered for conversion:

  • Name
  • datatype (also single dimensional array is supported)
  • allowed

Special handling

Below elements are considered only if the switch --all-idl-features is supplied as a command line argument

  • type
  • min, max
  • unit
  • description

Datatypes mapping between VSS and DDS-IDL

VSSDDS-IDL
uint8octet
int8octet
uint16unsigned short
int16short
uint32unsigned long
int32long
uint64unsigned long long
int64long long
booleanboolean
floatfloat
doubledouble
stringstring

Examples of VSS data and converted DDS-IDL data

Input VSS block with "arraysize" attribute

VSSDDS-IDL
Safety.SpeedLimit:
datatype : float[]
arraysize: 5
type: actuator
unit: m/s
description: Maximum allowed speed of the vehicle
struct SpeedLimit{
sequence<float> value;
}

Input VSS block with "allowed" attribute

VSSDDS-IDL
Direction:
datatype:string
type: actuator
allowed: ['FORWARD','BACKWARD']
description: Driving direction of the vehicle
module Direction_M {
enum DirectionValues{FORWARD,BACKWARD};
};
struct Direction
{
DirectionValues value;
};

To comply with DDS-IDL rules and limitations in IDL compilers VSS string literals that start with a digit will get a d as prefix.

Example VSS:

allowed: ['FORWARD','BACKWARD', '123']

Resulting DDS-IDL::

enum DirectionValues{FORWARD,BACKWARD,d123}

Initially an underscore was used a prefix. That made the IDL correct according to tools, but could not be correctly handled by tools like "Eclipse Cyclone DDS idlc Python Backend" resulting in invalid Python code.

Checking generated DDS-IDL file and generating code stubs from it

IDL files can be supplied as input to one of the DDS implementation (e.g: CycloeDDS, FastDDS) and the data can be validated, and also stubs (python/c++/java code) can be generated from the contents in the IDL file.

Installation of CycloneDDS

Cyclone DDS can for Linux be installed with:

pip install cyclonedds==0.10.5

Note that there have been backward inccompatible changes in CycloneDDS 11.0 and by that reason we use 0.10.5

Usage of CycloneDDS to take IDL file as input and generate Python file with types

idlc -l py ./results/res.idl

FastDDS

Installation of FastDDS

Follow the instructions mentioned in page : https://fast-dds.docs.eprosima.com/en/latest/installation/binaries/binaries_linux.html

Usage of FastDDS to take IDL file as input and generate Python file with types

./fastddsgen -replace ./results/res.idl