QPPS Library

The QPPS library wraps the interface to the Persistent Publish Subscribe (PPS) service with a Qt5 interface. With this design, developers can avoid parsing and setting attributes in the PPS objects used by the platform's middleware services (e.g., navigation, radio) and instead use the higher-level Qt5 interface to configure settings for those services.

The library lets you interact with the middleware services at the level of objects and attributes instead of POSIX system calls, which entail working with memory buffers and file descriptors.

PPS object representation

To access a PPS object through the QPPS library, you simply create an Object instance in the QPPS API, specifying the path of the PPS object (e.g., /pps/services/bluetooth/control) and whether you want your app to publish data to this object, subscribe to updates from this object, or both. Then, you can call the API Object methods to set or retrieve one or many attributes at a time in the underlying PPS object.

In addition, the interface provided by QPPS has these capabilities:

Directory monitoring

You can create DirWatcher objects to monitor directories for PPS object additions and removals. For example, you can track which devices are attached to your QNX CAR system by monitoring the /pps/qnx/mount/ directory, which the device publishers update when the user attaches or detaches a hardware device (e.g., a USB stick).

Simulator mode

You can run the library in simulator mode, which means it reads from and writes to a simulated object instead of PPS objects in a real filesystem. This mode allows you to develop and test HMI apps on a host system where PPS isn't present.

The simulator mode is transparent to QPPS clients. Your Qt app can create an Object that represents a particular PPS path, register the Object with the Simulator object, and then set PPS attributes and receive updates on attribute changes by using the same library calls as when interacting with a real PPS object. Furthermore, you can use the Simulator object to update and remove PPS attributes, similar to a platform service that communicates system state changes through PPS.

You can also can monitor PPS directories in simulator mode by creating and using DirWatcher objects, in the same way you would monitor directories on a system running PPS.