Skip to content

Files

logfile_iterator

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Aug 8, 2016
Feb 9, 2017
May 8, 2017

logfile_iterator

This example is powerful and popular. It uses the logfile API to iterate over a specified logfile (plog file) and read the contents. It's important to note that the plog data contains the raw, non-abstracted sensor data as it was recieved on the wire.

In this example a logfile iterator callback is set up, which is called every time a new logfile “record” is seen from the recorded plog file. Within the callback, the application has access to the raw data. This allows the application to access, convert, or otherwise process that data.

This example then prints some details from the header of each of the records.

The logfile iteration happens outside the PolySync time domain, and is execuated as fast as computationally possible.

Dependencies

Packages: libglib2.0-dev

To install on Ubuntu:

sudo apt-get install libglib2.0-dev

Building and running the node

$ cd logfile_iterator
$ make
$ ./bin/polysync-logfile-iterator-c 

For more API examples, visit the "Tutorials" and "Development" sections in the PolySync Help Center here.