pips_pubsub

Demonstrates the Sensor service publishing and subscribing through Platform-independent Publish Subscribe (PiPS).

Syntax:

pips_pubsub -p|-s [-t provider_name]
    

Runs on:

QNX Neutrino

Options:

-p

Enable pips_pubsub to run as a publisher. Running pips_pubsub as a publisher means that pips_pubsub publishes sensor data from the Sensor service to subscribers through PiPS with any of its supported providers (e.g. Fast RTPS).

-s

Enable pips_pubsub to run as a subscriber. Running pips_pubsub as a subscriber means that pips_pubsub subscribes to sensor data that's published through the Sensor service through PiPS. In turn, pips_pubsub publishes the data as interim data through the Sensor service.

-t

Specify the name of the provider that's to provide the publish-subscribe service through PiPS. Valid providers are:

  • FASTRTPS — A C++ implementation of the Real Time Publish Subscribe (RTPS) protocol, which provides communications over UDP transport.
  • RTICONNEXTDDS — A connectivity framework based on the Data Distribution Service (DDS) standard and designed for high-performance, scalable, realtime systems.
  • RTIMICRODDS — A version of the RTI Connext framework designed for resource-constrained realtime systems.
  • SOMEIP — The Scalable service-Oriented MiddlewarE over IP (SOME/IP) framework is designed for automotive systems and allows you to exchange large messages without fragmentation.

If you don't specify a provider name, then FASTRTPS is used.

Description:

The pips_pubsub application runs as either a publisher or subscriber, or both. The availability of the providers is determined by what you have installed on your target.

As a publisher, it reads data for each of your configured sensors in your sensor configuration file as different topics. It only publishes the data if there are subscribers subscribed to the data. As a subscriber, pips_pubsub subscribes to the data published from the publisher and in turn publishes the sensor data from the topics as interim data.

Note: You must enable pips_pubsub to run as at least one of publisher or subscriber.

You must have the Sensor service already running before you can start pips_pubsub. The Sensor service must be started with the appropriate sensor and interim data configuration files for your publisher and subscriber. Your interim data configuration file must contain interim data units that directly correspond to sensor units in your sensor configuration file. You can refer to the example pair of sensor and interim data configuration files from your reference images:

For more information on sensor and interim data configuration files, see Sensor configuration file and Interim Data configuration file respectively.

Examples: