- Host Configuration
- Runtime Node Configuration
- SDF Configuration
- Managing the Runtime
- Logfile Management
- Application Development
- Dynamic Driver Development
- Ecosystem Tools
Access Data from the Bus
This article demonstrates how to access the same data from theusing three applications.
- Studio’s Trace plugin
- Echo command line tool
- Generated C++ node
Generate sample data
This step may be skipped if data is already being published to the bus by one or more nodes.
Start the C
data-generation application to begin publishing sample data to the bus.
$ git clone https://github.com/PolySync/PolySync-Core-C-Examples $ cd PolySync-C-Examples/data-generator $ make $ ./bin/polysync-data-generator-c
Trace extracts the incoming message buffer into an easy to read table.
- Start Studio
- Open the Trace plugin
- From the control panel on the left-side, select message type from the drop-down menu, for example
- The drop down menu contains messages that were seen on the bus at least once
- Click “Start Trace”
- Using the control panel you can select/deselect the message fields you want the Trace plugin to print
Echo C++ Example
Echo is able to subscribe to messages from the bus and print filtered data to the terminal.
$ git clone https://github.com/PolySync/PolySync-Core-CPP-Examples $ cd PolySync-CPP-Examples/Echo $ mkdir build && cd build $ cmake .. && make $ ./polysync-echo -f ps_objects_msg
Echo is also able to print the incoming data to a CSV file. Pass the
-h help flag to learn more.
The node generator is a great tool to get you developing custom nodes in PolySync quickly. It generates the C++ code for a node that subscribes to the specified message types.
$ polysync-generate node -s ps_objects_msg $ cd MyNode $ mkdir build && cd build $ cmake .. && make $ ./MyNode