libsigrok

From sigrok
Jump to navigation Jump to search

libsigrok is a shared library written in C, which provides the basic hardware access drivers for logic analyzers and other supported devices, as well as input/output file format support.

Getting the code

$ git clone git://sigrok.org/libsigrok

You can also browse the source code via gitweb.

Distribution packages

See Downloads.

Building from source

See Building.

Language bindings

libsigrok ships with a framework for different language bindings based on SWIG and doxygen. Currently supported languages include C++, Python and Java (others can be added).

C++

See the C++ bindings API documentation for details on how to use the bindings.

The C++ bindings are used by PulseView, for example.

Python

See the Python bindings API documentation for details on how to use the bindings.

The Python bindings are used by sigrok-meter, for example.

Java

See the Java bindings API documentation for details on how to use the bindings.

The Java bindings are not yet used by any project hosted at sigrok.org. Please let us know if you're using the Java bindings in any of your own projects!

collectd plugin

collectd graph

There is a plugin for the collectd system statistics collecting daemon.

See this blogpost or the collectd wiki page for details.

An example config file snippet for collectd and libsigrok usage could look e.g. like this:

LoadPlugin "sigrok"
<Plugin "sigrok">
   LogLevel 3
   <Device "Sound level">
       Driver "cem-dt-885x"
       conn "/dev/ttyUSB3"
       MinimumInterval 1
   </Device>
   <Device "Temperature">
       Driver "uni-t-ut32x"
       conn "1a86.e008"
       MinimumInterval 1
   </Device>
</Plugin>

Resources