Object files

PPS objects are implemented as files in a special PPS filesystem. By default, PPS objects appear under /pps, but this path depends on the -m option used when you start pps. There's never more than one instance of a PPS object, so changes to that object are immediately visible to subscribers.

Objects can contain attributes. Each attribute is represented by a line of text in the object's file. So, for example, you might publish an object called Time that represents the time of day and has integer attributes representing the current hour, minute, and second as follows:

@Time
hour::17
minute::04
second::38

In this case, the filename is Time, and each attribute is a text string in that file.

Because PPS objects are represented by files, you can:

Note: In order to avoid possible confusion or conflict in the event that applications from different organizations are integrated to use the same PPS filesystem, we recommend that you use your organization's web domain name to create your directory inside the PPS directory. Thus, QNX Software Systems, whose Internet web domain name is “qnx.com” should use /pps/qnx, while an organization with the domain name “example.net” should use /pps/example.
CAUTION:
PPS objects are accessed through the filesystem and look like normal POSIX files. However, they aren't standard POSIX files, and some PPS behaviors differ from standard POSIX behaviors. For instance, if the allocated read buffer is too small for the data being read in, the read doesn't return a partial result; it fails.

Attribute order

PPS doesn't guarantee that attributes will be read in the same order that they were written to the object. That is, a publisher may write:

@Time
hour::17
minute::04
second::38

This may be read in by a subscriber as, for instance:

@Time
second::38
hour::17
minute::04