This component establishes a two way communication between a device with UDP interface and the DDS bus. This means relaying UDP signals to DDS and vice versa. Currently, this component only relays UDP signals to DDS.
The component is configured by an input file with the following structure:
Options
:PeriodMs
: 1000UdpReadPackages
: A yaml list of UDP packages to be read and transmitted to the DDS bus. Each element should have the following structure:Name
: Name of the signal package.LocalPort
: The port on the local host which the remote device sends udp packages to.SenderAddress
: The remote address to receive UDP packages from. To allow UDP packages from any host, use the value any
.BufferMargin
: Adds a safety margin to the allocated buffer for incoming packages, in bytes. Necessary if only parts of the package is parsed.Signals
: A yaml list of the DDS signals to parse the UDP package into. Each signal has the structure:UdpType
: The type to read from the package. This can be one offloat
(Reads 4 bytes and parsesd as float)bool
(Reads 1 byte and parses as bool)double
(Reads 8 bytes and parses as double)int
(Reads 4 bytes and parses as integer)unsigned int
(reads 4 bytes and parses as unsigned integer)bitgroup
(Reads 1 byte and extracts the indivisual bnits as bool values)DdsType
: The DDS type to write.Topic
: This is the DDS topic name(s) to write to. If the UdpType is bitgroup
, this should be a yaml array with 8 elements. Otherwise it should be a single topicname.Partition
: The DDS partition to publish to.An example input file is shown below, as well as here.