3. Vortex DDS Virtual Instruments (VIs)

The DDS LabVIEW Integration provides a function palette with custom virtual instruments (VIs) to model reading and writing data with DDS.

VortexDDS VIs

The Vortex DDS LabVIEW VIs are included in VortexDDS functions palette.

The following DDS VIs are provided:

  • create_participant.vi
  • create_publisher.vi
  • create_subscriber.vi
  • create_writer.vi
  • create_reader.vi
  • wait_historical_data.vi
  • delete_entity.vi

3.1. DDS VIs usage

The typical way to model a DDS application in LabVIEW is as follows:

  • model your DDS topics using IDL
  • using the LabVIEW IDLPP process generate DDS Topic, Read and Write VIs from the IDL file
  • add the generated VIs to your LabVIEW project
  • create a DDS LabVIEW application using the VortexDDS functions palette and the generated VIs from the previous step

3.2. QoS Profiles

In DDS - “The Data-Distribution Service (DDS) relies on the usage of QoS. A QoS (Quality of Service) is a set of characteristics that controls some aspect of the behavior of the DDS Service.”

Each DDS entity VI has an associated QoS profile. By default, the OSPL default profile is used. An XML file that specifies QoS profiles can be used to set the QoS of a DDS entity.

The QoS profile of an entity is set using the qos_uri and qos_profile terminals.

Please see section QoS Provider for more information.

3.3. create_participant.vi

The create_participant VI represents a DDS domain participant entity.

In DDS - “A domain participant represents the local membership of the application in a domain. A domain is a distributed concept that links all the applications able to communicate with each other. It represents a communication plane: only the publishers and subscribers attached to the same domain may interact.”

The domain id is the OSPL default domain id specified in the OSPL configuration file (file pointed by “OSPL_URI” environment variable).

create_participant VI
Terminal Type Optional Name Description Output consumed by
Output no pp DDS Domain Participant entity instance create_publisher.vi create_subscriber.vi RegisterTopic.vi
Input yes qos_uri QoS file uri  
Input yes qos_profile Name of QoS profile  
Input yes error in (no error) Input Error cluster  
Output yes error out Error out cluster  

3.4. create_publisher.vi

The create_publisher VI represents a DDS publisher entity.

In DDS, a publisher is “an object responsible for data distribution. It may publish data of different data types.”

create_publisher VI
Terminal Type Optional Name Description Output consumed by
Input no pp DDS Domain Participant entity instance  
Input yes qos_uri QoS file uri  
Input yes qos_profile Name of QoS profile  
Input yes error in (no error) Input Error cluster  
Output no pub DDS publisher entity instance create_writer.vi
Output yes error out Error out cluster  

3.5. create_subscriber.vi

The create_subscriber VI represents a DDS subscriber entity.

In DDS, a subscriber is “an object responsible for receiving published data and making it available to the receiving application. It may receive and dispatch data of different specified types.”

create_subscriber VI
Terminal Type Optional Name Description Output consumed by
Input no pp DDS Domain Participant entity instance  
Input yes qos_uri QoS file uri  
Input yes qos_profile Name of QoS profile  
Input yes error in (no error) Input Error cluster  
Output no sub DDS subscriber entity instance create_reader.vi
Output yes error out Error out cluster  

3.6. create_writer.vi

The create_writer VI represents a DDS data writer entity.

In DDS - “The DataWriter is the object the application must use to communicate to a publisher the existence and value of data-objects of a given type.”

create_writer VI
Terminal Type Optional Name Description Output consumed by
Input no pub DDS publisher entity instance  
Input no topic DDS Topic entity instance  
Input yes qos_uri QoS file uri  
Input yes qos_profile Name of QoS profile  
Input yes error in (no error) Input Error cluster  
Output no writer DDS writer entity instance write.vi
Output yes error out Error out cluster  

3.7. create_reader.vi

The create_reader VI represents a DDS data reader entity.

In DDS - “To access the received data, the application must use a typed DataReader attached to the subscriber.”

create_reader VI
Terminal Type Optional Name Description Output consumed by
Input no sub DDS subscriber entity instance  
Input no topic DDS Topic entity instance  
Input yes qos_uri QoS file uri  
Input yes qos_profile Name of QoS profile  
Input yes error in (no error) Input Error cluster  
Output no reader DDS reader entity instance read.vi
Output yes error out Error out cluster  

3.8. wait_historical_data.vi

The wait_historical_data VI specifies that the Reader will wait for historical data to arrive. The timeout terminal is for setting time period (in seconds) determining how long the Reader should wait for the historical data. If the timeout is reached, then any remaining historical data may be interleaved with new data.

wait_historical VI
Terminal Type Optional Name Description Output consumed by
Input no reader DDS Reader entity instance  
Input yes historical_timeout wait for historical data timeout (seconds)  
Input yes error in (no error) Input Error cluster  
Output yes error out Error out cluster  

3.9. delete_entity.vi

The delete_entity VI is used to delete a DDS entity. Connect the DDS participant to the entity terminal to delete the participant (pp) in a LabVIEW DDS application.

NOTE: If the user application VI stops due to an error and does not run to completion, the participant entity is not deleted and leaks occur. The participants are deleted once the user closes LabVIEW.
delete_entity VI
Terminal Type Optional Name Description Output consumed by
Input no entity DDS entity instance