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:
- Create directories and populate them with PPS objects by creating files in those directories.
Note:In order to create an object, you need to have write permission in the PPS directory or the appropriate subdirectory.
- Use the open(), then the read() and write() functions to query and change PPS objects.
- Use standard utilities as simple debugging tools.
qnx.comshould use /pps/qnx, while an organization with the domain name
example.netshould use /pps/example.
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
