Commit graph

26 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
Ian Abbott
4b8bf1aff5 Import DESTDIR in swig/ruby/setup.rb for configurable rbconfig install paths.
Patch from W. Trevor King.
2010-12-14 14:37:18 +00:00
Ian Abbott
309fc0d7f8 Include chanlist length in call to comedi_get_cmd_generic_timed.
Truncate the Float period to an integer.
2010-11-08 11:38:40 +00:00
Ian Abbott
5dcb180472 Specify EXTRA_DIST files in subdirectories explicitly. 2010-03-24 16:45:15 +00:00
Ian Abbott
d7bdd10bd6 Update setup.rb using http://i.loveruby.net/archive/setup/setup-3.4.1.tar.gz 2009-02-18 15:14:53 +00:00
Ian Abbott
24147c08a4 Allow swig to include comedi.h and comedilib.h from comedi.i to avoid
duplication.
2009-01-30 14:51:38 +00:00
Ian Abbott
a68c805998 Fix out-of-tree build of ruby bindings. 2007-11-02 16:03:58 +00: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
ca83900fcf patch from steven.jenkins@ieee.org (Steven Jenkins):
'setup.rb config' calls 'extconf.rb' in the ext directory to build the extension
Makefile. 'extconf.rb' looks for C source files in the directory when it runs,
so SWIG needs to run before 'setup.rb config'. The attached patch makes the
output of SWIG a prerequisite for ext/Makefile.
2004-12-04 18:12:35 +00:00
Frank Mori Hess
0942349bb8 patch from Steven Jenkins <steven.jenkins@ieee.org>:
If configure attempts to build the Ruby extension on a system without a previous
installation of comedilib, compilation fails because gcc can't find comedilib.h.

The attached patch adds the distribution include directory to the gcc search
path when compiling the extension.
2004-11-23 01:18:14 +00:00
Frank Mori Hess
366b8b5da0 fix handling of swig so it is run at compile time instead of when
building tarball (due to possible dependence on swig library).
2004-09-27 03:27:43 +00:00
David Schleef
f8389c58f5 Fix distcheck 2004-08-11 21:37:46 +00:00
Frank Mori Hess
9a84e6a44b use setup.rb for clean-local and distclean-local 2004-06-20 03:36:33 +00:00
Frank Mori Hess
06a5a7846a added some files to EXTRA_DIST that were left out of tarball 2004-06-19 17:55:38 +00:00
Frank Mori Hess
d20c5e18c9 fix compilation when builddir != srcdir 2004-06-19 15:06:00 +00:00
David Schleef
2541e7b171 distcheck fixes 2004-06-12 20:56:06 +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
2fe5055c25 clean up object files 2004-01-17 19:18:08 +00:00
Frank Mori Hess
3e81d9e11e update README to reflect automake support for compilation/installation 2004-01-17 19:17:42 +00:00
Frank Mori Hess
b8d7e64c4d more autoconf support for ruby binding 2004-01-17 19:08:46 +00:00
Frank Mori Hess
a3005f2922 start of automake support for ruby extension 2004-01-17 17:11:17 +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
Frank Mori Hess
a64c59b46d make cvs checkout compilable by people without swig 2004-01-08 03:10:32 +00:00
Frank Mori Hess
bc7a0262b2 moved SWIG code from python directory to new swig directory. Added
beginnings of support for ruby swig binding
2004-01-04 16:56:35 +00:00