Difference between revisions of "Libsigrok"

From sigrok
Jump to navigation Jump to search
(Python bindings)
(collectd)
Line 16: Line 16:
See the respective OS-specific page, e.g. [[Linux]], [[Windows]], [[Mac OS X]], or [[FreeBSD]].
See the respective OS-specific page, e.g. [[Linux]], [[Windows]], [[Mac OS X]], or [[FreeBSD]].


== Python bindings ==
== Language bindings ==
 
=== Python ===


There are experimental (still work in progress) [http://sigrok.org/gitweb/?p=libsigrok.git;a=tree;f=bindings/python Python bindings] for libsigrok in git.
There are experimental (still work in progress) [http://sigrok.org/gitweb/?p=libsigrok.git;a=tree;f=bindings/python Python bindings] for libsigrok in git.
Line 26: Line 28:
* triggers
* triggers
* session load/save
* session load/save
== collectd plugin ==
[[File:Collectd spl.png|320px|right|collectd graph]]
There is a plugin for the [http://collectd.org/ collectd] system statistics collecting daemon.
See [http://www.sigrok.org/blog/collecting-measurements this blogpost] or the [https://collectd.org/wiki/index.php/Plugin:sigrok collectd wiki page] for details.
An example config file snippet for collectd and libsigrok usage could look e.g. like this:
<small>
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>
</small>


== Resources ==
== Resources ==

Revision as of 23:42, 21 August 2013

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 the respective OS-specific page, e.g. Linux, Windows, Mac OS X, or FreeBSD.

Language bindings

Python

There are experimental (still work in progress) Python bindings for libsigrok in git.

A few items that still need to be done:

  • probes (this needs the probe_groups branch to get merged in; Python bindings for that API is ready)
  • input/output formats
  • triggers
  • session load/save

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