This example shows simple publish and subscribe functionality in PolySync, the most common form of node-to-node communication in a PolySync system.
It publishes an empty
ps_event_msg to show how the publish functionality works in PolySync.
It also subscribes to all diagnostic messages on the PolySync bus, and then prints the info each diagnostic message contains as they are received in real time.
To install on Ubuntu:
sudo apt-get install libglib2.0-dev
Building and running the node
$ cd publish_subscribe $ make $ ./bin/polysync-publish-subscribe-c
For more API examples, visit the "Tutorials" and "Development" sections in the PolySync Help Center here.