Commit graph

6 commits

Author SHA1 Message Date
Ian Abbott
aff4937e03 Added some more buffer position functions for use with mmap
Added comedi_get_buffer_read_offset(), comedi_get_buffer_write_offset(),
comedi_get_buffer_read_count(), and comedi_get_buffer_write_count().

comedi_get_buffer_read_offset() is the same as
comedi_get_buffer_offset(), which has now been documented as deprecated,
but is currently still declared in "comedilib.h" by default.  It gets
the read position within the buffer as an offset from the start of the
buffer (modulo the buffer size).

comedi_get_buffer_write_offset() gets the write position within the
buffer as an offset from the start of the buffer (modulo the buffer
size).

comedi_get_buffer_read_count() gets the number of bytes read from the
buffer, modulo UINT_MAX+1.

comedi_get_buffer_write_count() gets the number of bytes written to the
buffer, modulo UINT_MAX+1.
2016-05-13 15:14:47 +01:00
Ian Abbott
ae03f3932e swig/ruby: update bindings
Add methods for several Comedilib functions that are currently absent
from the Ruby bindings.

Rename the comedi_to_physical, comedi_from_physical, and
cleanup_calibration_file methods to to_physical, from_physical, and
cleanup_calibration, either for consistency (comedi_to_physical and
comedi_from_physical) or because they are wrong
(cleanup_cleanup_calibration_file).

TODO: Add a binding for comedi_get_clock_source() as well, but I'm not
sure how to handle multiple output parameters.
2016-05-12 19:35:40 +01:00
Frank Mori Hess
9e4c195b92 Patch from steven.jenkins@ieee.org (Steven Jenkins):
The SWIG interface file (swig/comedi.i) is out of date with respect to comedi.h
and comedilib.h. I've attempted to make it current by applying most of the
changes since 1.22 (both headers).

My ability to test is limited. The swig/ruby/demo/cmd application runs
successfully using the comedi_test device. The python extension library
compiles, but that's as far as I've taken it.
2007-10-15 00:02:49 +00:00
Frank Mori Hess
dfc1ffbdba update to ruby binding from steven jenkins:
Better exception handling. More consistent handling of return values. Updated
documentation.
2004-03-29 01:39:36 +00:00
Frank Mori Hess
41ce3f70a0 patch from Steven Jenkins -------
The attached patch updates files in comedilib/swig/ruby. lib/comedi.rb is
updated to raise Ruby exceptions as indicated by the comedilib API
documentation. README and demo/cmd are updated accordingly.
2004-03-06 22:13:37 +00:00
Frank Mori Hess
cac5a2eac6 ruby binding and example from Steven Jenkins. I still need to tweak
the Makefiles a bit to integrate it properly
2004-01-17 16:33:09 +00:00