Updated: April 19, 2023 |
PPS clients can subscribe to multiple objects, and PPS objects can have multiple subscribers. When a publisher changes an object, all clients subscribed to that object are informed of the change.
To subscribe to an object, a client simply calls open() for the object with O_RDONLY to subscribe only, or O_RDWR to publish and subscribe. The subscriber can then query the object with a read() call. A read returns the length of the data read, in bytes.
It's safe for more than one subscriber to read from the objects because the pps manager guarantees that each PPS read() is atomic.
@Time hour::17 minute::04 second::38This may be read in by a subscriber as, for instance:
@Time second::38 hour::17 minute::04
For information about routines that will help you parse attributes, see the PPS Encoding and Decoding API and PPS API reference chapters.