~ubuntu-branches/ubuntu/intrepid/comedilib/intrepid

« back to all changes in this revision

Viewing changes to swig/ruby/ext/comedi_ruby_wrap.c

  • Committer: Bazaar Package Importer
  • Author(s): David Schleef
  • Date: 2004-11-04 11:43:51 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20041104114351-a50kaei5yamka8r6
Tags: 0.7.22-2
It helps if the shared library is actually in the package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* ----------------------------------------------------------------------------
 
2
 * This file was automatically generated by SWIG (http://www.swig.org).
 
3
 * Version 1.3.21
 
4
 * 
 
5
 * This file is not intended to be easily readable and contains a number of 
 
6
 * coding conventions designed to improve portability and efficiency. Do not make
 
7
 * changes to this file unless you know what you are doing--modify the SWIG 
 
8
 * interface file instead. 
 
9
 * ----------------------------------------------------------------------------- */
 
10
 
 
11
/* ruby.swg */
 
12
/* Implementation : RUBY */
 
13
#define SWIGRUBY 1
 
14
 
 
15
#include "ruby.h"
 
16
 
 
17
/* Flags for pointer conversion */
 
18
#define SWIG_POINTER_EXCEPTION     0x1
 
19
#define SWIG_POINTER_DISOWN        0x2
 
20
 
 
21
#define NUM2USHRT(n) (\
 
22
    (0 <= NUM2UINT(n) && NUM2UINT(n) <= USHRT_MAX)\
 
23
    ? (unsigned short) NUM2UINT(n) \
 
24
    : (rb_raise(rb_eArgError, "integer %d out of range of `unsigned short'",\
 
25
               NUM2UINT(n)), (short)0)\
 
26
)
 
27
 
 
28
#define NUM2SHRT(n) (\
 
29
    (SHRT_MIN <= NUM2INT(n) && NUM2INT(n) <= SHRT_MAX)\
 
30
    ? (short)NUM2INT(n)\
 
31
    : (rb_raise(rb_eArgError, "integer %d out of range of `short'",\
 
32
               NUM2INT(n)), (short)0)\
 
33
)
 
34
 
 
35
/* Ruby 1.7 defines NUM2LL(), LL2NUM() and ULL2NUM() macros */
 
36
#ifndef NUM2LL
 
37
#define NUM2LL(x) NUM2LONG((x))
 
38
#endif
 
39
#ifndef LL2NUM
 
40
#define LL2NUM(x) INT2NUM((long) (x))
 
41
#endif
 
42
#ifndef ULL2NUM
 
43
#define ULL2NUM(x) UINT2NUM((unsigned long) (x))
 
44
#endif
 
45
 
 
46
/* Ruby 1.7 doesn't (yet) define NUM2ULL() */
 
47
#ifndef NUM2ULL
 
48
#ifdef HAVE_LONG_LONG
 
49
#define NUM2ULL(x) rb_num2ull((x))
 
50
#else
 
51
#define NUM2ULL(x) NUM2ULONG(x)
 
52
#endif
 
53
#endif
 
54
 
 
55
/*
 
56
 * Need to be very careful about how these macros are defined, especially
 
57
 * when compiling C++ code or C code with an ANSI C compiler.
 
58
 *
 
59
 * VALUEFUNC(f) is a macro used to typecast a C function that implements
 
60
 * a Ruby method so that it can be passed as an argument to API functions
 
61
 * like rb_define_method() and rb_define_singleton_method().
 
62
 *
 
63
 * VOIDFUNC(f) is a macro used to typecast a C function that implements
 
64
 * either the "mark" or "free" stuff for a Ruby Data object, so that it
 
65
 * can be passed as an argument to API functions like Data_Wrap_Struct()
 
66
 * and Data_Make_Struct().
 
67
 */
 
68
 
 
69
#ifdef __cplusplus
 
70
#  ifndef RUBY_METHOD_FUNC /* These definitions should work for Ruby 1.4.6 */
 
71
#    define VALUEFUNC(f) ((VALUE (*)()) f)
 
72
#    define VOIDFUNC(f)  ((void (*)()) f)
 
73
#  else
 
74
#    ifndef ANYARGS /* These definitions should work for Ruby 1.6 */
 
75
#      define VALUEFUNC(f) ((VALUE (*)()) f)
 
76
#      define VOIDFUNC(f)  ((RUBY_DATA_FUNC) f)
 
77
#    else /* These definitions should work for Ruby 1.7 */
 
78
#      define VALUEFUNC(f) ((VALUE (*)(ANYARGS)) f)
 
79
#      define VOIDFUNC(f)  ((RUBY_DATA_FUNC) f)
 
80
#    endif
 
81
#  endif
 
82
#else
 
83
#  define VALUEFUNC(f) (f)
 
84
#  define VOIDFUNC(f) (f)
 
85
#endif
 
86
 
 
87
typedef struct {
 
88
  VALUE klass;
 
89
  VALUE mImpl;
 
90
  void  (*mark)(void *);
 
91
  void  (*destroy)(void *);
 
92
} swig_class;
 
93
 
 
94
/* Don't use for expressions have side effect */
 
95
#ifndef RB_STRING_VALUE
 
96
#define RB_STRING_VALUE(s) (TYPE(s) == T_STRING ? (s) : (*(volatile VALUE *)&(s) = rb_str_to_str(s)))
 
97
#endif
 
98
#ifndef StringValue
 
99
#define StringValue(s) RB_STRING_VALUE(s)
 
100
#endif
 
101
#ifndef StringValuePtr
 
102
#define StringValuePtr(s) RSTRING(RB_STRING_VALUE(s))->ptr
 
103
#endif
 
104
#ifndef StringValueLen
 
105
#define StringValueLen(s) RSTRING(RB_STRING_VALUE(s))->len
 
106
#endif
 
107
#ifndef SafeStringValue
 
108
#define SafeStringValue(v) do {\
 
109
    StringValue(v);\
 
110
    rb_check_safe_str(v);\
 
111
} while (0)
 
112
#endif
 
113
 
 
114
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
 
115
#define rb_define_alloc_func(klass, func) rb_define_singleton_method((klass), "new", VALUEFUNC((func)), -1)
 
116
#define rb_undef_alloc_func(klass) rb_undef_method(CLASS_OF((klass)), "new")
 
117
#endif
 
118
 
 
119
/* Contract support */
 
120
 
 
121
#define SWIG_contract_assert(expr, msg) if (!(expr)) { rb_raise(rb_eRuntimeError, (char *) msg ); } else
 
122
 
 
123
 
 
124
/*************************************************************** -*- c -*-
 
125
 * ruby/precommon.swg
 
126
 *
 
127
 * Rename all exported symbols from common.swg, to avoid symbol
 
128
 * clashes if multiple interpreters are included
 
129
 *
 
130
 ************************************************************************/
 
131
 
 
132
#define SWIG_TypeRegister    SWIG_Ruby_TypeRegister
 
133
#define SWIG_TypeCheck       SWIG_Ruby_TypeCheck
 
134
#define SWIG_TypeCast        SWIG_Ruby_TypeCast
 
135
#define SWIG_TypeDynamicCast SWIG_Ruby_TypeDynamicCast
 
136
#define SWIG_TypeName        SWIG_Ruby_TypeName
 
137
#define SWIG_TypeQuery       SWIG_Ruby_TypeQuery
 
138
#define SWIG_TypeClientData  SWIG_Ruby_TypeClientData
 
139
#define SWIG_PackData        SWIG_Ruby_PackData 
 
140
#define SWIG_UnpackData      SWIG_Ruby_UnpackData 
 
141
 
 
142
/* Also rename all exported symbols from rubydef.swig */
 
143
 
 
144
/* Common SWIG API */
 
145
#define SWIG_ConvertPtr(obj, pp, type, flags) \
 
146
  SWIG_Ruby_ConvertPtr(obj, pp, type, flags)
 
147
#define SWIG_NewPointerObj(p, type, flags) \
 
148
  SWIG_Ruby_NewPointerObj(p, type, flags)
 
149
#define SWIG_MustGetPtr(p, type, argnum, flags) \
 
150
  SWIG_Ruby_MustGetPtr(p, type, argnum, flags)
 
151
 
 
152
/* Ruby-specific SWIG API */
 
153
 
 
154
#define SWIG_InitRuntime() \
 
155
  SWIG_Ruby_InitRuntime()
 
156
#define SWIG_define_class(ty) \
 
157
  SWIG_Ruby_define_class(ty)
 
158
#define SWIG_NewClassInstance(value, ty) \
 
159
  SWIG_Ruby_NewClassInstance(value, ty)
 
160
#define SWIG_MangleStr(value) \
 
161
  SWIG_Ruby_MangleStr(value)
 
162
#define SWIG_CheckConvert(value, ty) \
 
163
  SWIG_Ruby_CheckConvert(value, ty)
 
164
#define SWIG_NewPackedObj(ptr, sz, ty) \
 
165
  SWIG_Ruby_NewPackedObj(ptr, sz, ty)
 
166
#define SWIG_ConvertPacked(obj, ptr, sz, ty, flags) \
 
167
  SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty, flags)
 
168
 
 
169
 
 
170
/***********************************************************************
 
171
 * common.swg
 
172
 *
 
173
 *     This file contains generic SWIG runtime support for pointer
 
174
 *     type checking as well as a few commonly used macros to control
 
175
 *     external linkage.
 
176
 *
 
177
 * Author : David Beazley (beazley@cs.uchicago.edu)
 
178
 *
 
179
 * Copyright (c) 1999-2000, The University of Chicago
 
180
 * 
 
181
 * This file may be freely redistributed without license or fee provided
 
182
 * this copyright message remains intact.
 
183
 ************************************************************************/
 
184
 
 
185
#include <string.h>
 
186
 
 
187
#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
 
188
#  if defined(_MSC_VER) || defined(__GNUC__)
 
189
#    if defined(STATIC_LINKED)
 
190
#      define SWIGEXPORT(a) a
 
191
#      define SWIGIMPORT(a) extern a
 
192
#    else
 
193
#      define SWIGEXPORT(a) __declspec(dllexport) a
 
194
#      define SWIGIMPORT(a) extern a
 
195
#    endif
 
196
#  else
 
197
#    if defined(__BORLANDC__)
 
198
#      define SWIGEXPORT(a) a _export
 
199
#      define SWIGIMPORT(a) a _export
 
200
#    else
 
201
#      define SWIGEXPORT(a) a
 
202
#      define SWIGIMPORT(a) a
 
203
#    endif
 
204
#  endif
 
205
#else
 
206
#  define SWIGEXPORT(a) a
 
207
#  define SWIGIMPORT(a) a
 
208
#endif
 
209
 
 
210
#ifdef SWIG_GLOBAL
 
211
#  define SWIGRUNTIME(a) SWIGEXPORT(a)
 
212
#else
 
213
#  define SWIGRUNTIME(a) static a
 
214
#endif
 
215
 
 
216
#ifdef __cplusplus
 
217
extern "C" {
 
218
#endif
 
219
 
 
220
typedef void *(*swig_converter_func)(void *);
 
221
typedef struct swig_type_info *(*swig_dycast_func)(void **);
 
222
 
 
223
typedef struct swig_type_info {
 
224
  const char             *name;
 
225
  swig_converter_func     converter;
 
226
  const char             *str;
 
227
  void                   *clientdata;
 
228
  swig_dycast_func        dcast;
 
229
  struct swig_type_info  *next;
 
230
  struct swig_type_info  *prev;
 
231
} swig_type_info;
 
232
 
 
233
#ifdef SWIG_NOINCLUDE
 
234
 
 
235
SWIGIMPORT(swig_type_info *) SWIG_TypeRegister(swig_type_info *);
 
236
SWIGIMPORT(swig_type_info *) SWIG_TypeCheck(char *c, swig_type_info *);
 
237
SWIGIMPORT(void *)           SWIG_TypeCast(swig_type_info *, void *);
 
238
SWIGIMPORT(swig_type_info *) SWIG_TypeDynamicCast(swig_type_info *, void **);
 
239
SWIGIMPORT(const char *)     SWIG_TypeName(const swig_type_info *);
 
240
SWIGIMPORT(swig_type_info *) SWIG_TypeQuery(const char *);
 
241
SWIGIMPORT(void)             SWIG_TypeClientData(swig_type_info *, void *);
 
242
SWIGIMPORT(char *)           SWIG_PackData(char *, void *, int);
 
243
SWIGIMPORT(char *)           SWIG_UnpackData(char *, void *, int);
 
244
 
 
245
#else
 
246
 
 
247
static swig_type_info *swig_type_list = 0;
 
248
 
 
249
/* Register a type mapping with the type-checking */
 
250
SWIGRUNTIME(swig_type_info *)
 
251
SWIG_TypeRegister(swig_type_info *ti) {
 
252
  swig_type_info *tc, *head, *ret, *next;
 
253
  /* Check to see if this type has already been registered */
 
254
  tc = swig_type_list;
 
255
  while (tc) {
 
256
    if (strcmp(tc->name, ti->name) == 0) {
 
257
      /* Already exists in the table.  Just add additional types to the list */
 
258
      if (tc->clientdata) ti->clientdata = tc->clientdata;
 
259
      head = tc;
 
260
      next = tc->next;
 
261
      goto l1;
 
262
    }
 
263
    tc = tc->prev;
 
264
  }
 
265
  head = ti;
 
266
  next = 0;
 
267
 
 
268
  /* Place in list */
 
269
  ti->prev = swig_type_list;
 
270
  swig_type_list = ti;
 
271
 
 
272
  /* Build linked lists */
 
273
  l1:
 
274
  ret = head;
 
275
  tc = ti + 1;
 
276
  /* Patch up the rest of the links */
 
277
  while (tc->name) {
 
278
    head->next = tc;
 
279
    tc->prev = head;
 
280
    head = tc;
 
281
    tc++;
 
282
  }
 
283
  if (next) next->prev = head;
 
284
  head->next = next;
 
285
  return ret;
 
286
}
 
287
 
 
288
/* Check the typename */
 
289
SWIGRUNTIME(swig_type_info *) 
 
290
SWIG_TypeCheck(char *c, swig_type_info *ty) {
 
291
  swig_type_info *s;
 
292
  if (!ty) return 0;        /* Void pointer */
 
293
  s = ty->next;             /* First element always just a name */
 
294
  do {
 
295
    if (strcmp(s->name,c) == 0) {
 
296
      if (s == ty->next) return s;
 
297
      /* Move s to the top of the linked list */
 
298
      s->prev->next = s->next;
 
299
      if (s->next) {
 
300
        s->next->prev = s->prev;
 
301
      }
 
302
      /* Insert s as second element in the list */
 
303
      s->next = ty->next;
 
304
      if (ty->next) ty->next->prev = s;
 
305
      ty->next = s;
 
306
      s->prev = ty;
 
307
      return s;
 
308
    }
 
309
    s = s->next;
 
310
  } while (s && (s != ty->next));
 
311
  return 0;
 
312
}
 
313
 
 
314
/* Cast a pointer up an inheritance hierarchy */
 
315
SWIGRUNTIME(void *) 
 
316
SWIG_TypeCast(swig_type_info *ty, void *ptr) {
 
317
  if ((!ty) || (!ty->converter)) return ptr;
 
318
  return (*ty->converter)(ptr);
 
319
}
 
320
 
 
321
/* Dynamic pointer casting. Down an inheritance hierarchy */
 
322
SWIGRUNTIME(swig_type_info *) 
 
323
SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
 
324
  swig_type_info *lastty = ty;
 
325
  if (!ty || !ty->dcast) return ty;
 
326
  while (ty && (ty->dcast)) {
 
327
    ty = (*ty->dcast)(ptr);
 
328
    if (ty) lastty = ty;
 
329
  }
 
330
  return lastty;
 
331
}
 
332
 
 
333
/* Return the name associated with this type */
 
334
SWIGRUNTIME(const char *)
 
335
SWIG_TypeName(const swig_type_info *ty) {
 
336
  return ty->name;
 
337
}
 
338
 
 
339
/* Search for a swig_type_info structure */
 
340
SWIGRUNTIME(swig_type_info *)
 
341
SWIG_TypeQuery(const char *name) {
 
342
  swig_type_info *ty = swig_type_list;
 
343
  while (ty) {
 
344
    if (ty->str && (strcmp(name,ty->str) == 0)) return ty;
 
345
    if (ty->name && (strcmp(name,ty->name) == 0)) return ty;
 
346
    ty = ty->prev;
 
347
  }
 
348
  return 0;
 
349
}
 
350
 
 
351
/* Set the clientdata field for a type */
 
352
SWIGRUNTIME(void)
 
353
SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
 
354
  swig_type_info *tc, *equiv;
 
355
  if (ti->clientdata == clientdata) return;
 
356
  ti->clientdata = clientdata;
 
357
  equiv = ti->next;
 
358
  while (equiv) {
 
359
    if (!equiv->converter) {
 
360
      tc = swig_type_list;
 
361
      while (tc) {
 
362
        if ((strcmp(tc->name, equiv->name) == 0))
 
363
          SWIG_TypeClientData(tc,clientdata);
 
364
        tc = tc->prev;
 
365
      }
 
366
    }
 
367
    equiv = equiv->next;
 
368
  }
 
369
}
 
370
 
 
371
/* Pack binary data into a string */
 
372
SWIGRUNTIME(char *)
 
373
SWIG_PackData(char *c, void *ptr, int sz) {
 
374
  static char hex[17] = "0123456789abcdef";
 
375
  int i;
 
376
  unsigned char *u = (unsigned char *) ptr;
 
377
  register unsigned char uu;
 
378
  for (i = 0; i < sz; i++,u++) {
 
379
    uu = *u;
 
380
    *(c++) = hex[(uu & 0xf0) >> 4];
 
381
    *(c++) = hex[uu & 0xf];
 
382
  }
 
383
  return c;
 
384
}
 
385
 
 
386
/* Unpack binary data from a string */
 
387
SWIGRUNTIME(char *)
 
388
SWIG_UnpackData(char *c, void *ptr, int sz) {
 
389
  register unsigned char uu = 0;
 
390
  register int d;
 
391
  unsigned char *u = (unsigned char *) ptr;
 
392
  int i;
 
393
  for (i = 0; i < sz; i++, u++) {
 
394
    d = *(c++);
 
395
    if ((d >= '0') && (d <= '9'))
 
396
      uu = ((d - '0') << 4);
 
397
    else if ((d >= 'a') && (d <= 'f'))
 
398
      uu = ((d - ('a'-10)) << 4);
 
399
    d = *(c++);
 
400
    if ((d >= '0') && (d <= '9'))
 
401
      uu |= (d - '0');
 
402
    else if ((d >= 'a') && (d <= 'f'))
 
403
      uu |= (d - ('a'-10));
 
404
    *u = uu;
 
405
  }
 
406
  return c;
 
407
}
 
408
 
 
409
#endif
 
410
 
 
411
#ifdef __cplusplus
 
412
}
 
413
#endif
 
414
 
 
415
/* rubydef.swg */
 
416
#ifdef __cplusplus
 
417
extern "C" {
 
418
#endif
 
419
 
 
420
static VALUE _mSWIG = Qnil;
 
421
static VALUE _cSWIG_Pointer = Qnil;
 
422
 
 
423
/* Initialize Ruby runtime support */
 
424
SWIGRUNTIME(void)
 
425
SWIG_Ruby_InitRuntime(void)
 
426
{
 
427
    if (_mSWIG == Qnil) {
 
428
        _mSWIG = rb_define_module("SWIG");
 
429
    }
 
430
}
 
431
 
 
432
/* Define Ruby class for C type */
 
433
SWIGRUNTIME(void)
 
434
SWIG_Ruby_define_class(swig_type_info *type)
 
435
{
 
436
    VALUE klass;
 
437
    char *klass_name = (char *) malloc(4 + strlen(type->name) + 1);
 
438
    sprintf(klass_name, "TYPE%s", type->name);
 
439
    if (NIL_P(_cSWIG_Pointer)) {
 
440
        _cSWIG_Pointer = rb_define_class_under(_mSWIG, "Pointer", rb_cObject);
 
441
        rb_undef_method(CLASS_OF(_cSWIG_Pointer), "new");
 
442
    }
 
443
    klass = rb_define_class_under(_mSWIG, klass_name, _cSWIG_Pointer);
 
444
    free((void *) klass_name);
 
445
}
 
446
 
 
447
/* Create a new pointer object */
 
448
SWIGRUNTIME(VALUE)
 
449
SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int own)
 
450
{
 
451
    char *klass_name;
 
452
    swig_class *sklass;
 
453
    VALUE klass;
 
454
    VALUE obj;
 
455
    
 
456
    if (!ptr)
 
457
        return Qnil;
 
458
    
 
459
    if (type->clientdata) {
 
460
      sklass = (swig_class *) type->clientdata;
 
461
      obj = Data_Wrap_Struct(sklass->klass, VOIDFUNC(sklass->mark), (own ? VOIDFUNC(sklass->destroy) : 0), ptr);
 
462
    } else {
 
463
      klass_name = (char *) malloc(4 + strlen(type->name) + 1);
 
464
      sprintf(klass_name, "TYPE%s", type->name);
 
465
      klass = rb_const_get(_mSWIG, rb_intern(klass_name));
 
466
      free((void *) klass_name);
 
467
      obj = Data_Wrap_Struct(klass, 0, 0, ptr);
 
468
    }
 
469
    rb_iv_set(obj, "__swigtype__", rb_str_new2(type->name));
 
470
    return obj;
 
471
}
 
472
 
 
473
/* Create a new class instance (always owned) */
 
474
SWIGRUNTIME(VALUE)
 
475
SWIG_Ruby_NewClassInstance(VALUE klass, swig_type_info *type)
 
476
{
 
477
    VALUE obj;
 
478
    swig_class *sklass = (swig_class *) type->clientdata;
 
479
    obj = Data_Wrap_Struct(klass, VOIDFUNC(sklass->mark), VOIDFUNC(sklass->destroy), 0);
 
480
    rb_iv_set(obj, "__swigtype__", rb_str_new2(type->name));
 
481
    return obj;
 
482
}
 
483
 
 
484
/* Get type mangle from class name */
 
485
SWIGRUNTIME(char *)
 
486
SWIG_Ruby_MangleStr(VALUE obj)
 
487
{
 
488
  VALUE stype = rb_iv_get(obj, "__swigtype__");
 
489
  return StringValuePtr(stype);
 
490
}
 
491
 
 
492
/* Convert a pointer value */
 
493
SWIGRUNTIME(int)
 
494
SWIG_Ruby_ConvertPtr(VALUE obj, void **ptr, swig_type_info *ty, int flags)
 
495
{
 
496
  char *c;
 
497
  swig_type_info *tc;
 
498
 
 
499
  /* Grab the pointer */
 
500
  if (NIL_P(obj)) {
 
501
    *ptr = 0;
 
502
    return 0;
 
503
  } else {
 
504
    Data_Get_Struct(obj, void, *ptr);
 
505
  }
 
506
  
 
507
  /* Do type-checking if type info was provided */
 
508
  if (ty) {
 
509
    if (ty->clientdata) {
 
510
        if (rb_obj_is_kind_of(obj, ((swig_class *) (ty->clientdata))->klass)) {
 
511
          if (*ptr == 0)
 
512
            rb_raise(rb_eRuntimeError, "This %s already released", ty->str);
 
513
          return 0;
 
514
        }
 
515
    }
 
516
    if ((c = SWIG_MangleStr(obj)) == NULL) {
 
517
      if (flags & SWIG_POINTER_EXCEPTION)
 
518
        rb_raise(rb_eTypeError, "Expected %s", ty->str);
 
519
      else
 
520
        return -1;
 
521
    }
 
522
    tc = SWIG_TypeCheck(c, ty);
 
523
    if (!tc) {
 
524
      if (flags & SWIG_POINTER_EXCEPTION)
 
525
        rb_raise(rb_eTypeError, "Expected %s", ty->str);
 
526
      else
 
527
        return -1;
 
528
    }
 
529
    *ptr = SWIG_TypeCast(tc, *ptr);
 
530
  }
 
531
  return 0;
 
532
}
 
533
 
 
534
/* Convert a pointer value, signal an exception on a type mismatch */
 
535
SWIGRUNTIME(void *)
 
536
SWIG_Ruby_MustGetPtr(VALUE obj, swig_type_info *ty, int argnum, int flags)
 
537
{
 
538
  void *result;
 
539
  SWIG_ConvertPtr(obj, &result, ty, flags | SWIG_POINTER_EXCEPTION);
 
540
  return result;
 
541
}
 
542
 
 
543
/* Check convert */
 
544
SWIGRUNTIME(int)
 
545
SWIG_Ruby_CheckConvert(VALUE obj, swig_type_info *ty)
 
546
{
 
547
  char *c = SWIG_MangleStr(obj);
 
548
  if (!c)
 
549
    return 0;
 
550
  return SWIG_TypeCheck(c,ty) != 0;
 
551
}
 
552
 
 
553
SWIGRUNTIME(VALUE)
 
554
SWIG_Ruby_NewPackedObj(void *ptr, int sz, swig_type_info *type) {
 
555
  char result[1024];
 
556
  char *r = result;
 
557
  if ((2*sz + 1 + strlen(type->name)) > 1000) return 0;
 
558
  *(r++) = '_';
 
559
  r = SWIG_PackData(r, ptr, sz);
 
560
  strcpy(r, type->name);
 
561
  return rb_str_new2(result);
 
562
}
 
563
 
 
564
/* Convert a packed value value */
 
565
SWIGRUNTIME(void)
 
566
SWIG_Ruby_ConvertPacked(VALUE obj, void *ptr, int sz, swig_type_info *ty, int flags) {
 
567
  swig_type_info *tc;
 
568
  char  *c;
 
569
 
 
570
  if (TYPE(obj) != T_STRING) goto type_error;
 
571
  c = StringValuePtr(obj);
 
572
  /* Pointer values must start with leading underscore */
 
573
  if (*c != '_') goto type_error;
 
574
  c++;
 
575
  c = SWIG_UnpackData(c, ptr, sz);
 
576
  if (ty) {
 
577
    tc = SWIG_TypeCheck(c, ty);
 
578
    if (!tc) goto type_error;
 
579
  }
 
580
  return;
 
581
 
 
582
type_error:
 
583
 
 
584
  if (flags) {
 
585
    if (ty) {
 
586
      rb_raise(rb_eTypeError, "Type error. Expected %s", ty->name);
 
587
    } else {
 
588
      rb_raise(rb_eTypeError, "Expected a pointer");
 
589
    }
 
590
  }
 
591
}
 
592
 
 
593
#ifdef __cplusplus
 
594
}
 
595
#endif
 
596
 
 
597
 
 
598
 
 
599
/* -------- TYPES TABLE (BEGIN) -------- */
 
600
 
 
601
#define  SWIGTYPE_p_lsampl_t swig_types[0] 
 
602
#define  SWIGTYPE_p_sampl_t swig_types[1] 
 
603
#define  SWIGTYPE_p_comedi_calibration_setting_t swig_types[2] 
 
604
#define  SWIGTYPE_p_double swig_types[3] 
 
605
#define  SWIGTYPE_p_comedi_range swig_types[4] 
 
606
#define  SWIGTYPE_p_unsigned_int swig_types[5] 
 
607
#define  SWIGTYPE_p_void swig_types[6] 
 
608
#define  SWIGTYPE_p_comedi_subdinfo_struct swig_types[7] 
 
609
#define  SWIGTYPE_p_comedi_krange_struct swig_types[8] 
 
610
#define  SWIGTYPE_p_comedi_rangeinfo_struct swig_types[9] 
 
611
#define  SWIGTYPE_p_comedi_chaninfo_struct swig_types[10] 
 
612
#define  SWIGTYPE_p_comedi_cmd_struct swig_types[11] 
 
613
#define  SWIGTYPE_p_comedi_insnlist_struct swig_types[12] 
 
614
#define  SWIGTYPE_p_comedi_insn_struct swig_types[13] 
 
615
#define  SWIGTYPE_p_comedi_trig_struct swig_types[14] 
 
616
#define  SWIGTYPE_p_comedi_devinfo_struct swig_types[15] 
 
617
#define  SWIGTYPE_p_char swig_types[16] 
 
618
#define  SWIGTYPE_p_comedi_devconfig_struct swig_types[17] 
 
619
#define  SWIGTYPE_p_comedi_bufconfig_struct swig_types[18] 
 
620
#define  SWIGTYPE_p_comedi_bufinfo_struct swig_types[19] 
 
621
#define  SWIGTYPE_p_comedi_calibration_t swig_types[20] 
 
622
#define  SWIGTYPE_p_comedi_sv_t swig_types[21] 
 
623
#define  SWIGTYPE_p_chanlist swig_types[22] 
 
624
#define  SWIGTYPE_p_comedi_insn swig_types[23] 
 
625
#define  SWIGTYPE_p_comedi_insnlist swig_types[24] 
 
626
#define  SWIGTYPE_p_comedi_caldac_t swig_types[25] 
 
627
#define  SWIGTYPE_p_comedi_t swig_types[26] 
 
628
#define  SWIGTYPE_p_int swig_types[27] 
 
629
#define  SWIGTYPE_p_comedi_cmd swig_types[28] 
 
630
static swig_type_info *swig_types[30];
 
631
 
 
632
/* -------- TYPES TABLE (END) -------- */
 
633
 
 
634
#define SWIG_init    Init_comedi
 
635
#define SWIG_name    "Comedi"
 
636
 
 
637
static VALUE mComedi;
 
638
 
 
639
#include "comedilib.h"
 
640
 
 
641
 
 
642
#ifdef __cplusplus
 
643
extern "C" {
 
644
#endif
 
645
#ifdef HAVE_SYS_TIME_H
 
646
# include <sys/time.h>
 
647
struct timeval rb_time_timeval(VALUE);
 
648
#endif
 
649
#ifdef __cplusplus
 
650
}
 
651
#endif
 
652
 
 
653
 
 
654
#ifdef __cplusplus
 
655
extern "C" {
 
656
#endif
 
657
#include "rubyio.h"
 
658
#ifdef __cplusplus
 
659
}
 
660
#endif
 
661
 
 
662
 
 
663
static unsigned int cr_pack(unsigned int chan, unsigned int rng, unsigned int aref){
 
664
        return CR_PACK(chan,rng,aref);
 
665
}
 
666
static unsigned int cr_pack_flags(unsigned int chan, unsigned int rng, unsigned int aref, unsigned int flags){
 
667
        return CR_PACK_FLAGS(chan,rng,aref, flags);
 
668
}
 
669
static unsigned int cr_chan(unsigned int a){
 
670
        return CR_CHAN(a);
 
671
}
 
672
static unsigned int cr_range(unsigned int a){
 
673
        return CR_RANGE(a);
 
674
}
 
675
static unsigned int cr_aref(unsigned int a){
 
676
        return CR_AREF(a);
 
677
}
 
678
 
 
679
 
 
680
typedef unsigned int chanlist;
 
681
 
 
682
chanlist *new_chanlist(int nelements){
 
683
  return (unsigned int *) calloc(nelements,sizeof(unsigned int));
 
684
}
 
685
void delete_chanlist(chanlist *self){
 
686
  free(self);
 
687
}
 
688
unsigned int chanlist_getitem(chanlist *self,int index){
 
689
  return self[index];
 
690
}
 
691
void chanlist_setitem(chanlist *self,int index,unsigned int value){
 
692
  self[index] = value;
 
693
}
 
694
unsigned int *chanlist_cast(chanlist *self){
 
695
  return self;
 
696
}
 
697
chanlist *chanlist_frompointer(unsigned int *t){
 
698
  return (chanlist *) t;
 
699
}
 
700
 
 
701
swig_class cChanlist;
 
702
static void free_chanlist(chanlist *);
 
703
 
 
704
swig_class cComedi_trig_struct;
 
705
static void free_comedi_trig_struct(struct comedi_trig_struct *);
 
706
 
 
707
swig_class cComedi_insn_struct;
 
708
static void free_comedi_insn_struct(struct comedi_insn_struct *);
 
709
 
 
710
swig_class cComedi_insnlist_struct;
 
711
static void free_comedi_insnlist_struct(struct comedi_insnlist_struct *);
 
712
 
 
713
swig_class cComedi_cmd_struct;
 
714
static void free_comedi_cmd_struct(struct comedi_cmd_struct *);
 
715
 
 
716
swig_class cComedi_chaninfo_struct;
 
717
static void free_comedi_chaninfo_struct(struct comedi_chaninfo_struct *);
 
718
 
 
719
swig_class cComedi_rangeinfo_struct;
 
720
static void free_comedi_rangeinfo_struct(struct comedi_rangeinfo_struct *);
 
721
 
 
722
swig_class cComedi_krange_struct;
 
723
static void free_comedi_krange_struct(struct comedi_krange_struct *);
 
724
 
 
725
swig_class cComedi_subdinfo_struct;
 
726
static void free_comedi_subdinfo_struct(struct comedi_subdinfo_struct *);
 
727
 
 
728
swig_class cComedi_devinfo_struct;
 
729
static void free_comedi_devinfo_struct(struct comedi_devinfo_struct *);
 
730
 
 
731
swig_class cComedi_devconfig_struct;
 
732
static void free_comedi_devconfig_struct(struct comedi_devconfig_struct *);
 
733
 
 
734
swig_class cComedi_bufconfig_struct;
 
735
static void free_comedi_bufconfig_struct(struct comedi_bufconfig_struct *);
 
736
 
 
737
swig_class cComedi_bufinfo_struct;
 
738
static void free_comedi_bufinfo_struct(struct comedi_bufinfo_struct *);
 
739
 
 
740
swig_class cComedi_range;
 
741
static void free_comedi_range(comedi_range *);
 
742
 
 
743
swig_class cComedi_sv_t;
 
744
static void free_comedi_sv_t(comedi_sv_t *);
 
745
 
 
746
static VALUE output_helper(VALUE target, VALUE o) {
 
747
    if (NIL_P(target)) {
 
748
        target = o;
 
749
    } else {
 
750
        if (TYPE(target) != T_ARRAY) {
 
751
            VALUE o2 = target;
 
752
            target = rb_ary_new();
 
753
            rb_ary_push(target, o2);
 
754
        }
 
755
        rb_ary_push(target, o);
 
756
    }
 
757
    return target;
 
758
}
 
759
 
 
760
 
 
761
swig_class cComedi_caldac_t;
 
762
static void free_comedi_caldac_t(comedi_caldac_t *);
 
763
 
 
764
swig_class cComedi_calibration_setting_t;
 
765
static void free_comedi_calibration_setting_t(comedi_calibration_setting_t *);
 
766
 
 
767
swig_class cComedi_calibration_t;
 
768
static void free_comedi_calibration_t(comedi_calibration_t *);
 
769
static VALUE
 
770
_wrap_cr_pack(int argc, VALUE *argv, VALUE self) {
 
771
    unsigned int arg1 ;
 
772
    unsigned int arg2 ;
 
773
    unsigned int arg3 ;
 
774
    unsigned int result;
 
775
    VALUE vresult = Qnil;
 
776
    
 
777
    if ((argc < 3) || (argc > 3))
 
778
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc);
 
779
    arg1 = NUM2UINT(argv[0]);
 
780
    arg2 = NUM2UINT(argv[1]);
 
781
    arg3 = NUM2UINT(argv[2]);
 
782
    result = (unsigned int)cr_pack(arg1,arg2,arg3);
 
783
    
 
784
    vresult = UINT2NUM(result);
 
785
    return vresult;
 
786
}
 
787
 
 
788
 
 
789
static VALUE
 
790
_wrap_cr_pack_flags(int argc, VALUE *argv, VALUE self) {
 
791
    unsigned int arg1 ;
 
792
    unsigned int arg2 ;
 
793
    unsigned int arg3 ;
 
794
    unsigned int arg4 ;
 
795
    unsigned int result;
 
796
    VALUE vresult = Qnil;
 
797
    
 
798
    if ((argc < 4) || (argc > 4))
 
799
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc);
 
800
    arg1 = NUM2UINT(argv[0]);
 
801
    arg2 = NUM2UINT(argv[1]);
 
802
    arg3 = NUM2UINT(argv[2]);
 
803
    arg4 = NUM2UINT(argv[3]);
 
804
    result = (unsigned int)cr_pack_flags(arg1,arg2,arg3,arg4);
 
805
    
 
806
    vresult = UINT2NUM(result);
 
807
    return vresult;
 
808
}
 
809
 
 
810
 
 
811
static VALUE
 
812
_wrap_cr_chan(int argc, VALUE *argv, VALUE self) {
 
813
    unsigned int arg1 ;
 
814
    unsigned int result;
 
815
    VALUE vresult = Qnil;
 
816
    
 
817
    if ((argc < 1) || (argc > 1))
 
818
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
819
    arg1 = NUM2UINT(argv[0]);
 
820
    result = (unsigned int)cr_chan(arg1);
 
821
    
 
822
    vresult = UINT2NUM(result);
 
823
    return vresult;
 
824
}
 
825
 
 
826
 
 
827
static VALUE
 
828
_wrap_cr_range(int argc, VALUE *argv, VALUE self) {
 
829
    unsigned int arg1 ;
 
830
    unsigned int result;
 
831
    VALUE vresult = Qnil;
 
832
    
 
833
    if ((argc < 1) || (argc > 1))
 
834
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
835
    arg1 = NUM2UINT(argv[0]);
 
836
    result = (unsigned int)cr_range(arg1);
 
837
    
 
838
    vresult = UINT2NUM(result);
 
839
    return vresult;
 
840
}
 
841
 
 
842
 
 
843
static VALUE
 
844
_wrap_cr_aref(int argc, VALUE *argv, VALUE self) {
 
845
    unsigned int arg1 ;
 
846
    unsigned int result;
 
847
    VALUE vresult = Qnil;
 
848
    
 
849
    if ((argc < 1) || (argc > 1))
 
850
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
851
    arg1 = NUM2UINT(argv[0]);
 
852
    result = (unsigned int)cr_aref(arg1);
 
853
    
 
854
    vresult = UINT2NUM(result);
 
855
    return vresult;
 
856
}
 
857
 
 
858
 
 
859
#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
 
860
static VALUE
 
861
_wrap_chanlist_allocate(VALUE self) {
 
862
#else
 
863
    static VALUE
 
864
    _wrap_chanlist_allocate(int argc, VALUE *argv, VALUE self) {
 
865
#endif
 
866
        
 
867
        
 
868
        VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_chanlist);
 
869
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
 
870
        rb_obj_call_init(vresult, argc, argv);
 
871
#endif
 
872
        return vresult;
 
873
    }
 
874
    
 
875
 
 
876
static VALUE
 
877
_wrap_new_chanlist(int argc, VALUE *argv, VALUE self) {
 
878
    int arg1 ;
 
879
    chanlist *result;
 
880
    
 
881
    if ((argc < 1) || (argc > 1))
 
882
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
883
    arg1 = NUM2INT(argv[0]);
 
884
    result = (chanlist *)new_chanlist(arg1);
 
885
    DATA_PTR(self) = result;
 
886
    return self;
 
887
}
 
888
 
 
889
 
 
890
static void
 
891
free_chanlist(chanlist *arg1) {
 
892
    delete_chanlist(arg1);
 
893
;
 
894
}
 
895
static VALUE
 
896
_wrap_chanlist___getitem__(int argc, VALUE *argv, VALUE self) {
 
897
    chanlist *arg1 = (chanlist *) 0 ;
 
898
    int arg2 ;
 
899
    unsigned int result;
 
900
    VALUE vresult = Qnil;
 
901
    
 
902
    if ((argc < 1) || (argc > 1))
 
903
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
904
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_chanlist, 1);
 
905
    arg2 = NUM2INT(argv[0]);
 
906
    result = (unsigned int)chanlist_getitem(arg1,arg2);
 
907
    
 
908
    vresult = UINT2NUM(result);
 
909
    return vresult;
 
910
}
 
911
 
 
912
 
 
913
static VALUE
 
914
_wrap_chanlist___setitem__(int argc, VALUE *argv, VALUE self) {
 
915
    chanlist *arg1 = (chanlist *) 0 ;
 
916
    int arg2 ;
 
917
    unsigned int arg3 ;
 
918
    
 
919
    if ((argc < 2) || (argc > 2))
 
920
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
 
921
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_chanlist, 1);
 
922
    arg2 = NUM2INT(argv[0]);
 
923
    arg3 = NUM2UINT(argv[1]);
 
924
    chanlist_setitem(arg1,arg2,arg3);
 
925
    
 
926
    return Qnil;
 
927
}
 
928
 
 
929
 
 
930
static VALUE
 
931
_wrap_chanlist_cast(int argc, VALUE *argv, VALUE self) {
 
932
    chanlist *arg1 = (chanlist *) 0 ;
 
933
    unsigned int *result;
 
934
    VALUE vresult = Qnil;
 
935
    
 
936
    if ((argc < 0) || (argc > 0))
 
937
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
938
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_chanlist, 1);
 
939
    result = (unsigned int *)chanlist_cast(arg1);
 
940
    
 
941
    vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_unsigned_int,0);
 
942
    return vresult;
 
943
}
 
944
 
 
945
 
 
946
static VALUE
 
947
_wrap_chanlist_frompointer(int argc, VALUE *argv, VALUE self) {
 
948
    unsigned int *arg1 = (unsigned int *) 0 ;
 
949
    chanlist *result;
 
950
    VALUE vresult = Qnil;
 
951
    
 
952
    if ((argc < 1) || (argc > 1))
 
953
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
954
    SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_unsigned_int, 1);
 
955
    result = (chanlist *)chanlist_frompointer(arg1);
 
956
    
 
957
    vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_chanlist,0);
 
958
    return vresult;
 
959
}
 
960
 
 
961
 
 
962
static VALUE
 
963
_wrap_comedi_trig_struct_subdev_set(int argc, VALUE *argv, VALUE self) {
 
964
    struct comedi_trig_struct *arg1 = (struct comedi_trig_struct *) 0 ;
 
965
    unsigned int arg2 ;
 
966
    
 
967
    if ((argc < 1) || (argc > 1))
 
968
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
969
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_trig_struct, 1);
 
970
    arg2 = NUM2UINT(argv[0]);
 
971
    if (arg1) (arg1)->subdev = arg2;
 
972
    
 
973
    return Qnil;
 
974
}
 
975
 
 
976
 
 
977
static VALUE
 
978
_wrap_comedi_trig_struct_subdev_get(int argc, VALUE *argv, VALUE self) {
 
979
    struct comedi_trig_struct *arg1 = (struct comedi_trig_struct *) 0 ;
 
980
    unsigned int result;
 
981
    VALUE vresult = Qnil;
 
982
    
 
983
    if ((argc < 0) || (argc > 0))
 
984
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
985
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_trig_struct, 1);
 
986
    result = (unsigned int) ((arg1)->subdev);
 
987
    
 
988
    vresult = UINT2NUM(result);
 
989
    return vresult;
 
990
}
 
991
 
 
992
 
 
993
static VALUE
 
994
_wrap_comedi_trig_struct_mode_set(int argc, VALUE *argv, VALUE self) {
 
995
    struct comedi_trig_struct *arg1 = (struct comedi_trig_struct *) 0 ;
 
996
    unsigned int arg2 ;
 
997
    
 
998
    if ((argc < 1) || (argc > 1))
 
999
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
1000
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_trig_struct, 1);
 
1001
    arg2 = NUM2UINT(argv[0]);
 
1002
    if (arg1) (arg1)->mode = arg2;
 
1003
    
 
1004
    return Qnil;
 
1005
}
 
1006
 
 
1007
 
 
1008
static VALUE
 
1009
_wrap_comedi_trig_struct_mode_get(int argc, VALUE *argv, VALUE self) {
 
1010
    struct comedi_trig_struct *arg1 = (struct comedi_trig_struct *) 0 ;
 
1011
    unsigned int result;
 
1012
    VALUE vresult = Qnil;
 
1013
    
 
1014
    if ((argc < 0) || (argc > 0))
 
1015
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
1016
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_trig_struct, 1);
 
1017
    result = (unsigned int) ((arg1)->mode);
 
1018
    
 
1019
    vresult = UINT2NUM(result);
 
1020
    return vresult;
 
1021
}
 
1022
 
 
1023
 
 
1024
static VALUE
 
1025
_wrap_comedi_trig_struct_flags_set(int argc, VALUE *argv, VALUE self) {
 
1026
    struct comedi_trig_struct *arg1 = (struct comedi_trig_struct *) 0 ;
 
1027
    unsigned int arg2 ;
 
1028
    
 
1029
    if ((argc < 1) || (argc > 1))
 
1030
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
1031
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_trig_struct, 1);
 
1032
    arg2 = NUM2UINT(argv[0]);
 
1033
    if (arg1) (arg1)->flags = arg2;
 
1034
    
 
1035
    return Qnil;
 
1036
}
 
1037
 
 
1038
 
 
1039
static VALUE
 
1040
_wrap_comedi_trig_struct_flags_get(int argc, VALUE *argv, VALUE self) {
 
1041
    struct comedi_trig_struct *arg1 = (struct comedi_trig_struct *) 0 ;
 
1042
    unsigned int result;
 
1043
    VALUE vresult = Qnil;
 
1044
    
 
1045
    if ((argc < 0) || (argc > 0))
 
1046
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
1047
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_trig_struct, 1);
 
1048
    result = (unsigned int) ((arg1)->flags);
 
1049
    
 
1050
    vresult = UINT2NUM(result);
 
1051
    return vresult;
 
1052
}
 
1053
 
 
1054
 
 
1055
static VALUE
 
1056
_wrap_comedi_trig_struct_n_chan_set(int argc, VALUE *argv, VALUE self) {
 
1057
    struct comedi_trig_struct *arg1 = (struct comedi_trig_struct *) 0 ;
 
1058
    unsigned int arg2 ;
 
1059
    
 
1060
    if ((argc < 1) || (argc > 1))
 
1061
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
1062
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_trig_struct, 1);
 
1063
    arg2 = NUM2UINT(argv[0]);
 
1064
    if (arg1) (arg1)->n_chan = arg2;
 
1065
    
 
1066
    return Qnil;
 
1067
}
 
1068
 
 
1069
 
 
1070
static VALUE
 
1071
_wrap_comedi_trig_struct_n_chan_get(int argc, VALUE *argv, VALUE self) {
 
1072
    struct comedi_trig_struct *arg1 = (struct comedi_trig_struct *) 0 ;
 
1073
    unsigned int result;
 
1074
    VALUE vresult = Qnil;
 
1075
    
 
1076
    if ((argc < 0) || (argc > 0))
 
1077
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
1078
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_trig_struct, 1);
 
1079
    result = (unsigned int) ((arg1)->n_chan);
 
1080
    
 
1081
    vresult = UINT2NUM(result);
 
1082
    return vresult;
 
1083
}
 
1084
 
 
1085
 
 
1086
static VALUE
 
1087
_wrap_comedi_trig_struct_chanlist_set(int argc, VALUE *argv, VALUE self) {
 
1088
    struct comedi_trig_struct *arg1 = (struct comedi_trig_struct *) 0 ;
 
1089
    unsigned int *arg2 = (unsigned int *) 0 ;
 
1090
    
 
1091
    if ((argc < 1) || (argc > 1))
 
1092
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
1093
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_trig_struct, 1);
 
1094
    SWIG_ConvertPtr(argv[0], (void **) &arg2, SWIGTYPE_p_unsigned_int, 1);
 
1095
    if (arg1) (arg1)->chanlist = arg2;
 
1096
    
 
1097
    return Qnil;
 
1098
}
 
1099
 
 
1100
 
 
1101
static VALUE
 
1102
_wrap_comedi_trig_struct_chanlist_get(int argc, VALUE *argv, VALUE self) {
 
1103
    struct comedi_trig_struct *arg1 = (struct comedi_trig_struct *) 0 ;
 
1104
    unsigned int *result;
 
1105
    VALUE vresult = Qnil;
 
1106
    
 
1107
    if ((argc < 0) || (argc > 0))
 
1108
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
1109
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_trig_struct, 1);
 
1110
    result = (unsigned int *) ((arg1)->chanlist);
 
1111
    
 
1112
    vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_unsigned_int,0);
 
1113
    return vresult;
 
1114
}
 
1115
 
 
1116
 
 
1117
static VALUE
 
1118
_wrap_comedi_trig_struct_data_set(int argc, VALUE *argv, VALUE self) {
 
1119
    struct comedi_trig_struct *arg1 = (struct comedi_trig_struct *) 0 ;
 
1120
    sampl_t *arg2 = (sampl_t *) 0 ;
 
1121
    
 
1122
    if ((argc < 1) || (argc > 1))
 
1123
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
1124
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_trig_struct, 1);
 
1125
    SWIG_ConvertPtr(argv[0], (void **) &arg2, SWIGTYPE_p_sampl_t, 1);
 
1126
    if (arg1) (arg1)->data = arg2;
 
1127
    
 
1128
    return Qnil;
 
1129
}
 
1130
 
 
1131
 
 
1132
static VALUE
 
1133
_wrap_comedi_trig_struct_data_get(int argc, VALUE *argv, VALUE self) {
 
1134
    struct comedi_trig_struct *arg1 = (struct comedi_trig_struct *) 0 ;
 
1135
    sampl_t *result;
 
1136
    VALUE vresult = Qnil;
 
1137
    
 
1138
    if ((argc < 0) || (argc > 0))
 
1139
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
1140
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_trig_struct, 1);
 
1141
    result = (sampl_t *) ((arg1)->data);
 
1142
    
 
1143
    vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_sampl_t,0);
 
1144
    return vresult;
 
1145
}
 
1146
 
 
1147
 
 
1148
static VALUE
 
1149
_wrap_comedi_trig_struct_n_set(int argc, VALUE *argv, VALUE self) {
 
1150
    struct comedi_trig_struct *arg1 = (struct comedi_trig_struct *) 0 ;
 
1151
    unsigned int arg2 ;
 
1152
    
 
1153
    if ((argc < 1) || (argc > 1))
 
1154
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
1155
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_trig_struct, 1);
 
1156
    arg2 = NUM2UINT(argv[0]);
 
1157
    if (arg1) (arg1)->n = arg2;
 
1158
    
 
1159
    return Qnil;
 
1160
}
 
1161
 
 
1162
 
 
1163
static VALUE
 
1164
_wrap_comedi_trig_struct_n_get(int argc, VALUE *argv, VALUE self) {
 
1165
    struct comedi_trig_struct *arg1 = (struct comedi_trig_struct *) 0 ;
 
1166
    unsigned int result;
 
1167
    VALUE vresult = Qnil;
 
1168
    
 
1169
    if ((argc < 0) || (argc > 0))
 
1170
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
1171
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_trig_struct, 1);
 
1172
    result = (unsigned int) ((arg1)->n);
 
1173
    
 
1174
    vresult = UINT2NUM(result);
 
1175
    return vresult;
 
1176
}
 
1177
 
 
1178
 
 
1179
static VALUE
 
1180
_wrap_comedi_trig_struct_trigsrc_set(int argc, VALUE *argv, VALUE self) {
 
1181
    struct comedi_trig_struct *arg1 = (struct comedi_trig_struct *) 0 ;
 
1182
    unsigned int arg2 ;
 
1183
    
 
1184
    if ((argc < 1) || (argc > 1))
 
1185
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
1186
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_trig_struct, 1);
 
1187
    arg2 = NUM2UINT(argv[0]);
 
1188
    if (arg1) (arg1)->trigsrc = arg2;
 
1189
    
 
1190
    return Qnil;
 
1191
}
 
1192
 
 
1193
 
 
1194
static VALUE
 
1195
_wrap_comedi_trig_struct_trigsrc_get(int argc, VALUE *argv, VALUE self) {
 
1196
    struct comedi_trig_struct *arg1 = (struct comedi_trig_struct *) 0 ;
 
1197
    unsigned int result;
 
1198
    VALUE vresult = Qnil;
 
1199
    
 
1200
    if ((argc < 0) || (argc > 0))
 
1201
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
1202
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_trig_struct, 1);
 
1203
    result = (unsigned int) ((arg1)->trigsrc);
 
1204
    
 
1205
    vresult = UINT2NUM(result);
 
1206
    return vresult;
 
1207
}
 
1208
 
 
1209
 
 
1210
static VALUE
 
1211
_wrap_comedi_trig_struct_trigvar_set(int argc, VALUE *argv, VALUE self) {
 
1212
    struct comedi_trig_struct *arg1 = (struct comedi_trig_struct *) 0 ;
 
1213
    unsigned int arg2 ;
 
1214
    
 
1215
    if ((argc < 1) || (argc > 1))
 
1216
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
1217
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_trig_struct, 1);
 
1218
    arg2 = NUM2UINT(argv[0]);
 
1219
    if (arg1) (arg1)->trigvar = arg2;
 
1220
    
 
1221
    return Qnil;
 
1222
}
 
1223
 
 
1224
 
 
1225
static VALUE
 
1226
_wrap_comedi_trig_struct_trigvar_get(int argc, VALUE *argv, VALUE self) {
 
1227
    struct comedi_trig_struct *arg1 = (struct comedi_trig_struct *) 0 ;
 
1228
    unsigned int result;
 
1229
    VALUE vresult = Qnil;
 
1230
    
 
1231
    if ((argc < 0) || (argc > 0))
 
1232
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
1233
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_trig_struct, 1);
 
1234
    result = (unsigned int) ((arg1)->trigvar);
 
1235
    
 
1236
    vresult = UINT2NUM(result);
 
1237
    return vresult;
 
1238
}
 
1239
 
 
1240
 
 
1241
static VALUE
 
1242
_wrap_comedi_trig_struct_trigvar1_set(int argc, VALUE *argv, VALUE self) {
 
1243
    struct comedi_trig_struct *arg1 = (struct comedi_trig_struct *) 0 ;
 
1244
    unsigned int arg2 ;
 
1245
    
 
1246
    if ((argc < 1) || (argc > 1))
 
1247
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
1248
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_trig_struct, 1);
 
1249
    arg2 = NUM2UINT(argv[0]);
 
1250
    if (arg1) (arg1)->trigvar1 = arg2;
 
1251
    
 
1252
    return Qnil;
 
1253
}
 
1254
 
 
1255
 
 
1256
static VALUE
 
1257
_wrap_comedi_trig_struct_trigvar1_get(int argc, VALUE *argv, VALUE self) {
 
1258
    struct comedi_trig_struct *arg1 = (struct comedi_trig_struct *) 0 ;
 
1259
    unsigned int result;
 
1260
    VALUE vresult = Qnil;
 
1261
    
 
1262
    if ((argc < 0) || (argc > 0))
 
1263
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
1264
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_trig_struct, 1);
 
1265
    result = (unsigned int) ((arg1)->trigvar1);
 
1266
    
 
1267
    vresult = UINT2NUM(result);
 
1268
    return vresult;
 
1269
}
 
1270
 
 
1271
 
 
1272
static VALUE
 
1273
_wrap_comedi_trig_struct_data_len_set(int argc, VALUE *argv, VALUE self) {
 
1274
    struct comedi_trig_struct *arg1 = (struct comedi_trig_struct *) 0 ;
 
1275
    unsigned int arg2 ;
 
1276
    
 
1277
    if ((argc < 1) || (argc > 1))
 
1278
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
1279
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_trig_struct, 1);
 
1280
    arg2 = NUM2UINT(argv[0]);
 
1281
    if (arg1) (arg1)->data_len = arg2;
 
1282
    
 
1283
    return Qnil;
 
1284
}
 
1285
 
 
1286
 
 
1287
static VALUE
 
1288
_wrap_comedi_trig_struct_data_len_get(int argc, VALUE *argv, VALUE self) {
 
1289
    struct comedi_trig_struct *arg1 = (struct comedi_trig_struct *) 0 ;
 
1290
    unsigned int result;
 
1291
    VALUE vresult = Qnil;
 
1292
    
 
1293
    if ((argc < 0) || (argc > 0))
 
1294
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
1295
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_trig_struct, 1);
 
1296
    result = (unsigned int) ((arg1)->data_len);
 
1297
    
 
1298
    vresult = UINT2NUM(result);
 
1299
    return vresult;
 
1300
}
 
1301
 
 
1302
 
 
1303
static VALUE
 
1304
_wrap_comedi_trig_struct_unused_set(int argc, VALUE *argv, VALUE self) {
 
1305
    struct comedi_trig_struct *arg1 = (struct comedi_trig_struct *) 0 ;
 
1306
    unsigned int *arg2 ;
 
1307
    
 
1308
    if ((argc < 1) || (argc > 1))
 
1309
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
1310
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_trig_struct, 1);
 
1311
    SWIG_ConvertPtr(argv[0], (void **) &arg2, SWIGTYPE_p_unsigned_int, 1);
 
1312
    {
 
1313
        int ii;
 
1314
        unsigned int *b = (unsigned int *) arg1->unused;
 
1315
        for (ii = 0; ii < 3; ii++) b[ii] = *((unsigned int *) arg2 + ii);
 
1316
    }
 
1317
    return Qnil;
 
1318
}
 
1319
 
 
1320
 
 
1321
static VALUE
 
1322
_wrap_comedi_trig_struct_unused_get(int argc, VALUE *argv, VALUE self) {
 
1323
    struct comedi_trig_struct *arg1 = (struct comedi_trig_struct *) 0 ;
 
1324
    unsigned int *result;
 
1325
    VALUE vresult = Qnil;
 
1326
    
 
1327
    if ((argc < 0) || (argc > 0))
 
1328
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
1329
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_trig_struct, 1);
 
1330
    result = (unsigned int *)(unsigned int *) ((arg1)->unused);
 
1331
    
 
1332
    vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_unsigned_int,0);
 
1333
    return vresult;
 
1334
}
 
1335
 
 
1336
 
 
1337
#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
 
1338
static VALUE
 
1339
_wrap_comedi_trig_struct_allocate(VALUE self) {
 
1340
#else
 
1341
    static VALUE
 
1342
    _wrap_comedi_trig_struct_allocate(int argc, VALUE *argv, VALUE self) {
 
1343
#endif
 
1344
        
 
1345
        
 
1346
        VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_comedi_trig_struct);
 
1347
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
 
1348
        rb_obj_call_init(vresult, argc, argv);
 
1349
#endif
 
1350
        return vresult;
 
1351
    }
 
1352
    
 
1353
 
 
1354
static VALUE
 
1355
_wrap_new_comedi_trig_struct(int argc, VALUE *argv, VALUE self) {
 
1356
    struct comedi_trig_struct *result;
 
1357
    
 
1358
    if ((argc < 0) || (argc > 0))
 
1359
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
1360
    result = (struct comedi_trig_struct *)(struct comedi_trig_struct *) calloc(1, sizeof(struct comedi_trig_struct));
 
1361
    DATA_PTR(self) = result;
 
1362
    return self;
 
1363
}
 
1364
 
 
1365
 
 
1366
static void
 
1367
free_comedi_trig_struct(struct comedi_trig_struct *arg1) {
 
1368
    free((char*) arg1);
 
1369
}
 
1370
static VALUE
 
1371
_wrap_comedi_insn_struct_insn_set(int argc, VALUE *argv, VALUE self) {
 
1372
    struct comedi_insn_struct *arg1 = (struct comedi_insn_struct *) 0 ;
 
1373
    unsigned int arg2 ;
 
1374
    
 
1375
    if ((argc < 1) || (argc > 1))
 
1376
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
1377
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_insn_struct, 1);
 
1378
    arg2 = NUM2UINT(argv[0]);
 
1379
    if (arg1) (arg1)->insn = arg2;
 
1380
    
 
1381
    return Qnil;
 
1382
}
 
1383
 
 
1384
 
 
1385
static VALUE
 
1386
_wrap_comedi_insn_struct_insn_get(int argc, VALUE *argv, VALUE self) {
 
1387
    struct comedi_insn_struct *arg1 = (struct comedi_insn_struct *) 0 ;
 
1388
    unsigned int result;
 
1389
    VALUE vresult = Qnil;
 
1390
    
 
1391
    if ((argc < 0) || (argc > 0))
 
1392
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
1393
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_insn_struct, 1);
 
1394
    result = (unsigned int) ((arg1)->insn);
 
1395
    
 
1396
    vresult = UINT2NUM(result);
 
1397
    return vresult;
 
1398
}
 
1399
 
 
1400
 
 
1401
static VALUE
 
1402
_wrap_comedi_insn_struct_n_set(int argc, VALUE *argv, VALUE self) {
 
1403
    struct comedi_insn_struct *arg1 = (struct comedi_insn_struct *) 0 ;
 
1404
    unsigned int arg2 ;
 
1405
    
 
1406
    if ((argc < 1) || (argc > 1))
 
1407
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
1408
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_insn_struct, 1);
 
1409
    arg2 = NUM2UINT(argv[0]);
 
1410
    if (arg1) (arg1)->n = arg2;
 
1411
    
 
1412
    return Qnil;
 
1413
}
 
1414
 
 
1415
 
 
1416
static VALUE
 
1417
_wrap_comedi_insn_struct_n_get(int argc, VALUE *argv, VALUE self) {
 
1418
    struct comedi_insn_struct *arg1 = (struct comedi_insn_struct *) 0 ;
 
1419
    unsigned int result;
 
1420
    VALUE vresult = Qnil;
 
1421
    
 
1422
    if ((argc < 0) || (argc > 0))
 
1423
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
1424
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_insn_struct, 1);
 
1425
    result = (unsigned int) ((arg1)->n);
 
1426
    
 
1427
    vresult = UINT2NUM(result);
 
1428
    return vresult;
 
1429
}
 
1430
 
 
1431
 
 
1432
static VALUE
 
1433
_wrap_comedi_insn_struct_data_set(int argc, VALUE *argv, VALUE self) {
 
1434
    struct comedi_insn_struct *arg1 = (struct comedi_insn_struct *) 0 ;
 
1435
    lsampl_t *arg2 = (lsampl_t *) 0 ;
 
1436
    
 
1437
    if ((argc < 1) || (argc > 1))
 
1438
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
1439
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_insn_struct, 1);
 
1440
    SWIG_ConvertPtr(argv[0], (void **) &arg2, SWIGTYPE_p_lsampl_t, 1);
 
1441
    if (arg1) (arg1)->data = arg2;
 
1442
    
 
1443
    return Qnil;
 
1444
}
 
1445
 
 
1446
 
 
1447
static VALUE
 
1448
_wrap_comedi_insn_struct_data_get(int argc, VALUE *argv, VALUE self) {
 
1449
    struct comedi_insn_struct *arg1 = (struct comedi_insn_struct *) 0 ;
 
1450
    lsampl_t *result;
 
1451
    VALUE vresult = Qnil;
 
1452
    
 
1453
    if ((argc < 0) || (argc > 0))
 
1454
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
1455
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_insn_struct, 1);
 
1456
    result = (lsampl_t *) ((arg1)->data);
 
1457
    
 
1458
    vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_lsampl_t,0);
 
1459
    return vresult;
 
1460
}
 
1461
 
 
1462
 
 
1463
static VALUE
 
1464
_wrap_comedi_insn_struct_subdev_set(int argc, VALUE *argv, VALUE self) {
 
1465
    struct comedi_insn_struct *arg1 = (struct comedi_insn_struct *) 0 ;
 
1466
    unsigned int arg2 ;
 
1467
    
 
1468
    if ((argc < 1) || (argc > 1))
 
1469
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
1470
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_insn_struct, 1);
 
1471
    arg2 = NUM2UINT(argv[0]);
 
1472
    if (arg1) (arg1)->subdev = arg2;
 
1473
    
 
1474
    return Qnil;
 
1475
}
 
1476
 
 
1477
 
 
1478
static VALUE
 
1479
_wrap_comedi_insn_struct_subdev_get(int argc, VALUE *argv, VALUE self) {
 
1480
    struct comedi_insn_struct *arg1 = (struct comedi_insn_struct *) 0 ;
 
1481
    unsigned int result;
 
1482
    VALUE vresult = Qnil;
 
1483
    
 
1484
    if ((argc < 0) || (argc > 0))
 
1485
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
1486
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_insn_struct, 1);
 
1487
    result = (unsigned int) ((arg1)->subdev);
 
1488
    
 
1489
    vresult = UINT2NUM(result);
 
1490
    return vresult;
 
1491
}
 
1492
 
 
1493
 
 
1494
static VALUE
 
1495
_wrap_comedi_insn_struct_chanspec_set(int argc, VALUE *argv, VALUE self) {
 
1496
    struct comedi_insn_struct *arg1 = (struct comedi_insn_struct *) 0 ;
 
1497
    unsigned int arg2 ;
 
1498
    
 
1499
    if ((argc < 1) || (argc > 1))
 
1500
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
1501
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_insn_struct, 1);
 
1502
    arg2 = NUM2UINT(argv[0]);
 
1503
    if (arg1) (arg1)->chanspec = arg2;
 
1504
    
 
1505
    return Qnil;
 
1506
}
 
1507
 
 
1508
 
 
1509
static VALUE
 
1510
_wrap_comedi_insn_struct_chanspec_get(int argc, VALUE *argv, VALUE self) {
 
1511
    struct comedi_insn_struct *arg1 = (struct comedi_insn_struct *) 0 ;
 
1512
    unsigned int result;
 
1513
    VALUE vresult = Qnil;
 
1514
    
 
1515
    if ((argc < 0) || (argc > 0))
 
1516
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
1517
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_insn_struct, 1);
 
1518
    result = (unsigned int) ((arg1)->chanspec);
 
1519
    
 
1520
    vresult = UINT2NUM(result);
 
1521
    return vresult;
 
1522
}
 
1523
 
 
1524
 
 
1525
static VALUE
 
1526
_wrap_comedi_insn_struct_unused_set(int argc, VALUE *argv, VALUE self) {
 
1527
    struct comedi_insn_struct *arg1 = (struct comedi_insn_struct *) 0 ;
 
1528
    unsigned int *arg2 ;
 
1529
    
 
1530
    if ((argc < 1) || (argc > 1))
 
1531
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
1532
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_insn_struct, 1);
 
1533
    SWIG_ConvertPtr(argv[0], (void **) &arg2, SWIGTYPE_p_unsigned_int, 1);
 
1534
    {
 
1535
        int ii;
 
1536
        unsigned int *b = (unsigned int *) arg1->unused;
 
1537
        for (ii = 0; ii < 3; ii++) b[ii] = *((unsigned int *) arg2 + ii);
 
1538
    }
 
1539
    return Qnil;
 
1540
}
 
1541
 
 
1542
 
 
1543
static VALUE
 
1544
_wrap_comedi_insn_struct_unused_get(int argc, VALUE *argv, VALUE self) {
 
1545
    struct comedi_insn_struct *arg1 = (struct comedi_insn_struct *) 0 ;
 
1546
    unsigned int *result;
 
1547
    VALUE vresult = Qnil;
 
1548
    
 
1549
    if ((argc < 0) || (argc > 0))
 
1550
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
1551
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_insn_struct, 1);
 
1552
    result = (unsigned int *)(unsigned int *) ((arg1)->unused);
 
1553
    
 
1554
    vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_unsigned_int,0);
 
1555
    return vresult;
 
1556
}
 
1557
 
 
1558
 
 
1559
#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
 
1560
static VALUE
 
1561
_wrap_comedi_insn_struct_allocate(VALUE self) {
 
1562
#else
 
1563
    static VALUE
 
1564
    _wrap_comedi_insn_struct_allocate(int argc, VALUE *argv, VALUE self) {
 
1565
#endif
 
1566
        
 
1567
        
 
1568
        VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_comedi_insn_struct);
 
1569
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
 
1570
        rb_obj_call_init(vresult, argc, argv);
 
1571
#endif
 
1572
        return vresult;
 
1573
    }
 
1574
    
 
1575
 
 
1576
static VALUE
 
1577
_wrap_new_comedi_insn_struct(int argc, VALUE *argv, VALUE self) {
 
1578
    struct comedi_insn_struct *result;
 
1579
    
 
1580
    if ((argc < 0) || (argc > 0))
 
1581
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
1582
    result = (struct comedi_insn_struct *)(struct comedi_insn_struct *) calloc(1, sizeof(struct comedi_insn_struct));
 
1583
    DATA_PTR(self) = result;
 
1584
    return self;
 
1585
}
 
1586
 
 
1587
 
 
1588
static void
 
1589
free_comedi_insn_struct(struct comedi_insn_struct *arg1) {
 
1590
    free((char*) arg1);
 
1591
}
 
1592
static VALUE
 
1593
_wrap_comedi_insnlist_struct_n_insns_set(int argc, VALUE *argv, VALUE self) {
 
1594
    struct comedi_insnlist_struct *arg1 = (struct comedi_insnlist_struct *) 0 ;
 
1595
    unsigned int arg2 ;
 
1596
    
 
1597
    if ((argc < 1) || (argc > 1))
 
1598
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
1599
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_insnlist_struct, 1);
 
1600
    arg2 = NUM2UINT(argv[0]);
 
1601
    if (arg1) (arg1)->n_insns = arg2;
 
1602
    
 
1603
    return Qnil;
 
1604
}
 
1605
 
 
1606
 
 
1607
static VALUE
 
1608
_wrap_comedi_insnlist_struct_n_insns_get(int argc, VALUE *argv, VALUE self) {
 
1609
    struct comedi_insnlist_struct *arg1 = (struct comedi_insnlist_struct *) 0 ;
 
1610
    unsigned int result;
 
1611
    VALUE vresult = Qnil;
 
1612
    
 
1613
    if ((argc < 0) || (argc > 0))
 
1614
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
1615
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_insnlist_struct, 1);
 
1616
    result = (unsigned int) ((arg1)->n_insns);
 
1617
    
 
1618
    vresult = UINT2NUM(result);
 
1619
    return vresult;
 
1620
}
 
1621
 
 
1622
 
 
1623
static VALUE
 
1624
_wrap_comedi_insnlist_struct_insns_set(int argc, VALUE *argv, VALUE self) {
 
1625
    struct comedi_insnlist_struct *arg1 = (struct comedi_insnlist_struct *) 0 ;
 
1626
    comedi_insn *arg2 = (comedi_insn *) 0 ;
 
1627
    
 
1628
    if ((argc < 1) || (argc > 1))
 
1629
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
1630
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_insnlist_struct, 1);
 
1631
    SWIG_ConvertPtr(argv[0], (void **) &arg2, SWIGTYPE_p_comedi_insn, 1);
 
1632
    if (arg1) (arg1)->insns = arg2;
 
1633
    
 
1634
    return Qnil;
 
1635
}
 
1636
 
 
1637
 
 
1638
static VALUE
 
1639
_wrap_comedi_insnlist_struct_insns_get(int argc, VALUE *argv, VALUE self) {
 
1640
    struct comedi_insnlist_struct *arg1 = (struct comedi_insnlist_struct *) 0 ;
 
1641
    comedi_insn *result;
 
1642
    VALUE vresult = Qnil;
 
1643
    
 
1644
    if ((argc < 0) || (argc > 0))
 
1645
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
1646
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_insnlist_struct, 1);
 
1647
    result = (comedi_insn *) ((arg1)->insns);
 
1648
    
 
1649
    vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_comedi_insn,0);
 
1650
    return vresult;
 
1651
}
 
1652
 
 
1653
 
 
1654
#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
 
1655
static VALUE
 
1656
_wrap_comedi_insnlist_struct_allocate(VALUE self) {
 
1657
#else
 
1658
    static VALUE
 
1659
    _wrap_comedi_insnlist_struct_allocate(int argc, VALUE *argv, VALUE self) {
 
1660
#endif
 
1661
        
 
1662
        
 
1663
        VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_comedi_insnlist_struct);
 
1664
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
 
1665
        rb_obj_call_init(vresult, argc, argv);
 
1666
#endif
 
1667
        return vresult;
 
1668
    }
 
1669
    
 
1670
 
 
1671
static VALUE
 
1672
_wrap_new_comedi_insnlist_struct(int argc, VALUE *argv, VALUE self) {
 
1673
    struct comedi_insnlist_struct *result;
 
1674
    
 
1675
    if ((argc < 0) || (argc > 0))
 
1676
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
1677
    result = (struct comedi_insnlist_struct *)(struct comedi_insnlist_struct *) calloc(1, sizeof(struct comedi_insnlist_struct));
 
1678
    DATA_PTR(self) = result;
 
1679
    return self;
 
1680
}
 
1681
 
 
1682
 
 
1683
static void
 
1684
free_comedi_insnlist_struct(struct comedi_insnlist_struct *arg1) {
 
1685
    free((char*) arg1);
 
1686
}
 
1687
static VALUE
 
1688
_wrap_comedi_cmd_struct_subdev_set(int argc, VALUE *argv, VALUE self) {
 
1689
    struct comedi_cmd_struct *arg1 = (struct comedi_cmd_struct *) 0 ;
 
1690
    unsigned int arg2 ;
 
1691
    
 
1692
    if ((argc < 1) || (argc > 1))
 
1693
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
1694
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_cmd_struct, 1);
 
1695
    arg2 = NUM2UINT(argv[0]);
 
1696
    if (arg1) (arg1)->subdev = arg2;
 
1697
    
 
1698
    return Qnil;
 
1699
}
 
1700
 
 
1701
 
 
1702
static VALUE
 
1703
_wrap_comedi_cmd_struct_subdev_get(int argc, VALUE *argv, VALUE self) {
 
1704
    struct comedi_cmd_struct *arg1 = (struct comedi_cmd_struct *) 0 ;
 
1705
    unsigned int result;
 
1706
    VALUE vresult = Qnil;
 
1707
    
 
1708
    if ((argc < 0) || (argc > 0))
 
1709
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
1710
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_cmd_struct, 1);
 
1711
    result = (unsigned int) ((arg1)->subdev);
 
1712
    
 
1713
    vresult = UINT2NUM(result);
 
1714
    return vresult;
 
1715
}
 
1716
 
 
1717
 
 
1718
static VALUE
 
1719
_wrap_comedi_cmd_struct_flags_set(int argc, VALUE *argv, VALUE self) {
 
1720
    struct comedi_cmd_struct *arg1 = (struct comedi_cmd_struct *) 0 ;
 
1721
    unsigned int arg2 ;
 
1722
    
 
1723
    if ((argc < 1) || (argc > 1))
 
1724
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
1725
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_cmd_struct, 1);
 
1726
    arg2 = NUM2UINT(argv[0]);
 
1727
    if (arg1) (arg1)->flags = arg2;
 
1728
    
 
1729
    return Qnil;
 
1730
}
 
1731
 
 
1732
 
 
1733
static VALUE
 
1734
_wrap_comedi_cmd_struct_flags_get(int argc, VALUE *argv, VALUE self) {
 
1735
    struct comedi_cmd_struct *arg1 = (struct comedi_cmd_struct *) 0 ;
 
1736
    unsigned int result;
 
1737
    VALUE vresult = Qnil;
 
1738
    
 
1739
    if ((argc < 0) || (argc > 0))
 
1740
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
1741
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_cmd_struct, 1);
 
1742
    result = (unsigned int) ((arg1)->flags);
 
1743
    
 
1744
    vresult = UINT2NUM(result);
 
1745
    return vresult;
 
1746
}
 
1747
 
 
1748
 
 
1749
static VALUE
 
1750
_wrap_comedi_cmd_struct_start_src_set(int argc, VALUE *argv, VALUE self) {
 
1751
    struct comedi_cmd_struct *arg1 = (struct comedi_cmd_struct *) 0 ;
 
1752
    unsigned int arg2 ;
 
1753
    
 
1754
    if ((argc < 1) || (argc > 1))
 
1755
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
1756
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_cmd_struct, 1);
 
1757
    arg2 = NUM2UINT(argv[0]);
 
1758
    if (arg1) (arg1)->start_src = arg2;
 
1759
    
 
1760
    return Qnil;
 
1761
}
 
1762
 
 
1763
 
 
1764
static VALUE
 
1765
_wrap_comedi_cmd_struct_start_src_get(int argc, VALUE *argv, VALUE self) {
 
1766
    struct comedi_cmd_struct *arg1 = (struct comedi_cmd_struct *) 0 ;
 
1767
    unsigned int result;
 
1768
    VALUE vresult = Qnil;
 
1769
    
 
1770
    if ((argc < 0) || (argc > 0))
 
1771
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
1772
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_cmd_struct, 1);
 
1773
    result = (unsigned int) ((arg1)->start_src);
 
1774
    
 
1775
    vresult = UINT2NUM(result);
 
1776
    return vresult;
 
1777
}
 
1778
 
 
1779
 
 
1780
static VALUE
 
1781
_wrap_comedi_cmd_struct_start_arg_set(int argc, VALUE *argv, VALUE self) {
 
1782
    struct comedi_cmd_struct *arg1 = (struct comedi_cmd_struct *) 0 ;
 
1783
    unsigned int arg2 ;
 
1784
    
 
1785
    if ((argc < 1) || (argc > 1))
 
1786
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
1787
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_cmd_struct, 1);
 
1788
    arg2 = NUM2UINT(argv[0]);
 
1789
    if (arg1) (arg1)->start_arg = arg2;
 
1790
    
 
1791
    return Qnil;
 
1792
}
 
1793
 
 
1794
 
 
1795
static VALUE
 
1796
_wrap_comedi_cmd_struct_start_arg_get(int argc, VALUE *argv, VALUE self) {
 
1797
    struct comedi_cmd_struct *arg1 = (struct comedi_cmd_struct *) 0 ;
 
1798
    unsigned int result;
 
1799
    VALUE vresult = Qnil;
 
1800
    
 
1801
    if ((argc < 0) || (argc > 0))
 
1802
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
1803
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_cmd_struct, 1);
 
1804
    result = (unsigned int) ((arg1)->start_arg);
 
1805
    
 
1806
    vresult = UINT2NUM(result);
 
1807
    return vresult;
 
1808
}
 
1809
 
 
1810
 
 
1811
static VALUE
 
1812
_wrap_comedi_cmd_struct_scan_begin_src_set(int argc, VALUE *argv, VALUE self) {
 
1813
    struct comedi_cmd_struct *arg1 = (struct comedi_cmd_struct *) 0 ;
 
1814
    unsigned int arg2 ;
 
1815
    
 
1816
    if ((argc < 1) || (argc > 1))
 
1817
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
1818
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_cmd_struct, 1);
 
1819
    arg2 = NUM2UINT(argv[0]);
 
1820
    if (arg1) (arg1)->scan_begin_src = arg2;
 
1821
    
 
1822
    return Qnil;
 
1823
}
 
1824
 
 
1825
 
 
1826
static VALUE
 
1827
_wrap_comedi_cmd_struct_scan_begin_src_get(int argc, VALUE *argv, VALUE self) {
 
1828
    struct comedi_cmd_struct *arg1 = (struct comedi_cmd_struct *) 0 ;
 
1829
    unsigned int result;
 
1830
    VALUE vresult = Qnil;
 
1831
    
 
1832
    if ((argc < 0) || (argc > 0))
 
1833
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
1834
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_cmd_struct, 1);
 
1835
    result = (unsigned int) ((arg1)->scan_begin_src);
 
1836
    
 
1837
    vresult = UINT2NUM(result);
 
1838
    return vresult;
 
1839
}
 
1840
 
 
1841
 
 
1842
static VALUE
 
1843
_wrap_comedi_cmd_struct_scan_begin_arg_set(int argc, VALUE *argv, VALUE self) {
 
1844
    struct comedi_cmd_struct *arg1 = (struct comedi_cmd_struct *) 0 ;
 
1845
    unsigned int arg2 ;
 
1846
    
 
1847
    if ((argc < 1) || (argc > 1))
 
1848
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
1849
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_cmd_struct, 1);
 
1850
    arg2 = NUM2UINT(argv[0]);
 
1851
    if (arg1) (arg1)->scan_begin_arg = arg2;
 
1852
    
 
1853
    return Qnil;
 
1854
}
 
1855
 
 
1856
 
 
1857
static VALUE
 
1858
_wrap_comedi_cmd_struct_scan_begin_arg_get(int argc, VALUE *argv, VALUE self) {
 
1859
    struct comedi_cmd_struct *arg1 = (struct comedi_cmd_struct *) 0 ;
 
1860
    unsigned int result;
 
1861
    VALUE vresult = Qnil;
 
1862
    
 
1863
    if ((argc < 0) || (argc > 0))
 
1864
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
1865
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_cmd_struct, 1);
 
1866
    result = (unsigned int) ((arg1)->scan_begin_arg);
 
1867
    
 
1868
    vresult = UINT2NUM(result);
 
1869
    return vresult;
 
1870
}
 
1871
 
 
1872
 
 
1873
static VALUE
 
1874
_wrap_comedi_cmd_struct_convert_src_set(int argc, VALUE *argv, VALUE self) {
 
1875
    struct comedi_cmd_struct *arg1 = (struct comedi_cmd_struct *) 0 ;
 
1876
    unsigned int arg2 ;
 
1877
    
 
1878
    if ((argc < 1) || (argc > 1))
 
1879
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
1880
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_cmd_struct, 1);
 
1881
    arg2 = NUM2UINT(argv[0]);
 
1882
    if (arg1) (arg1)->convert_src = arg2;
 
1883
    
 
1884
    return Qnil;
 
1885
}
 
1886
 
 
1887
 
 
1888
static VALUE
 
1889
_wrap_comedi_cmd_struct_convert_src_get(int argc, VALUE *argv, VALUE self) {
 
1890
    struct comedi_cmd_struct *arg1 = (struct comedi_cmd_struct *) 0 ;
 
1891
    unsigned int result;
 
1892
    VALUE vresult = Qnil;
 
1893
    
 
1894
    if ((argc < 0) || (argc > 0))
 
1895
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
1896
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_cmd_struct, 1);
 
1897
    result = (unsigned int) ((arg1)->convert_src);
 
1898
    
 
1899
    vresult = UINT2NUM(result);
 
1900
    return vresult;
 
1901
}
 
1902
 
 
1903
 
 
1904
static VALUE
 
1905
_wrap_comedi_cmd_struct_convert_arg_set(int argc, VALUE *argv, VALUE self) {
 
1906
    struct comedi_cmd_struct *arg1 = (struct comedi_cmd_struct *) 0 ;
 
1907
    unsigned int arg2 ;
 
1908
    
 
1909
    if ((argc < 1) || (argc > 1))
 
1910
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
1911
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_cmd_struct, 1);
 
1912
    arg2 = NUM2UINT(argv[0]);
 
1913
    if (arg1) (arg1)->convert_arg = arg2;
 
1914
    
 
1915
    return Qnil;
 
1916
}
 
1917
 
 
1918
 
 
1919
static VALUE
 
1920
_wrap_comedi_cmd_struct_convert_arg_get(int argc, VALUE *argv, VALUE self) {
 
1921
    struct comedi_cmd_struct *arg1 = (struct comedi_cmd_struct *) 0 ;
 
1922
    unsigned int result;
 
1923
    VALUE vresult = Qnil;
 
1924
    
 
1925
    if ((argc < 0) || (argc > 0))
 
1926
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
1927
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_cmd_struct, 1);
 
1928
    result = (unsigned int) ((arg1)->convert_arg);
 
1929
    
 
1930
    vresult = UINT2NUM(result);
 
1931
    return vresult;
 
1932
}
 
1933
 
 
1934
 
 
1935
static VALUE
 
1936
_wrap_comedi_cmd_struct_scan_end_src_set(int argc, VALUE *argv, VALUE self) {
 
1937
    struct comedi_cmd_struct *arg1 = (struct comedi_cmd_struct *) 0 ;
 
1938
    unsigned int arg2 ;
 
1939
    
 
1940
    if ((argc < 1) || (argc > 1))
 
1941
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
1942
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_cmd_struct, 1);
 
1943
    arg2 = NUM2UINT(argv[0]);
 
1944
    if (arg1) (arg1)->scan_end_src = arg2;
 
1945
    
 
1946
    return Qnil;
 
1947
}
 
1948
 
 
1949
 
 
1950
static VALUE
 
1951
_wrap_comedi_cmd_struct_scan_end_src_get(int argc, VALUE *argv, VALUE self) {
 
1952
    struct comedi_cmd_struct *arg1 = (struct comedi_cmd_struct *) 0 ;
 
1953
    unsigned int result;
 
1954
    VALUE vresult = Qnil;
 
1955
    
 
1956
    if ((argc < 0) || (argc > 0))
 
1957
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
1958
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_cmd_struct, 1);
 
1959
    result = (unsigned int) ((arg1)->scan_end_src);
 
1960
    
 
1961
    vresult = UINT2NUM(result);
 
1962
    return vresult;
 
1963
}
 
1964
 
 
1965
 
 
1966
static VALUE
 
1967
_wrap_comedi_cmd_struct_scan_end_arg_set(int argc, VALUE *argv, VALUE self) {
 
1968
    struct comedi_cmd_struct *arg1 = (struct comedi_cmd_struct *) 0 ;
 
1969
    unsigned int arg2 ;
 
1970
    
 
1971
    if ((argc < 1) || (argc > 1))
 
1972
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
1973
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_cmd_struct, 1);
 
1974
    arg2 = NUM2UINT(argv[0]);
 
1975
    if (arg1) (arg1)->scan_end_arg = arg2;
 
1976
    
 
1977
    return Qnil;
 
1978
}
 
1979
 
 
1980
 
 
1981
static VALUE
 
1982
_wrap_comedi_cmd_struct_scan_end_arg_get(int argc, VALUE *argv, VALUE self) {
 
1983
    struct comedi_cmd_struct *arg1 = (struct comedi_cmd_struct *) 0 ;
 
1984
    unsigned int result;
 
1985
    VALUE vresult = Qnil;
 
1986
    
 
1987
    if ((argc < 0) || (argc > 0))
 
1988
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
1989
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_cmd_struct, 1);
 
1990
    result = (unsigned int) ((arg1)->scan_end_arg);
 
1991
    
 
1992
    vresult = UINT2NUM(result);
 
1993
    return vresult;
 
1994
}
 
1995
 
 
1996
 
 
1997
static VALUE
 
1998
_wrap_comedi_cmd_struct_stop_src_set(int argc, VALUE *argv, VALUE self) {
 
1999
    struct comedi_cmd_struct *arg1 = (struct comedi_cmd_struct *) 0 ;
 
2000
    unsigned int arg2 ;
 
2001
    
 
2002
    if ((argc < 1) || (argc > 1))
 
2003
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
2004
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_cmd_struct, 1);
 
2005
    arg2 = NUM2UINT(argv[0]);
 
2006
    if (arg1) (arg1)->stop_src = arg2;
 
2007
    
 
2008
    return Qnil;
 
2009
}
 
2010
 
 
2011
 
 
2012
static VALUE
 
2013
_wrap_comedi_cmd_struct_stop_src_get(int argc, VALUE *argv, VALUE self) {
 
2014
    struct comedi_cmd_struct *arg1 = (struct comedi_cmd_struct *) 0 ;
 
2015
    unsigned int result;
 
2016
    VALUE vresult = Qnil;
 
2017
    
 
2018
    if ((argc < 0) || (argc > 0))
 
2019
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
2020
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_cmd_struct, 1);
 
2021
    result = (unsigned int) ((arg1)->stop_src);
 
2022
    
 
2023
    vresult = UINT2NUM(result);
 
2024
    return vresult;
 
2025
}
 
2026
 
 
2027
 
 
2028
static VALUE
 
2029
_wrap_comedi_cmd_struct_stop_arg_set(int argc, VALUE *argv, VALUE self) {
 
2030
    struct comedi_cmd_struct *arg1 = (struct comedi_cmd_struct *) 0 ;
 
2031
    unsigned int arg2 ;
 
2032
    
 
2033
    if ((argc < 1) || (argc > 1))
 
2034
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
2035
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_cmd_struct, 1);
 
2036
    arg2 = NUM2UINT(argv[0]);
 
2037
    if (arg1) (arg1)->stop_arg = arg2;
 
2038
    
 
2039
    return Qnil;
 
2040
}
 
2041
 
 
2042
 
 
2043
static VALUE
 
2044
_wrap_comedi_cmd_struct_stop_arg_get(int argc, VALUE *argv, VALUE self) {
 
2045
    struct comedi_cmd_struct *arg1 = (struct comedi_cmd_struct *) 0 ;
 
2046
    unsigned int result;
 
2047
    VALUE vresult = Qnil;
 
2048
    
 
2049
    if ((argc < 0) || (argc > 0))
 
2050
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
2051
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_cmd_struct, 1);
 
2052
    result = (unsigned int) ((arg1)->stop_arg);
 
2053
    
 
2054
    vresult = UINT2NUM(result);
 
2055
    return vresult;
 
2056
}
 
2057
 
 
2058
 
 
2059
static VALUE
 
2060
_wrap_comedi_cmd_struct_chanlist_set(int argc, VALUE *argv, VALUE self) {
 
2061
    struct comedi_cmd_struct *arg1 = (struct comedi_cmd_struct *) 0 ;
 
2062
    unsigned int *arg2 = (unsigned int *) 0 ;
 
2063
    
 
2064
    if ((argc < 1) || (argc > 1))
 
2065
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
2066
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_cmd_struct, 1);
 
2067
    SWIG_ConvertPtr(argv[0], (void **) &arg2, SWIGTYPE_p_unsigned_int, 1);
 
2068
    if (arg1) (arg1)->chanlist = arg2;
 
2069
    
 
2070
    return Qnil;
 
2071
}
 
2072
 
 
2073
 
 
2074
static VALUE
 
2075
_wrap_comedi_cmd_struct_chanlist_get(int argc, VALUE *argv, VALUE self) {
 
2076
    struct comedi_cmd_struct *arg1 = (struct comedi_cmd_struct *) 0 ;
 
2077
    unsigned int *result;
 
2078
    VALUE vresult = Qnil;
 
2079
    
 
2080
    if ((argc < 0) || (argc > 0))
 
2081
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
2082
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_cmd_struct, 1);
 
2083
    result = (unsigned int *) ((arg1)->chanlist);
 
2084
    
 
2085
    vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_unsigned_int,0);
 
2086
    return vresult;
 
2087
}
 
2088
 
 
2089
 
 
2090
static VALUE
 
2091
_wrap_comedi_cmd_struct_chanlist_len_set(int argc, VALUE *argv, VALUE self) {
 
2092
    struct comedi_cmd_struct *arg1 = (struct comedi_cmd_struct *) 0 ;
 
2093
    unsigned int arg2 ;
 
2094
    
 
2095
    if ((argc < 1) || (argc > 1))
 
2096
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
2097
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_cmd_struct, 1);
 
2098
    arg2 = NUM2UINT(argv[0]);
 
2099
    if (arg1) (arg1)->chanlist_len = arg2;
 
2100
    
 
2101
    return Qnil;
 
2102
}
 
2103
 
 
2104
 
 
2105
static VALUE
 
2106
_wrap_comedi_cmd_struct_chanlist_len_get(int argc, VALUE *argv, VALUE self) {
 
2107
    struct comedi_cmd_struct *arg1 = (struct comedi_cmd_struct *) 0 ;
 
2108
    unsigned int result;
 
2109
    VALUE vresult = Qnil;
 
2110
    
 
2111
    if ((argc < 0) || (argc > 0))
 
2112
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
2113
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_cmd_struct, 1);
 
2114
    result = (unsigned int) ((arg1)->chanlist_len);
 
2115
    
 
2116
    vresult = UINT2NUM(result);
 
2117
    return vresult;
 
2118
}
 
2119
 
 
2120
 
 
2121
static VALUE
 
2122
_wrap_comedi_cmd_struct_data_set(int argc, VALUE *argv, VALUE self) {
 
2123
    struct comedi_cmd_struct *arg1 = (struct comedi_cmd_struct *) 0 ;
 
2124
    sampl_t *arg2 = (sampl_t *) 0 ;
 
2125
    
 
2126
    if ((argc < 1) || (argc > 1))
 
2127
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
2128
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_cmd_struct, 1);
 
2129
    SWIG_ConvertPtr(argv[0], (void **) &arg2, SWIGTYPE_p_sampl_t, 1);
 
2130
    if (arg1) (arg1)->data = arg2;
 
2131
    
 
2132
    return Qnil;
 
2133
}
 
2134
 
 
2135
 
 
2136
static VALUE
 
2137
_wrap_comedi_cmd_struct_data_get(int argc, VALUE *argv, VALUE self) {
 
2138
    struct comedi_cmd_struct *arg1 = (struct comedi_cmd_struct *) 0 ;
 
2139
    sampl_t *result;
 
2140
    VALUE vresult = Qnil;
 
2141
    
 
2142
    if ((argc < 0) || (argc > 0))
 
2143
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
2144
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_cmd_struct, 1);
 
2145
    result = (sampl_t *) ((arg1)->data);
 
2146
    
 
2147
    vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_sampl_t,0);
 
2148
    return vresult;
 
2149
}
 
2150
 
 
2151
 
 
2152
static VALUE
 
2153
_wrap_comedi_cmd_struct_data_len_set(int argc, VALUE *argv, VALUE self) {
 
2154
    struct comedi_cmd_struct *arg1 = (struct comedi_cmd_struct *) 0 ;
 
2155
    unsigned int arg2 ;
 
2156
    
 
2157
    if ((argc < 1) || (argc > 1))
 
2158
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
2159
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_cmd_struct, 1);
 
2160
    arg2 = NUM2UINT(argv[0]);
 
2161
    if (arg1) (arg1)->data_len = arg2;
 
2162
    
 
2163
    return Qnil;
 
2164
}
 
2165
 
 
2166
 
 
2167
static VALUE
 
2168
_wrap_comedi_cmd_struct_data_len_get(int argc, VALUE *argv, VALUE self) {
 
2169
    struct comedi_cmd_struct *arg1 = (struct comedi_cmd_struct *) 0 ;
 
2170
    unsigned int result;
 
2171
    VALUE vresult = Qnil;
 
2172
    
 
2173
    if ((argc < 0) || (argc > 0))
 
2174
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
2175
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_cmd_struct, 1);
 
2176
    result = (unsigned int) ((arg1)->data_len);
 
2177
    
 
2178
    vresult = UINT2NUM(result);
 
2179
    return vresult;
 
2180
}
 
2181
 
 
2182
 
 
2183
#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
 
2184
static VALUE
 
2185
_wrap_comedi_cmd_struct_allocate(VALUE self) {
 
2186
#else
 
2187
    static VALUE
 
2188
    _wrap_comedi_cmd_struct_allocate(int argc, VALUE *argv, VALUE self) {
 
2189
#endif
 
2190
        
 
2191
        
 
2192
        VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_comedi_cmd_struct);
 
2193
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
 
2194
        rb_obj_call_init(vresult, argc, argv);
 
2195
#endif
 
2196
        return vresult;
 
2197
    }
 
2198
    
 
2199
 
 
2200
static VALUE
 
2201
_wrap_new_comedi_cmd_struct(int argc, VALUE *argv, VALUE self) {
 
2202
    struct comedi_cmd_struct *result;
 
2203
    
 
2204
    if ((argc < 0) || (argc > 0))
 
2205
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
2206
    result = (struct comedi_cmd_struct *)(struct comedi_cmd_struct *) calloc(1, sizeof(struct comedi_cmd_struct));
 
2207
    DATA_PTR(self) = result;
 
2208
    return self;
 
2209
}
 
2210
 
 
2211
 
 
2212
static void
 
2213
free_comedi_cmd_struct(struct comedi_cmd_struct *arg1) {
 
2214
    free((char*) arg1);
 
2215
}
 
2216
static VALUE
 
2217
_wrap_comedi_chaninfo_struct_subdev_set(int argc, VALUE *argv, VALUE self) {
 
2218
    struct comedi_chaninfo_struct *arg1 = (struct comedi_chaninfo_struct *) 0 ;
 
2219
    unsigned int arg2 ;
 
2220
    
 
2221
    if ((argc < 1) || (argc > 1))
 
2222
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
2223
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_chaninfo_struct, 1);
 
2224
    arg2 = NUM2UINT(argv[0]);
 
2225
    if (arg1) (arg1)->subdev = arg2;
 
2226
    
 
2227
    return Qnil;
 
2228
}
 
2229
 
 
2230
 
 
2231
static VALUE
 
2232
_wrap_comedi_chaninfo_struct_subdev_get(int argc, VALUE *argv, VALUE self) {
 
2233
    struct comedi_chaninfo_struct *arg1 = (struct comedi_chaninfo_struct *) 0 ;
 
2234
    unsigned int result;
 
2235
    VALUE vresult = Qnil;
 
2236
    
 
2237
    if ((argc < 0) || (argc > 0))
 
2238
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
2239
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_chaninfo_struct, 1);
 
2240
    result = (unsigned int) ((arg1)->subdev);
 
2241
    
 
2242
    vresult = UINT2NUM(result);
 
2243
    return vresult;
 
2244
}
 
2245
 
 
2246
 
 
2247
static VALUE
 
2248
_wrap_comedi_chaninfo_struct_maxdata_list_set(int argc, VALUE *argv, VALUE self) {
 
2249
    struct comedi_chaninfo_struct *arg1 = (struct comedi_chaninfo_struct *) 0 ;
 
2250
    lsampl_t *arg2 = (lsampl_t *) 0 ;
 
2251
    
 
2252
    if ((argc < 1) || (argc > 1))
 
2253
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
2254
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_chaninfo_struct, 1);
 
2255
    SWIG_ConvertPtr(argv[0], (void **) &arg2, SWIGTYPE_p_lsampl_t, 1);
 
2256
    if (arg1) (arg1)->maxdata_list = arg2;
 
2257
    
 
2258
    return Qnil;
 
2259
}
 
2260
 
 
2261
 
 
2262
static VALUE
 
2263
_wrap_comedi_chaninfo_struct_maxdata_list_get(int argc, VALUE *argv, VALUE self) {
 
2264
    struct comedi_chaninfo_struct *arg1 = (struct comedi_chaninfo_struct *) 0 ;
 
2265
    lsampl_t *result;
 
2266
    VALUE vresult = Qnil;
 
2267
    
 
2268
    if ((argc < 0) || (argc > 0))
 
2269
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
2270
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_chaninfo_struct, 1);
 
2271
    result = (lsampl_t *) ((arg1)->maxdata_list);
 
2272
    
 
2273
    vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_lsampl_t,0);
 
2274
    return vresult;
 
2275
}
 
2276
 
 
2277
 
 
2278
static VALUE
 
2279
_wrap_comedi_chaninfo_struct_flaglist_set(int argc, VALUE *argv, VALUE self) {
 
2280
    struct comedi_chaninfo_struct *arg1 = (struct comedi_chaninfo_struct *) 0 ;
 
2281
    unsigned int *arg2 = (unsigned int *) 0 ;
 
2282
    
 
2283
    if ((argc < 1) || (argc > 1))
 
2284
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
2285
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_chaninfo_struct, 1);
 
2286
    SWIG_ConvertPtr(argv[0], (void **) &arg2, SWIGTYPE_p_unsigned_int, 1);
 
2287
    if (arg1) (arg1)->flaglist = arg2;
 
2288
    
 
2289
    return Qnil;
 
2290
}
 
2291
 
 
2292
 
 
2293
static VALUE
 
2294
_wrap_comedi_chaninfo_struct_flaglist_get(int argc, VALUE *argv, VALUE self) {
 
2295
    struct comedi_chaninfo_struct *arg1 = (struct comedi_chaninfo_struct *) 0 ;
 
2296
    unsigned int *result;
 
2297
    VALUE vresult = Qnil;
 
2298
    
 
2299
    if ((argc < 0) || (argc > 0))
 
2300
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
2301
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_chaninfo_struct, 1);
 
2302
    result = (unsigned int *) ((arg1)->flaglist);
 
2303
    
 
2304
    vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_unsigned_int,0);
 
2305
    return vresult;
 
2306
}
 
2307
 
 
2308
 
 
2309
static VALUE
 
2310
_wrap_comedi_chaninfo_struct_rangelist_set(int argc, VALUE *argv, VALUE self) {
 
2311
    struct comedi_chaninfo_struct *arg1 = (struct comedi_chaninfo_struct *) 0 ;
 
2312
    unsigned int *arg2 = (unsigned int *) 0 ;
 
2313
    
 
2314
    if ((argc < 1) || (argc > 1))
 
2315
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
2316
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_chaninfo_struct, 1);
 
2317
    SWIG_ConvertPtr(argv[0], (void **) &arg2, SWIGTYPE_p_unsigned_int, 1);
 
2318
    if (arg1) (arg1)->rangelist = arg2;
 
2319
    
 
2320
    return Qnil;
 
2321
}
 
2322
 
 
2323
 
 
2324
static VALUE
 
2325
_wrap_comedi_chaninfo_struct_rangelist_get(int argc, VALUE *argv, VALUE self) {
 
2326
    struct comedi_chaninfo_struct *arg1 = (struct comedi_chaninfo_struct *) 0 ;
 
2327
    unsigned int *result;
 
2328
    VALUE vresult = Qnil;
 
2329
    
 
2330
    if ((argc < 0) || (argc > 0))
 
2331
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
2332
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_chaninfo_struct, 1);
 
2333
    result = (unsigned int *) ((arg1)->rangelist);
 
2334
    
 
2335
    vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_unsigned_int,0);
 
2336
    return vresult;
 
2337
}
 
2338
 
 
2339
 
 
2340
static VALUE
 
2341
_wrap_comedi_chaninfo_struct_unused_set(int argc, VALUE *argv, VALUE self) {
 
2342
    struct comedi_chaninfo_struct *arg1 = (struct comedi_chaninfo_struct *) 0 ;
 
2343
    unsigned int *arg2 ;
 
2344
    
 
2345
    if ((argc < 1) || (argc > 1))
 
2346
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
2347
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_chaninfo_struct, 1);
 
2348
    SWIG_ConvertPtr(argv[0], (void **) &arg2, SWIGTYPE_p_unsigned_int, 1);
 
2349
    {
 
2350
        int ii;
 
2351
        unsigned int *b = (unsigned int *) arg1->unused;
 
2352
        for (ii = 0; ii < 4; ii++) b[ii] = *((unsigned int *) arg2 + ii);
 
2353
    }
 
2354
    return Qnil;
 
2355
}
 
2356
 
 
2357
 
 
2358
static VALUE
 
2359
_wrap_comedi_chaninfo_struct_unused_get(int argc, VALUE *argv, VALUE self) {
 
2360
    struct comedi_chaninfo_struct *arg1 = (struct comedi_chaninfo_struct *) 0 ;
 
2361
    unsigned int *result;
 
2362
    VALUE vresult = Qnil;
 
2363
    
 
2364
    if ((argc < 0) || (argc > 0))
 
2365
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
2366
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_chaninfo_struct, 1);
 
2367
    result = (unsigned int *)(unsigned int *) ((arg1)->unused);
 
2368
    
 
2369
    vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_unsigned_int,0);
 
2370
    return vresult;
 
2371
}
 
2372
 
 
2373
 
 
2374
#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
 
2375
static VALUE
 
2376
_wrap_comedi_chaninfo_struct_allocate(VALUE self) {
 
2377
#else
 
2378
    static VALUE
 
2379
    _wrap_comedi_chaninfo_struct_allocate(int argc, VALUE *argv, VALUE self) {
 
2380
#endif
 
2381
        
 
2382
        
 
2383
        VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_comedi_chaninfo_struct);
 
2384
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
 
2385
        rb_obj_call_init(vresult, argc, argv);
 
2386
#endif
 
2387
        return vresult;
 
2388
    }
 
2389
    
 
2390
 
 
2391
static VALUE
 
2392
_wrap_new_comedi_chaninfo_struct(int argc, VALUE *argv, VALUE self) {
 
2393
    struct comedi_chaninfo_struct *result;
 
2394
    
 
2395
    if ((argc < 0) || (argc > 0))
 
2396
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
2397
    result = (struct comedi_chaninfo_struct *)(struct comedi_chaninfo_struct *) calloc(1, sizeof(struct comedi_chaninfo_struct));
 
2398
    DATA_PTR(self) = result;
 
2399
    return self;
 
2400
}
 
2401
 
 
2402
 
 
2403
static void
 
2404
free_comedi_chaninfo_struct(struct comedi_chaninfo_struct *arg1) {
 
2405
    free((char*) arg1);
 
2406
}
 
2407
static VALUE
 
2408
_wrap_comedi_rangeinfo_struct_range_type_set(int argc, VALUE *argv, VALUE self) {
 
2409
    struct comedi_rangeinfo_struct *arg1 = (struct comedi_rangeinfo_struct *) 0 ;
 
2410
    unsigned int arg2 ;
 
2411
    
 
2412
    if ((argc < 1) || (argc > 1))
 
2413
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
2414
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_rangeinfo_struct, 1);
 
2415
    arg2 = NUM2UINT(argv[0]);
 
2416
    if (arg1) (arg1)->range_type = arg2;
 
2417
    
 
2418
    return Qnil;
 
2419
}
 
2420
 
 
2421
 
 
2422
static VALUE
 
2423
_wrap_comedi_rangeinfo_struct_range_type_get(int argc, VALUE *argv, VALUE self) {
 
2424
    struct comedi_rangeinfo_struct *arg1 = (struct comedi_rangeinfo_struct *) 0 ;
 
2425
    unsigned int result;
 
2426
    VALUE vresult = Qnil;
 
2427
    
 
2428
    if ((argc < 0) || (argc > 0))
 
2429
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
2430
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_rangeinfo_struct, 1);
 
2431
    result = (unsigned int) ((arg1)->range_type);
 
2432
    
 
2433
    vresult = UINT2NUM(result);
 
2434
    return vresult;
 
2435
}
 
2436
 
 
2437
 
 
2438
static VALUE
 
2439
_wrap_comedi_rangeinfo_struct_range_ptr_set(int argc, VALUE *argv, VALUE self) {
 
2440
    struct comedi_rangeinfo_struct *arg1 = (struct comedi_rangeinfo_struct *) 0 ;
 
2441
    void *arg2 = (void *) 0 ;
 
2442
    
 
2443
    if ((argc < 1) || (argc > 1))
 
2444
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
2445
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_rangeinfo_struct, 1);
 
2446
    SWIG_ConvertPtr(argv[0], (void **) &arg2, 0, 1);
 
2447
    if (arg1) (arg1)->range_ptr = arg2;
 
2448
    
 
2449
    return Qnil;
 
2450
}
 
2451
 
 
2452
 
 
2453
static VALUE
 
2454
_wrap_comedi_rangeinfo_struct_range_ptr_get(int argc, VALUE *argv, VALUE self) {
 
2455
    struct comedi_rangeinfo_struct *arg1 = (struct comedi_rangeinfo_struct *) 0 ;
 
2456
    void *result;
 
2457
    VALUE vresult = Qnil;
 
2458
    
 
2459
    if ((argc < 0) || (argc > 0))
 
2460
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
2461
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_rangeinfo_struct, 1);
 
2462
    result = (void *) ((arg1)->range_ptr);
 
2463
    
 
2464
    vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_void,0);
 
2465
    return vresult;
 
2466
}
 
2467
 
 
2468
 
 
2469
#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
 
2470
static VALUE
 
2471
_wrap_comedi_rangeinfo_struct_allocate(VALUE self) {
 
2472
#else
 
2473
    static VALUE
 
2474
    _wrap_comedi_rangeinfo_struct_allocate(int argc, VALUE *argv, VALUE self) {
 
2475
#endif
 
2476
        
 
2477
        
 
2478
        VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_comedi_rangeinfo_struct);
 
2479
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
 
2480
        rb_obj_call_init(vresult, argc, argv);
 
2481
#endif
 
2482
        return vresult;
 
2483
    }
 
2484
    
 
2485
 
 
2486
static VALUE
 
2487
_wrap_new_comedi_rangeinfo_struct(int argc, VALUE *argv, VALUE self) {
 
2488
    struct comedi_rangeinfo_struct *result;
 
2489
    
 
2490
    if ((argc < 0) || (argc > 0))
 
2491
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
2492
    result = (struct comedi_rangeinfo_struct *)(struct comedi_rangeinfo_struct *) calloc(1, sizeof(struct comedi_rangeinfo_struct));
 
2493
    DATA_PTR(self) = result;
 
2494
    return self;
 
2495
}
 
2496
 
 
2497
 
 
2498
static void
 
2499
free_comedi_rangeinfo_struct(struct comedi_rangeinfo_struct *arg1) {
 
2500
    free((char*) arg1);
 
2501
}
 
2502
static VALUE
 
2503
_wrap_comedi_krange_struct_min_set(int argc, VALUE *argv, VALUE self) {
 
2504
    struct comedi_krange_struct *arg1 = (struct comedi_krange_struct *) 0 ;
 
2505
    int arg2 ;
 
2506
    
 
2507
    if ((argc < 1) || (argc > 1))
 
2508
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
2509
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_krange_struct, 1);
 
2510
    arg2 = NUM2INT(argv[0]);
 
2511
    if (arg1) (arg1)->min = arg2;
 
2512
    
 
2513
    return Qnil;
 
2514
}
 
2515
 
 
2516
 
 
2517
static VALUE
 
2518
_wrap_comedi_krange_struct_min_get(int argc, VALUE *argv, VALUE self) {
 
2519
    struct comedi_krange_struct *arg1 = (struct comedi_krange_struct *) 0 ;
 
2520
    int result;
 
2521
    VALUE vresult = Qnil;
 
2522
    
 
2523
    if ((argc < 0) || (argc > 0))
 
2524
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
2525
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_krange_struct, 1);
 
2526
    result = (int) ((arg1)->min);
 
2527
    
 
2528
    vresult = INT2NUM(result);
 
2529
    return vresult;
 
2530
}
 
2531
 
 
2532
 
 
2533
static VALUE
 
2534
_wrap_comedi_krange_struct_max_set(int argc, VALUE *argv, VALUE self) {
 
2535
    struct comedi_krange_struct *arg1 = (struct comedi_krange_struct *) 0 ;
 
2536
    int arg2 ;
 
2537
    
 
2538
    if ((argc < 1) || (argc > 1))
 
2539
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
2540
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_krange_struct, 1);
 
2541
    arg2 = NUM2INT(argv[0]);
 
2542
    if (arg1) (arg1)->max = arg2;
 
2543
    
 
2544
    return Qnil;
 
2545
}
 
2546
 
 
2547
 
 
2548
static VALUE
 
2549
_wrap_comedi_krange_struct_max_get(int argc, VALUE *argv, VALUE self) {
 
2550
    struct comedi_krange_struct *arg1 = (struct comedi_krange_struct *) 0 ;
 
2551
    int result;
 
2552
    VALUE vresult = Qnil;
 
2553
    
 
2554
    if ((argc < 0) || (argc > 0))
 
2555
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
2556
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_krange_struct, 1);
 
2557
    result = (int) ((arg1)->max);
 
2558
    
 
2559
    vresult = INT2NUM(result);
 
2560
    return vresult;
 
2561
}
 
2562
 
 
2563
 
 
2564
static VALUE
 
2565
_wrap_comedi_krange_struct_flags_set(int argc, VALUE *argv, VALUE self) {
 
2566
    struct comedi_krange_struct *arg1 = (struct comedi_krange_struct *) 0 ;
 
2567
    unsigned int arg2 ;
 
2568
    
 
2569
    if ((argc < 1) || (argc > 1))
 
2570
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
2571
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_krange_struct, 1);
 
2572
    arg2 = NUM2UINT(argv[0]);
 
2573
    if (arg1) (arg1)->flags = arg2;
 
2574
    
 
2575
    return Qnil;
 
2576
}
 
2577
 
 
2578
 
 
2579
static VALUE
 
2580
_wrap_comedi_krange_struct_flags_get(int argc, VALUE *argv, VALUE self) {
 
2581
    struct comedi_krange_struct *arg1 = (struct comedi_krange_struct *) 0 ;
 
2582
    unsigned int result;
 
2583
    VALUE vresult = Qnil;
 
2584
    
 
2585
    if ((argc < 0) || (argc > 0))
 
2586
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
2587
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_krange_struct, 1);
 
2588
    result = (unsigned int) ((arg1)->flags);
 
2589
    
 
2590
    vresult = UINT2NUM(result);
 
2591
    return vresult;
 
2592
}
 
2593
 
 
2594
 
 
2595
#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
 
2596
static VALUE
 
2597
_wrap_comedi_krange_struct_allocate(VALUE self) {
 
2598
#else
 
2599
    static VALUE
 
2600
    _wrap_comedi_krange_struct_allocate(int argc, VALUE *argv, VALUE self) {
 
2601
#endif
 
2602
        
 
2603
        
 
2604
        VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_comedi_krange_struct);
 
2605
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
 
2606
        rb_obj_call_init(vresult, argc, argv);
 
2607
#endif
 
2608
        return vresult;
 
2609
    }
 
2610
    
 
2611
 
 
2612
static VALUE
 
2613
_wrap_new_comedi_krange_struct(int argc, VALUE *argv, VALUE self) {
 
2614
    struct comedi_krange_struct *result;
 
2615
    
 
2616
    if ((argc < 0) || (argc > 0))
 
2617
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
2618
    result = (struct comedi_krange_struct *)(struct comedi_krange_struct *) calloc(1, sizeof(struct comedi_krange_struct));
 
2619
    DATA_PTR(self) = result;
 
2620
    return self;
 
2621
}
 
2622
 
 
2623
 
 
2624
static void
 
2625
free_comedi_krange_struct(struct comedi_krange_struct *arg1) {
 
2626
    free((char*) arg1);
 
2627
}
 
2628
static VALUE
 
2629
_wrap_comedi_subdinfo_struct_type_set(int argc, VALUE *argv, VALUE self) {
 
2630
    struct comedi_subdinfo_struct *arg1 = (struct comedi_subdinfo_struct *) 0 ;
 
2631
    unsigned int arg2 ;
 
2632
    
 
2633
    if ((argc < 1) || (argc > 1))
 
2634
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
2635
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_subdinfo_struct, 1);
 
2636
    arg2 = NUM2UINT(argv[0]);
 
2637
    if (arg1) (arg1)->type = arg2;
 
2638
    
 
2639
    return Qnil;
 
2640
}
 
2641
 
 
2642
 
 
2643
static VALUE
 
2644
_wrap_comedi_subdinfo_struct_type_get(int argc, VALUE *argv, VALUE self) {
 
2645
    struct comedi_subdinfo_struct *arg1 = (struct comedi_subdinfo_struct *) 0 ;
 
2646
    unsigned int result;
 
2647
    VALUE vresult = Qnil;
 
2648
    
 
2649
    if ((argc < 0) || (argc > 0))
 
2650
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
2651
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_subdinfo_struct, 1);
 
2652
    result = (unsigned int) ((arg1)->type);
 
2653
    
 
2654
    vresult = UINT2NUM(result);
 
2655
    return vresult;
 
2656
}
 
2657
 
 
2658
 
 
2659
static VALUE
 
2660
_wrap_comedi_subdinfo_struct_n_chan_set(int argc, VALUE *argv, VALUE self) {
 
2661
    struct comedi_subdinfo_struct *arg1 = (struct comedi_subdinfo_struct *) 0 ;
 
2662
    unsigned int arg2 ;
 
2663
    
 
2664
    if ((argc < 1) || (argc > 1))
 
2665
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
2666
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_subdinfo_struct, 1);
 
2667
    arg2 = NUM2UINT(argv[0]);
 
2668
    if (arg1) (arg1)->n_chan = arg2;
 
2669
    
 
2670
    return Qnil;
 
2671
}
 
2672
 
 
2673
 
 
2674
static VALUE
 
2675
_wrap_comedi_subdinfo_struct_n_chan_get(int argc, VALUE *argv, VALUE self) {
 
2676
    struct comedi_subdinfo_struct *arg1 = (struct comedi_subdinfo_struct *) 0 ;
 
2677
    unsigned int result;
 
2678
    VALUE vresult = Qnil;
 
2679
    
 
2680
    if ((argc < 0) || (argc > 0))
 
2681
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
2682
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_subdinfo_struct, 1);
 
2683
    result = (unsigned int) ((arg1)->n_chan);
 
2684
    
 
2685
    vresult = UINT2NUM(result);
 
2686
    return vresult;
 
2687
}
 
2688
 
 
2689
 
 
2690
static VALUE
 
2691
_wrap_comedi_subdinfo_struct_subd_flags_set(int argc, VALUE *argv, VALUE self) {
 
2692
    struct comedi_subdinfo_struct *arg1 = (struct comedi_subdinfo_struct *) 0 ;
 
2693
    unsigned int arg2 ;
 
2694
    
 
2695
    if ((argc < 1) || (argc > 1))
 
2696
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
2697
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_subdinfo_struct, 1);
 
2698
    arg2 = NUM2UINT(argv[0]);
 
2699
    if (arg1) (arg1)->subd_flags = arg2;
 
2700
    
 
2701
    return Qnil;
 
2702
}
 
2703
 
 
2704
 
 
2705
static VALUE
 
2706
_wrap_comedi_subdinfo_struct_subd_flags_get(int argc, VALUE *argv, VALUE self) {
 
2707
    struct comedi_subdinfo_struct *arg1 = (struct comedi_subdinfo_struct *) 0 ;
 
2708
    unsigned int result;
 
2709
    VALUE vresult = Qnil;
 
2710
    
 
2711
    if ((argc < 0) || (argc > 0))
 
2712
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
2713
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_subdinfo_struct, 1);
 
2714
    result = (unsigned int) ((arg1)->subd_flags);
 
2715
    
 
2716
    vresult = UINT2NUM(result);
 
2717
    return vresult;
 
2718
}
 
2719
 
 
2720
 
 
2721
static VALUE
 
2722
_wrap_comedi_subdinfo_struct_timer_type_set(int argc, VALUE *argv, VALUE self) {
 
2723
    struct comedi_subdinfo_struct *arg1 = (struct comedi_subdinfo_struct *) 0 ;
 
2724
    unsigned int arg2 ;
 
2725
    
 
2726
    if ((argc < 1) || (argc > 1))
 
2727
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
2728
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_subdinfo_struct, 1);
 
2729
    arg2 = NUM2UINT(argv[0]);
 
2730
    if (arg1) (arg1)->timer_type = arg2;
 
2731
    
 
2732
    return Qnil;
 
2733
}
 
2734
 
 
2735
 
 
2736
static VALUE
 
2737
_wrap_comedi_subdinfo_struct_timer_type_get(int argc, VALUE *argv, VALUE self) {
 
2738
    struct comedi_subdinfo_struct *arg1 = (struct comedi_subdinfo_struct *) 0 ;
 
2739
    unsigned int result;
 
2740
    VALUE vresult = Qnil;
 
2741
    
 
2742
    if ((argc < 0) || (argc > 0))
 
2743
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
2744
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_subdinfo_struct, 1);
 
2745
    result = (unsigned int) ((arg1)->timer_type);
 
2746
    
 
2747
    vresult = UINT2NUM(result);
 
2748
    return vresult;
 
2749
}
 
2750
 
 
2751
 
 
2752
static VALUE
 
2753
_wrap_comedi_subdinfo_struct_len_chanlist_set(int argc, VALUE *argv, VALUE self) {
 
2754
    struct comedi_subdinfo_struct *arg1 = (struct comedi_subdinfo_struct *) 0 ;
 
2755
    unsigned int arg2 ;
 
2756
    
 
2757
    if ((argc < 1) || (argc > 1))
 
2758
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
2759
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_subdinfo_struct, 1);
 
2760
    arg2 = NUM2UINT(argv[0]);
 
2761
    if (arg1) (arg1)->len_chanlist = arg2;
 
2762
    
 
2763
    return Qnil;
 
2764
}
 
2765
 
 
2766
 
 
2767
static VALUE
 
2768
_wrap_comedi_subdinfo_struct_len_chanlist_get(int argc, VALUE *argv, VALUE self) {
 
2769
    struct comedi_subdinfo_struct *arg1 = (struct comedi_subdinfo_struct *) 0 ;
 
2770
    unsigned int result;
 
2771
    VALUE vresult = Qnil;
 
2772
    
 
2773
    if ((argc < 0) || (argc > 0))
 
2774
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
2775
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_subdinfo_struct, 1);
 
2776
    result = (unsigned int) ((arg1)->len_chanlist);
 
2777
    
 
2778
    vresult = UINT2NUM(result);
 
2779
    return vresult;
 
2780
}
 
2781
 
 
2782
 
 
2783
static VALUE
 
2784
_wrap_comedi_subdinfo_struct_maxdata_set(int argc, VALUE *argv, VALUE self) {
 
2785
    struct comedi_subdinfo_struct *arg1 = (struct comedi_subdinfo_struct *) 0 ;
 
2786
    lsampl_t arg2 ;
 
2787
    
 
2788
    if ((argc < 1) || (argc > 1))
 
2789
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
2790
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_subdinfo_struct, 1);
 
2791
    arg2 = NUM2UINT(argv[0]);
 
2792
    if (arg1) (arg1)->maxdata = arg2;
 
2793
    
 
2794
    return Qnil;
 
2795
}
 
2796
 
 
2797
 
 
2798
static VALUE
 
2799
_wrap_comedi_subdinfo_struct_maxdata_get(int argc, VALUE *argv, VALUE self) {
 
2800
    struct comedi_subdinfo_struct *arg1 = (struct comedi_subdinfo_struct *) 0 ;
 
2801
    lsampl_t result;
 
2802
    VALUE vresult = Qnil;
 
2803
    
 
2804
    if ((argc < 0) || (argc > 0))
 
2805
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
2806
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_subdinfo_struct, 1);
 
2807
    result = (lsampl_t) ((arg1)->maxdata);
 
2808
    
 
2809
    vresult = UINT2NUM(result);
 
2810
    return vresult;
 
2811
}
 
2812
 
 
2813
 
 
2814
static VALUE
 
2815
_wrap_comedi_subdinfo_struct_flags_set(int argc, VALUE *argv, VALUE self) {
 
2816
    struct comedi_subdinfo_struct *arg1 = (struct comedi_subdinfo_struct *) 0 ;
 
2817
    unsigned int arg2 ;
 
2818
    
 
2819
    if ((argc < 1) || (argc > 1))
 
2820
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
2821
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_subdinfo_struct, 1);
 
2822
    arg2 = NUM2UINT(argv[0]);
 
2823
    if (arg1) (arg1)->flags = arg2;
 
2824
    
 
2825
    return Qnil;
 
2826
}
 
2827
 
 
2828
 
 
2829
static VALUE
 
2830
_wrap_comedi_subdinfo_struct_flags_get(int argc, VALUE *argv, VALUE self) {
 
2831
    struct comedi_subdinfo_struct *arg1 = (struct comedi_subdinfo_struct *) 0 ;
 
2832
    unsigned int result;
 
2833
    VALUE vresult = Qnil;
 
2834
    
 
2835
    if ((argc < 0) || (argc > 0))
 
2836
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
2837
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_subdinfo_struct, 1);
 
2838
    result = (unsigned int) ((arg1)->flags);
 
2839
    
 
2840
    vresult = UINT2NUM(result);
 
2841
    return vresult;
 
2842
}
 
2843
 
 
2844
 
 
2845
static VALUE
 
2846
_wrap_comedi_subdinfo_struct_range_type_set(int argc, VALUE *argv, VALUE self) {
 
2847
    struct comedi_subdinfo_struct *arg1 = (struct comedi_subdinfo_struct *) 0 ;
 
2848
    unsigned int arg2 ;
 
2849
    
 
2850
    if ((argc < 1) || (argc > 1))
 
2851
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
2852
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_subdinfo_struct, 1);
 
2853
    arg2 = NUM2UINT(argv[0]);
 
2854
    if (arg1) (arg1)->range_type = arg2;
 
2855
    
 
2856
    return Qnil;
 
2857
}
 
2858
 
 
2859
 
 
2860
static VALUE
 
2861
_wrap_comedi_subdinfo_struct_range_type_get(int argc, VALUE *argv, VALUE self) {
 
2862
    struct comedi_subdinfo_struct *arg1 = (struct comedi_subdinfo_struct *) 0 ;
 
2863
    unsigned int result;
 
2864
    VALUE vresult = Qnil;
 
2865
    
 
2866
    if ((argc < 0) || (argc > 0))
 
2867
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
2868
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_subdinfo_struct, 1);
 
2869
    result = (unsigned int) ((arg1)->range_type);
 
2870
    
 
2871
    vresult = UINT2NUM(result);
 
2872
    return vresult;
 
2873
}
 
2874
 
 
2875
 
 
2876
static VALUE
 
2877
_wrap_comedi_subdinfo_struct_settling_time_0_set(int argc, VALUE *argv, VALUE self) {
 
2878
    struct comedi_subdinfo_struct *arg1 = (struct comedi_subdinfo_struct *) 0 ;
 
2879
    unsigned int arg2 ;
 
2880
    
 
2881
    if ((argc < 1) || (argc > 1))
 
2882
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
2883
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_subdinfo_struct, 1);
 
2884
    arg2 = NUM2UINT(argv[0]);
 
2885
    if (arg1) (arg1)->settling_time_0 = arg2;
 
2886
    
 
2887
    return Qnil;
 
2888
}
 
2889
 
 
2890
 
 
2891
static VALUE
 
2892
_wrap_comedi_subdinfo_struct_settling_time_0_get(int argc, VALUE *argv, VALUE self) {
 
2893
    struct comedi_subdinfo_struct *arg1 = (struct comedi_subdinfo_struct *) 0 ;
 
2894
    unsigned int result;
 
2895
    VALUE vresult = Qnil;
 
2896
    
 
2897
    if ((argc < 0) || (argc > 0))
 
2898
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
2899
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_subdinfo_struct, 1);
 
2900
    result = (unsigned int) ((arg1)->settling_time_0);
 
2901
    
 
2902
    vresult = UINT2NUM(result);
 
2903
    return vresult;
 
2904
}
 
2905
 
 
2906
 
 
2907
static VALUE
 
2908
_wrap_comedi_subdinfo_struct_unused_set(int argc, VALUE *argv, VALUE self) {
 
2909
    struct comedi_subdinfo_struct *arg1 = (struct comedi_subdinfo_struct *) 0 ;
 
2910
    unsigned int *arg2 ;
 
2911
    
 
2912
    if ((argc < 1) || (argc > 1))
 
2913
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
2914
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_subdinfo_struct, 1);
 
2915
    SWIG_ConvertPtr(argv[0], (void **) &arg2, SWIGTYPE_p_unsigned_int, 1);
 
2916
    {
 
2917
        int ii;
 
2918
        unsigned int *b = (unsigned int *) arg1->unused;
 
2919
        for (ii = 0; ii < 9; ii++) b[ii] = *((unsigned int *) arg2 + ii);
 
2920
    }
 
2921
    return Qnil;
 
2922
}
 
2923
 
 
2924
 
 
2925
static VALUE
 
2926
_wrap_comedi_subdinfo_struct_unused_get(int argc, VALUE *argv, VALUE self) {
 
2927
    struct comedi_subdinfo_struct *arg1 = (struct comedi_subdinfo_struct *) 0 ;
 
2928
    unsigned int *result;
 
2929
    VALUE vresult = Qnil;
 
2930
    
 
2931
    if ((argc < 0) || (argc > 0))
 
2932
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
2933
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_subdinfo_struct, 1);
 
2934
    result = (unsigned int *)(unsigned int *) ((arg1)->unused);
 
2935
    
 
2936
    vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_unsigned_int,0);
 
2937
    return vresult;
 
2938
}
 
2939
 
 
2940
 
 
2941
#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
 
2942
static VALUE
 
2943
_wrap_comedi_subdinfo_struct_allocate(VALUE self) {
 
2944
#else
 
2945
    static VALUE
 
2946
    _wrap_comedi_subdinfo_struct_allocate(int argc, VALUE *argv, VALUE self) {
 
2947
#endif
 
2948
        
 
2949
        
 
2950
        VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_comedi_subdinfo_struct);
 
2951
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
 
2952
        rb_obj_call_init(vresult, argc, argv);
 
2953
#endif
 
2954
        return vresult;
 
2955
    }
 
2956
    
 
2957
 
 
2958
static VALUE
 
2959
_wrap_new_comedi_subdinfo_struct(int argc, VALUE *argv, VALUE self) {
 
2960
    struct comedi_subdinfo_struct *result;
 
2961
    
 
2962
    if ((argc < 0) || (argc > 0))
 
2963
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
2964
    result = (struct comedi_subdinfo_struct *)(struct comedi_subdinfo_struct *) calloc(1, sizeof(struct comedi_subdinfo_struct));
 
2965
    DATA_PTR(self) = result;
 
2966
    return self;
 
2967
}
 
2968
 
 
2969
 
 
2970
static void
 
2971
free_comedi_subdinfo_struct(struct comedi_subdinfo_struct *arg1) {
 
2972
    free((char*) arg1);
 
2973
}
 
2974
static VALUE
 
2975
_wrap_comedi_devinfo_struct_version_code_set(int argc, VALUE *argv, VALUE self) {
 
2976
    struct comedi_devinfo_struct *arg1 = (struct comedi_devinfo_struct *) 0 ;
 
2977
    unsigned int arg2 ;
 
2978
    
 
2979
    if ((argc < 1) || (argc > 1))
 
2980
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
2981
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_devinfo_struct, 1);
 
2982
    arg2 = NUM2UINT(argv[0]);
 
2983
    if (arg1) (arg1)->version_code = arg2;
 
2984
    
 
2985
    return Qnil;
 
2986
}
 
2987
 
 
2988
 
 
2989
static VALUE
 
2990
_wrap_comedi_devinfo_struct_version_code_get(int argc, VALUE *argv, VALUE self) {
 
2991
    struct comedi_devinfo_struct *arg1 = (struct comedi_devinfo_struct *) 0 ;
 
2992
    unsigned int result;
 
2993
    VALUE vresult = Qnil;
 
2994
    
 
2995
    if ((argc < 0) || (argc > 0))
 
2996
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
2997
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_devinfo_struct, 1);
 
2998
    result = (unsigned int) ((arg1)->version_code);
 
2999
    
 
3000
    vresult = UINT2NUM(result);
 
3001
    return vresult;
 
3002
}
 
3003
 
 
3004
 
 
3005
static VALUE
 
3006
_wrap_comedi_devinfo_struct_n_subdevs_set(int argc, VALUE *argv, VALUE self) {
 
3007
    struct comedi_devinfo_struct *arg1 = (struct comedi_devinfo_struct *) 0 ;
 
3008
    unsigned int arg2 ;
 
3009
    
 
3010
    if ((argc < 1) || (argc > 1))
 
3011
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
3012
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_devinfo_struct, 1);
 
3013
    arg2 = NUM2UINT(argv[0]);
 
3014
    if (arg1) (arg1)->n_subdevs = arg2;
 
3015
    
 
3016
    return Qnil;
 
3017
}
 
3018
 
 
3019
 
 
3020
static VALUE
 
3021
_wrap_comedi_devinfo_struct_n_subdevs_get(int argc, VALUE *argv, VALUE self) {
 
3022
    struct comedi_devinfo_struct *arg1 = (struct comedi_devinfo_struct *) 0 ;
 
3023
    unsigned int result;
 
3024
    VALUE vresult = Qnil;
 
3025
    
 
3026
    if ((argc < 0) || (argc > 0))
 
3027
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
3028
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_devinfo_struct, 1);
 
3029
    result = (unsigned int) ((arg1)->n_subdevs);
 
3030
    
 
3031
    vresult = UINT2NUM(result);
 
3032
    return vresult;
 
3033
}
 
3034
 
 
3035
 
 
3036
static VALUE
 
3037
_wrap_comedi_devinfo_struct_driver_name_set(int argc, VALUE *argv, VALUE self) {
 
3038
    struct comedi_devinfo_struct *arg1 = (struct comedi_devinfo_struct *) 0 ;
 
3039
    char *arg2 ;
 
3040
    
 
3041
    if ((argc < 1) || (argc > 1))
 
3042
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
3043
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_devinfo_struct, 1);
 
3044
    arg2 = StringValuePtr(argv[0]);
 
3045
    {
 
3046
        if (arg2) strncpy(arg1->driver_name,arg2,COMEDI_NAMELEN);
 
3047
        else arg1->driver_name[0] = 0;
 
3048
    }
 
3049
    return Qnil;
 
3050
}
 
3051
 
 
3052
 
 
3053
static VALUE
 
3054
_wrap_comedi_devinfo_struct_driver_name_get(int argc, VALUE *argv, VALUE self) {
 
3055
    struct comedi_devinfo_struct *arg1 = (struct comedi_devinfo_struct *) 0 ;
 
3056
    char *result;
 
3057
    VALUE vresult = Qnil;
 
3058
    
 
3059
    if ((argc < 0) || (argc > 0))
 
3060
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
3061
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_devinfo_struct, 1);
 
3062
    result = (char *)(char *) ((arg1)->driver_name);
 
3063
    
 
3064
    vresult = rb_str_new2(result);
 
3065
    return vresult;
 
3066
}
 
3067
 
 
3068
 
 
3069
static VALUE
 
3070
_wrap_comedi_devinfo_struct_board_name_set(int argc, VALUE *argv, VALUE self) {
 
3071
    struct comedi_devinfo_struct *arg1 = (struct comedi_devinfo_struct *) 0 ;
 
3072
    char *arg2 ;
 
3073
    
 
3074
    if ((argc < 1) || (argc > 1))
 
3075
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
3076
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_devinfo_struct, 1);
 
3077
    arg2 = StringValuePtr(argv[0]);
 
3078
    {
 
3079
        if (arg2) strncpy(arg1->board_name,arg2,COMEDI_NAMELEN);
 
3080
        else arg1->board_name[0] = 0;
 
3081
    }
 
3082
    return Qnil;
 
3083
}
 
3084
 
 
3085
 
 
3086
static VALUE
 
3087
_wrap_comedi_devinfo_struct_board_name_get(int argc, VALUE *argv, VALUE self) {
 
3088
    struct comedi_devinfo_struct *arg1 = (struct comedi_devinfo_struct *) 0 ;
 
3089
    char *result;
 
3090
    VALUE vresult = Qnil;
 
3091
    
 
3092
    if ((argc < 0) || (argc > 0))
 
3093
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
3094
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_devinfo_struct, 1);
 
3095
    result = (char *)(char *) ((arg1)->board_name);
 
3096
    
 
3097
    vresult = rb_str_new2(result);
 
3098
    return vresult;
 
3099
}
 
3100
 
 
3101
 
 
3102
static VALUE
 
3103
_wrap_comedi_devinfo_struct_read_subdevice_set(int argc, VALUE *argv, VALUE self) {
 
3104
    struct comedi_devinfo_struct *arg1 = (struct comedi_devinfo_struct *) 0 ;
 
3105
    int arg2 ;
 
3106
    
 
3107
    if ((argc < 1) || (argc > 1))
 
3108
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
3109
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_devinfo_struct, 1);
 
3110
    arg2 = NUM2INT(argv[0]);
 
3111
    if (arg1) (arg1)->read_subdevice = arg2;
 
3112
    
 
3113
    return Qnil;
 
3114
}
 
3115
 
 
3116
 
 
3117
static VALUE
 
3118
_wrap_comedi_devinfo_struct_read_subdevice_get(int argc, VALUE *argv, VALUE self) {
 
3119
    struct comedi_devinfo_struct *arg1 = (struct comedi_devinfo_struct *) 0 ;
 
3120
    int result;
 
3121
    VALUE vresult = Qnil;
 
3122
    
 
3123
    if ((argc < 0) || (argc > 0))
 
3124
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
3125
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_devinfo_struct, 1);
 
3126
    result = (int) ((arg1)->read_subdevice);
 
3127
    
 
3128
    vresult = INT2NUM(result);
 
3129
    return vresult;
 
3130
}
 
3131
 
 
3132
 
 
3133
static VALUE
 
3134
_wrap_comedi_devinfo_struct_write_subdevice_set(int argc, VALUE *argv, VALUE self) {
 
3135
    struct comedi_devinfo_struct *arg1 = (struct comedi_devinfo_struct *) 0 ;
 
3136
    int arg2 ;
 
3137
    
 
3138
    if ((argc < 1) || (argc > 1))
 
3139
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
3140
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_devinfo_struct, 1);
 
3141
    arg2 = NUM2INT(argv[0]);
 
3142
    if (arg1) (arg1)->write_subdevice = arg2;
 
3143
    
 
3144
    return Qnil;
 
3145
}
 
3146
 
 
3147
 
 
3148
static VALUE
 
3149
_wrap_comedi_devinfo_struct_write_subdevice_get(int argc, VALUE *argv, VALUE self) {
 
3150
    struct comedi_devinfo_struct *arg1 = (struct comedi_devinfo_struct *) 0 ;
 
3151
    int result;
 
3152
    VALUE vresult = Qnil;
 
3153
    
 
3154
    if ((argc < 0) || (argc > 0))
 
3155
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
3156
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_devinfo_struct, 1);
 
3157
    result = (int) ((arg1)->write_subdevice);
 
3158
    
 
3159
    vresult = INT2NUM(result);
 
3160
    return vresult;
 
3161
}
 
3162
 
 
3163
 
 
3164
static VALUE
 
3165
_wrap_comedi_devinfo_struct_unused_set(int argc, VALUE *argv, VALUE self) {
 
3166
    struct comedi_devinfo_struct *arg1 = (struct comedi_devinfo_struct *) 0 ;
 
3167
    int *arg2 ;
 
3168
    
 
3169
    if ((argc < 1) || (argc > 1))
 
3170
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
3171
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_devinfo_struct, 1);
 
3172
    SWIG_ConvertPtr(argv[0], (void **) &arg2, SWIGTYPE_p_int, 1);
 
3173
    {
 
3174
        int ii;
 
3175
        int *b = (int *) arg1->unused;
 
3176
        for (ii = 0; ii < 30; ii++) b[ii] = *((int *) arg2 + ii);
 
3177
    }
 
3178
    return Qnil;
 
3179
}
 
3180
 
 
3181
 
 
3182
static VALUE
 
3183
_wrap_comedi_devinfo_struct_unused_get(int argc, VALUE *argv, VALUE self) {
 
3184
    struct comedi_devinfo_struct *arg1 = (struct comedi_devinfo_struct *) 0 ;
 
3185
    int *result;
 
3186
    VALUE vresult = Qnil;
 
3187
    
 
3188
    if ((argc < 0) || (argc > 0))
 
3189
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
3190
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_devinfo_struct, 1);
 
3191
    result = (int *)(int *) ((arg1)->unused);
 
3192
    
 
3193
    vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_int,0);
 
3194
    return vresult;
 
3195
}
 
3196
 
 
3197
 
 
3198
#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
 
3199
static VALUE
 
3200
_wrap_comedi_devinfo_struct_allocate(VALUE self) {
 
3201
#else
 
3202
    static VALUE
 
3203
    _wrap_comedi_devinfo_struct_allocate(int argc, VALUE *argv, VALUE self) {
 
3204
#endif
 
3205
        
 
3206
        
 
3207
        VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_comedi_devinfo_struct);
 
3208
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
 
3209
        rb_obj_call_init(vresult, argc, argv);
 
3210
#endif
 
3211
        return vresult;
 
3212
    }
 
3213
    
 
3214
 
 
3215
static VALUE
 
3216
_wrap_new_comedi_devinfo_struct(int argc, VALUE *argv, VALUE self) {
 
3217
    struct comedi_devinfo_struct *result;
 
3218
    
 
3219
    if ((argc < 0) || (argc > 0))
 
3220
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
3221
    result = (struct comedi_devinfo_struct *)(struct comedi_devinfo_struct *) calloc(1, sizeof(struct comedi_devinfo_struct));
 
3222
    DATA_PTR(self) = result;
 
3223
    return self;
 
3224
}
 
3225
 
 
3226
 
 
3227
static void
 
3228
free_comedi_devinfo_struct(struct comedi_devinfo_struct *arg1) {
 
3229
    free((char*) arg1);
 
3230
}
 
3231
static VALUE
 
3232
_wrap_comedi_devconfig_struct_board_name_set(int argc, VALUE *argv, VALUE self) {
 
3233
    struct comedi_devconfig_struct *arg1 = (struct comedi_devconfig_struct *) 0 ;
 
3234
    char *arg2 ;
 
3235
    
 
3236
    if ((argc < 1) || (argc > 1))
 
3237
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
3238
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_devconfig_struct, 1);
 
3239
    arg2 = StringValuePtr(argv[0]);
 
3240
    {
 
3241
        if (arg2) strncpy(arg1->board_name,arg2,COMEDI_NAMELEN);
 
3242
        else arg1->board_name[0] = 0;
 
3243
    }
 
3244
    return Qnil;
 
3245
}
 
3246
 
 
3247
 
 
3248
static VALUE
 
3249
_wrap_comedi_devconfig_struct_board_name_get(int argc, VALUE *argv, VALUE self) {
 
3250
    struct comedi_devconfig_struct *arg1 = (struct comedi_devconfig_struct *) 0 ;
 
3251
    char *result;
 
3252
    VALUE vresult = Qnil;
 
3253
    
 
3254
    if ((argc < 0) || (argc > 0))
 
3255
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
3256
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_devconfig_struct, 1);
 
3257
    result = (char *)(char *) ((arg1)->board_name);
 
3258
    
 
3259
    vresult = rb_str_new2(result);
 
3260
    return vresult;
 
3261
}
 
3262
 
 
3263
 
 
3264
static VALUE
 
3265
_wrap_comedi_devconfig_struct_options_set(int argc, VALUE *argv, VALUE self) {
 
3266
    struct comedi_devconfig_struct *arg1 = (struct comedi_devconfig_struct *) 0 ;
 
3267
    int *arg2 ;
 
3268
    
 
3269
    if ((argc < 1) || (argc > 1))
 
3270
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
3271
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_devconfig_struct, 1);
 
3272
    SWIG_ConvertPtr(argv[0], (void **) &arg2, SWIGTYPE_p_int, 1);
 
3273
    {
 
3274
        int ii;
 
3275
        int *b = (int *) arg1->options;
 
3276
        for (ii = 0; ii < COMEDI_NDEVCONFOPTS; ii++) b[ii] = *((int *) arg2 + ii);
 
3277
    }
 
3278
    return Qnil;
 
3279
}
 
3280
 
 
3281
 
 
3282
static VALUE
 
3283
_wrap_comedi_devconfig_struct_options_get(int argc, VALUE *argv, VALUE self) {
 
3284
    struct comedi_devconfig_struct *arg1 = (struct comedi_devconfig_struct *) 0 ;
 
3285
    int *result;
 
3286
    VALUE vresult = Qnil;
 
3287
    
 
3288
    if ((argc < 0) || (argc > 0))
 
3289
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
3290
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_devconfig_struct, 1);
 
3291
    result = (int *)(int *) ((arg1)->options);
 
3292
    
 
3293
    vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_int,0);
 
3294
    return vresult;
 
3295
}
 
3296
 
 
3297
 
 
3298
#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
 
3299
static VALUE
 
3300
_wrap_comedi_devconfig_struct_allocate(VALUE self) {
 
3301
#else
 
3302
    static VALUE
 
3303
    _wrap_comedi_devconfig_struct_allocate(int argc, VALUE *argv, VALUE self) {
 
3304
#endif
 
3305
        
 
3306
        
 
3307
        VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_comedi_devconfig_struct);
 
3308
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
 
3309
        rb_obj_call_init(vresult, argc, argv);
 
3310
#endif
 
3311
        return vresult;
 
3312
    }
 
3313
    
 
3314
 
 
3315
static VALUE
 
3316
_wrap_new_comedi_devconfig_struct(int argc, VALUE *argv, VALUE self) {
 
3317
    struct comedi_devconfig_struct *result;
 
3318
    
 
3319
    if ((argc < 0) || (argc > 0))
 
3320
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
3321
    result = (struct comedi_devconfig_struct *)(struct comedi_devconfig_struct *) calloc(1, sizeof(struct comedi_devconfig_struct));
 
3322
    DATA_PTR(self) = result;
 
3323
    return self;
 
3324
}
 
3325
 
 
3326
 
 
3327
static void
 
3328
free_comedi_devconfig_struct(struct comedi_devconfig_struct *arg1) {
 
3329
    free((char*) arg1);
 
3330
}
 
3331
static VALUE
 
3332
_wrap_comedi_bufconfig_struct_subdevice_set(int argc, VALUE *argv, VALUE self) {
 
3333
    struct comedi_bufconfig_struct *arg1 = (struct comedi_bufconfig_struct *) 0 ;
 
3334
    unsigned int arg2 ;
 
3335
    
 
3336
    if ((argc < 1) || (argc > 1))
 
3337
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
3338
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_bufconfig_struct, 1);
 
3339
    arg2 = NUM2UINT(argv[0]);
 
3340
    if (arg1) (arg1)->subdevice = arg2;
 
3341
    
 
3342
    return Qnil;
 
3343
}
 
3344
 
 
3345
 
 
3346
static VALUE
 
3347
_wrap_comedi_bufconfig_struct_subdevice_get(int argc, VALUE *argv, VALUE self) {
 
3348
    struct comedi_bufconfig_struct *arg1 = (struct comedi_bufconfig_struct *) 0 ;
 
3349
    unsigned int result;
 
3350
    VALUE vresult = Qnil;
 
3351
    
 
3352
    if ((argc < 0) || (argc > 0))
 
3353
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
3354
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_bufconfig_struct, 1);
 
3355
    result = (unsigned int) ((arg1)->subdevice);
 
3356
    
 
3357
    vresult = UINT2NUM(result);
 
3358
    return vresult;
 
3359
}
 
3360
 
 
3361
 
 
3362
static VALUE
 
3363
_wrap_comedi_bufconfig_struct_flags_set(int argc, VALUE *argv, VALUE self) {
 
3364
    struct comedi_bufconfig_struct *arg1 = (struct comedi_bufconfig_struct *) 0 ;
 
3365
    unsigned int arg2 ;
 
3366
    
 
3367
    if ((argc < 1) || (argc > 1))
 
3368
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
3369
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_bufconfig_struct, 1);
 
3370
    arg2 = NUM2UINT(argv[0]);
 
3371
    if (arg1) (arg1)->flags = arg2;
 
3372
    
 
3373
    return Qnil;
 
3374
}
 
3375
 
 
3376
 
 
3377
static VALUE
 
3378
_wrap_comedi_bufconfig_struct_flags_get(int argc, VALUE *argv, VALUE self) {
 
3379
    struct comedi_bufconfig_struct *arg1 = (struct comedi_bufconfig_struct *) 0 ;
 
3380
    unsigned int result;
 
3381
    VALUE vresult = Qnil;
 
3382
    
 
3383
    if ((argc < 0) || (argc > 0))
 
3384
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
3385
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_bufconfig_struct, 1);
 
3386
    result = (unsigned int) ((arg1)->flags);
 
3387
    
 
3388
    vresult = UINT2NUM(result);
 
3389
    return vresult;
 
3390
}
 
3391
 
 
3392
 
 
3393
static VALUE
 
3394
_wrap_comedi_bufconfig_struct_maximum_size_set(int argc, VALUE *argv, VALUE self) {
 
3395
    struct comedi_bufconfig_struct *arg1 = (struct comedi_bufconfig_struct *) 0 ;
 
3396
    unsigned int arg2 ;
 
3397
    
 
3398
    if ((argc < 1) || (argc > 1))
 
3399
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
3400
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_bufconfig_struct, 1);
 
3401
    arg2 = NUM2UINT(argv[0]);
 
3402
    if (arg1) (arg1)->maximum_size = arg2;
 
3403
    
 
3404
    return Qnil;
 
3405
}
 
3406
 
 
3407
 
 
3408
static VALUE
 
3409
_wrap_comedi_bufconfig_struct_maximum_size_get(int argc, VALUE *argv, VALUE self) {
 
3410
    struct comedi_bufconfig_struct *arg1 = (struct comedi_bufconfig_struct *) 0 ;
 
3411
    unsigned int result;
 
3412
    VALUE vresult = Qnil;
 
3413
    
 
3414
    if ((argc < 0) || (argc > 0))
 
3415
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
3416
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_bufconfig_struct, 1);
 
3417
    result = (unsigned int) ((arg1)->maximum_size);
 
3418
    
 
3419
    vresult = UINT2NUM(result);
 
3420
    return vresult;
 
3421
}
 
3422
 
 
3423
 
 
3424
static VALUE
 
3425
_wrap_comedi_bufconfig_struct_size_set(int argc, VALUE *argv, VALUE self) {
 
3426
    struct comedi_bufconfig_struct *arg1 = (struct comedi_bufconfig_struct *) 0 ;
 
3427
    unsigned int arg2 ;
 
3428
    
 
3429
    if ((argc < 1) || (argc > 1))
 
3430
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
3431
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_bufconfig_struct, 1);
 
3432
    arg2 = NUM2UINT(argv[0]);
 
3433
    if (arg1) (arg1)->size = arg2;
 
3434
    
 
3435
    return Qnil;
 
3436
}
 
3437
 
 
3438
 
 
3439
static VALUE
 
3440
_wrap_comedi_bufconfig_struct_size_get(int argc, VALUE *argv, VALUE self) {
 
3441
    struct comedi_bufconfig_struct *arg1 = (struct comedi_bufconfig_struct *) 0 ;
 
3442
    unsigned int result;
 
3443
    VALUE vresult = Qnil;
 
3444
    
 
3445
    if ((argc < 0) || (argc > 0))
 
3446
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
3447
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_bufconfig_struct, 1);
 
3448
    result = (unsigned int) ((arg1)->size);
 
3449
    
 
3450
    vresult = UINT2NUM(result);
 
3451
    return vresult;
 
3452
}
 
3453
 
 
3454
 
 
3455
static VALUE
 
3456
_wrap_comedi_bufconfig_struct_unused_set(int argc, VALUE *argv, VALUE self) {
 
3457
    struct comedi_bufconfig_struct *arg1 = (struct comedi_bufconfig_struct *) 0 ;
 
3458
    unsigned int *arg2 ;
 
3459
    
 
3460
    if ((argc < 1) || (argc > 1))
 
3461
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
3462
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_bufconfig_struct, 1);
 
3463
    SWIG_ConvertPtr(argv[0], (void **) &arg2, SWIGTYPE_p_unsigned_int, 1);
 
3464
    {
 
3465
        int ii;
 
3466
        unsigned int *b = (unsigned int *) arg1->unused;
 
3467
        for (ii = 0; ii < 4; ii++) b[ii] = *((unsigned int *) arg2 + ii);
 
3468
    }
 
3469
    return Qnil;
 
3470
}
 
3471
 
 
3472
 
 
3473
static VALUE
 
3474
_wrap_comedi_bufconfig_struct_unused_get(int argc, VALUE *argv, VALUE self) {
 
3475
    struct comedi_bufconfig_struct *arg1 = (struct comedi_bufconfig_struct *) 0 ;
 
3476
    unsigned int *result;
 
3477
    VALUE vresult = Qnil;
 
3478
    
 
3479
    if ((argc < 0) || (argc > 0))
 
3480
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
3481
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_bufconfig_struct, 1);
 
3482
    result = (unsigned int *)(unsigned int *) ((arg1)->unused);
 
3483
    
 
3484
    vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_unsigned_int,0);
 
3485
    return vresult;
 
3486
}
 
3487
 
 
3488
 
 
3489
#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
 
3490
static VALUE
 
3491
_wrap_comedi_bufconfig_struct_allocate(VALUE self) {
 
3492
#else
 
3493
    static VALUE
 
3494
    _wrap_comedi_bufconfig_struct_allocate(int argc, VALUE *argv, VALUE self) {
 
3495
#endif
 
3496
        
 
3497
        
 
3498
        VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_comedi_bufconfig_struct);
 
3499
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
 
3500
        rb_obj_call_init(vresult, argc, argv);
 
3501
#endif
 
3502
        return vresult;
 
3503
    }
 
3504
    
 
3505
 
 
3506
static VALUE
 
3507
_wrap_new_comedi_bufconfig_struct(int argc, VALUE *argv, VALUE self) {
 
3508
    struct comedi_bufconfig_struct *result;
 
3509
    
 
3510
    if ((argc < 0) || (argc > 0))
 
3511
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
3512
    result = (struct comedi_bufconfig_struct *)(struct comedi_bufconfig_struct *) calloc(1, sizeof(struct comedi_bufconfig_struct));
 
3513
    DATA_PTR(self) = result;
 
3514
    return self;
 
3515
}
 
3516
 
 
3517
 
 
3518
static void
 
3519
free_comedi_bufconfig_struct(struct comedi_bufconfig_struct *arg1) {
 
3520
    free((char*) arg1);
 
3521
}
 
3522
static VALUE
 
3523
_wrap_comedi_bufinfo_struct_subdevice_set(int argc, VALUE *argv, VALUE self) {
 
3524
    struct comedi_bufinfo_struct *arg1 = (struct comedi_bufinfo_struct *) 0 ;
 
3525
    unsigned int arg2 ;
 
3526
    
 
3527
    if ((argc < 1) || (argc > 1))
 
3528
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
3529
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_bufinfo_struct, 1);
 
3530
    arg2 = NUM2UINT(argv[0]);
 
3531
    if (arg1) (arg1)->subdevice = arg2;
 
3532
    
 
3533
    return Qnil;
 
3534
}
 
3535
 
 
3536
 
 
3537
static VALUE
 
3538
_wrap_comedi_bufinfo_struct_subdevice_get(int argc, VALUE *argv, VALUE self) {
 
3539
    struct comedi_bufinfo_struct *arg1 = (struct comedi_bufinfo_struct *) 0 ;
 
3540
    unsigned int result;
 
3541
    VALUE vresult = Qnil;
 
3542
    
 
3543
    if ((argc < 0) || (argc > 0))
 
3544
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
3545
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_bufinfo_struct, 1);
 
3546
    result = (unsigned int) ((arg1)->subdevice);
 
3547
    
 
3548
    vresult = UINT2NUM(result);
 
3549
    return vresult;
 
3550
}
 
3551
 
 
3552
 
 
3553
static VALUE
 
3554
_wrap_comedi_bufinfo_struct_bytes_read_set(int argc, VALUE *argv, VALUE self) {
 
3555
    struct comedi_bufinfo_struct *arg1 = (struct comedi_bufinfo_struct *) 0 ;
 
3556
    unsigned int arg2 ;
 
3557
    
 
3558
    if ((argc < 1) || (argc > 1))
 
3559
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
3560
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_bufinfo_struct, 1);
 
3561
    arg2 = NUM2UINT(argv[0]);
 
3562
    if (arg1) (arg1)->bytes_read = arg2;
 
3563
    
 
3564
    return Qnil;
 
3565
}
 
3566
 
 
3567
 
 
3568
static VALUE
 
3569
_wrap_comedi_bufinfo_struct_bytes_read_get(int argc, VALUE *argv, VALUE self) {
 
3570
    struct comedi_bufinfo_struct *arg1 = (struct comedi_bufinfo_struct *) 0 ;
 
3571
    unsigned int result;
 
3572
    VALUE vresult = Qnil;
 
3573
    
 
3574
    if ((argc < 0) || (argc > 0))
 
3575
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
3576
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_bufinfo_struct, 1);
 
3577
    result = (unsigned int) ((arg1)->bytes_read);
 
3578
    
 
3579
    vresult = UINT2NUM(result);
 
3580
    return vresult;
 
3581
}
 
3582
 
 
3583
 
 
3584
static VALUE
 
3585
_wrap_comedi_bufinfo_struct_buf_int_ptr_set(int argc, VALUE *argv, VALUE self) {
 
3586
    struct comedi_bufinfo_struct *arg1 = (struct comedi_bufinfo_struct *) 0 ;
 
3587
    unsigned int arg2 ;
 
3588
    
 
3589
    if ((argc < 1) || (argc > 1))
 
3590
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
3591
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_bufinfo_struct, 1);
 
3592
    arg2 = NUM2UINT(argv[0]);
 
3593
    if (arg1) (arg1)->buf_int_ptr = arg2;
 
3594
    
 
3595
    return Qnil;
 
3596
}
 
3597
 
 
3598
 
 
3599
static VALUE
 
3600
_wrap_comedi_bufinfo_struct_buf_int_ptr_get(int argc, VALUE *argv, VALUE self) {
 
3601
    struct comedi_bufinfo_struct *arg1 = (struct comedi_bufinfo_struct *) 0 ;
 
3602
    unsigned int result;
 
3603
    VALUE vresult = Qnil;
 
3604
    
 
3605
    if ((argc < 0) || (argc > 0))
 
3606
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
3607
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_bufinfo_struct, 1);
 
3608
    result = (unsigned int) ((arg1)->buf_int_ptr);
 
3609
    
 
3610
    vresult = UINT2NUM(result);
 
3611
    return vresult;
 
3612
}
 
3613
 
 
3614
 
 
3615
static VALUE
 
3616
_wrap_comedi_bufinfo_struct_buf_user_ptr_set(int argc, VALUE *argv, VALUE self) {
 
3617
    struct comedi_bufinfo_struct *arg1 = (struct comedi_bufinfo_struct *) 0 ;
 
3618
    unsigned int arg2 ;
 
3619
    
 
3620
    if ((argc < 1) || (argc > 1))
 
3621
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
3622
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_bufinfo_struct, 1);
 
3623
    arg2 = NUM2UINT(argv[0]);
 
3624
    if (arg1) (arg1)->buf_user_ptr = arg2;
 
3625
    
 
3626
    return Qnil;
 
3627
}
 
3628
 
 
3629
 
 
3630
static VALUE
 
3631
_wrap_comedi_bufinfo_struct_buf_user_ptr_get(int argc, VALUE *argv, VALUE self) {
 
3632
    struct comedi_bufinfo_struct *arg1 = (struct comedi_bufinfo_struct *) 0 ;
 
3633
    unsigned int result;
 
3634
    VALUE vresult = Qnil;
 
3635
    
 
3636
    if ((argc < 0) || (argc > 0))
 
3637
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
3638
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_bufinfo_struct, 1);
 
3639
    result = (unsigned int) ((arg1)->buf_user_ptr);
 
3640
    
 
3641
    vresult = UINT2NUM(result);
 
3642
    return vresult;
 
3643
}
 
3644
 
 
3645
 
 
3646
static VALUE
 
3647
_wrap_comedi_bufinfo_struct_buf_int_count_set(int argc, VALUE *argv, VALUE self) {
 
3648
    struct comedi_bufinfo_struct *arg1 = (struct comedi_bufinfo_struct *) 0 ;
 
3649
    unsigned int arg2 ;
 
3650
    
 
3651
    if ((argc < 1) || (argc > 1))
 
3652
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
3653
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_bufinfo_struct, 1);
 
3654
    arg2 = NUM2UINT(argv[0]);
 
3655
    if (arg1) (arg1)->buf_int_count = arg2;
 
3656
    
 
3657
    return Qnil;
 
3658
}
 
3659
 
 
3660
 
 
3661
static VALUE
 
3662
_wrap_comedi_bufinfo_struct_buf_int_count_get(int argc, VALUE *argv, VALUE self) {
 
3663
    struct comedi_bufinfo_struct *arg1 = (struct comedi_bufinfo_struct *) 0 ;
 
3664
    unsigned int result;
 
3665
    VALUE vresult = Qnil;
 
3666
    
 
3667
    if ((argc < 0) || (argc > 0))
 
3668
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
3669
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_bufinfo_struct, 1);
 
3670
    result = (unsigned int) ((arg1)->buf_int_count);
 
3671
    
 
3672
    vresult = UINT2NUM(result);
 
3673
    return vresult;
 
3674
}
 
3675
 
 
3676
 
 
3677
static VALUE
 
3678
_wrap_comedi_bufinfo_struct_buf_user_count_set(int argc, VALUE *argv, VALUE self) {
 
3679
    struct comedi_bufinfo_struct *arg1 = (struct comedi_bufinfo_struct *) 0 ;
 
3680
    unsigned int arg2 ;
 
3681
    
 
3682
    if ((argc < 1) || (argc > 1))
 
3683
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
3684
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_bufinfo_struct, 1);
 
3685
    arg2 = NUM2UINT(argv[0]);
 
3686
    if (arg1) (arg1)->buf_user_count = arg2;
 
3687
    
 
3688
    return Qnil;
 
3689
}
 
3690
 
 
3691
 
 
3692
static VALUE
 
3693
_wrap_comedi_bufinfo_struct_buf_user_count_get(int argc, VALUE *argv, VALUE self) {
 
3694
    struct comedi_bufinfo_struct *arg1 = (struct comedi_bufinfo_struct *) 0 ;
 
3695
    unsigned int result;
 
3696
    VALUE vresult = Qnil;
 
3697
    
 
3698
    if ((argc < 0) || (argc > 0))
 
3699
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
3700
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_bufinfo_struct, 1);
 
3701
    result = (unsigned int) ((arg1)->buf_user_count);
 
3702
    
 
3703
    vresult = UINT2NUM(result);
 
3704
    return vresult;
 
3705
}
 
3706
 
 
3707
 
 
3708
static VALUE
 
3709
_wrap_comedi_bufinfo_struct_bytes_written_set(int argc, VALUE *argv, VALUE self) {
 
3710
    struct comedi_bufinfo_struct *arg1 = (struct comedi_bufinfo_struct *) 0 ;
 
3711
    unsigned int arg2 ;
 
3712
    
 
3713
    if ((argc < 1) || (argc > 1))
 
3714
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
3715
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_bufinfo_struct, 1);
 
3716
    arg2 = NUM2UINT(argv[0]);
 
3717
    if (arg1) (arg1)->bytes_written = arg2;
 
3718
    
 
3719
    return Qnil;
 
3720
}
 
3721
 
 
3722
 
 
3723
static VALUE
 
3724
_wrap_comedi_bufinfo_struct_bytes_written_get(int argc, VALUE *argv, VALUE self) {
 
3725
    struct comedi_bufinfo_struct *arg1 = (struct comedi_bufinfo_struct *) 0 ;
 
3726
    unsigned int result;
 
3727
    VALUE vresult = Qnil;
 
3728
    
 
3729
    if ((argc < 0) || (argc > 0))
 
3730
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
3731
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_bufinfo_struct, 1);
 
3732
    result = (unsigned int) ((arg1)->bytes_written);
 
3733
    
 
3734
    vresult = UINT2NUM(result);
 
3735
    return vresult;
 
3736
}
 
3737
 
 
3738
 
 
3739
static VALUE
 
3740
_wrap_comedi_bufinfo_struct_unused_set(int argc, VALUE *argv, VALUE self) {
 
3741
    struct comedi_bufinfo_struct *arg1 = (struct comedi_bufinfo_struct *) 0 ;
 
3742
    unsigned int *arg2 ;
 
3743
    
 
3744
    if ((argc < 1) || (argc > 1))
 
3745
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
3746
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_bufinfo_struct, 1);
 
3747
    SWIG_ConvertPtr(argv[0], (void **) &arg2, SWIGTYPE_p_unsigned_int, 1);
 
3748
    {
 
3749
        int ii;
 
3750
        unsigned int *b = (unsigned int *) arg1->unused;
 
3751
        for (ii = 0; ii < 4; ii++) b[ii] = *((unsigned int *) arg2 + ii);
 
3752
    }
 
3753
    return Qnil;
 
3754
}
 
3755
 
 
3756
 
 
3757
static VALUE
 
3758
_wrap_comedi_bufinfo_struct_unused_get(int argc, VALUE *argv, VALUE self) {
 
3759
    struct comedi_bufinfo_struct *arg1 = (struct comedi_bufinfo_struct *) 0 ;
 
3760
    unsigned int *result;
 
3761
    VALUE vresult = Qnil;
 
3762
    
 
3763
    if ((argc < 0) || (argc > 0))
 
3764
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
3765
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_bufinfo_struct, 1);
 
3766
    result = (unsigned int *)(unsigned int *) ((arg1)->unused);
 
3767
    
 
3768
    vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_unsigned_int,0);
 
3769
    return vresult;
 
3770
}
 
3771
 
 
3772
 
 
3773
#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
 
3774
static VALUE
 
3775
_wrap_comedi_bufinfo_struct_allocate(VALUE self) {
 
3776
#else
 
3777
    static VALUE
 
3778
    _wrap_comedi_bufinfo_struct_allocate(int argc, VALUE *argv, VALUE self) {
 
3779
#endif
 
3780
        
 
3781
        
 
3782
        VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_comedi_bufinfo_struct);
 
3783
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
 
3784
        rb_obj_call_init(vresult, argc, argv);
 
3785
#endif
 
3786
        return vresult;
 
3787
    }
 
3788
    
 
3789
 
 
3790
static VALUE
 
3791
_wrap_new_comedi_bufinfo_struct(int argc, VALUE *argv, VALUE self) {
 
3792
    struct comedi_bufinfo_struct *result;
 
3793
    
 
3794
    if ((argc < 0) || (argc > 0))
 
3795
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
3796
    result = (struct comedi_bufinfo_struct *)(struct comedi_bufinfo_struct *) calloc(1, sizeof(struct comedi_bufinfo_struct));
 
3797
    DATA_PTR(self) = result;
 
3798
    return self;
 
3799
}
 
3800
 
 
3801
 
 
3802
static void
 
3803
free_comedi_bufinfo_struct(struct comedi_bufinfo_struct *arg1) {
 
3804
    free((char*) arg1);
 
3805
}
 
3806
static VALUE
 
3807
_wrap_comedi_range_min_set(int argc, VALUE *argv, VALUE self) {
 
3808
    comedi_range *arg1 = (comedi_range *) 0 ;
 
3809
    double arg2 ;
 
3810
    
 
3811
    if ((argc < 1) || (argc > 1))
 
3812
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
3813
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_range, 1);
 
3814
    arg2 = (double) NUM2DBL(argv[0]);
 
3815
    if (arg1) (arg1)->min = arg2;
 
3816
    
 
3817
    return Qnil;
 
3818
}
 
3819
 
 
3820
 
 
3821
static VALUE
 
3822
_wrap_comedi_range_min_get(int argc, VALUE *argv, VALUE self) {
 
3823
    comedi_range *arg1 = (comedi_range *) 0 ;
 
3824
    double result;
 
3825
    VALUE vresult = Qnil;
 
3826
    
 
3827
    if ((argc < 0) || (argc > 0))
 
3828
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
3829
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_range, 1);
 
3830
    result = (double) ((arg1)->min);
 
3831
    
 
3832
    vresult = rb_float_new(result);
 
3833
    return vresult;
 
3834
}
 
3835
 
 
3836
 
 
3837
static VALUE
 
3838
_wrap_comedi_range_max_set(int argc, VALUE *argv, VALUE self) {
 
3839
    comedi_range *arg1 = (comedi_range *) 0 ;
 
3840
    double arg2 ;
 
3841
    
 
3842
    if ((argc < 1) || (argc > 1))
 
3843
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
3844
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_range, 1);
 
3845
    arg2 = (double) NUM2DBL(argv[0]);
 
3846
    if (arg1) (arg1)->max = arg2;
 
3847
    
 
3848
    return Qnil;
 
3849
}
 
3850
 
 
3851
 
 
3852
static VALUE
 
3853
_wrap_comedi_range_max_get(int argc, VALUE *argv, VALUE self) {
 
3854
    comedi_range *arg1 = (comedi_range *) 0 ;
 
3855
    double result;
 
3856
    VALUE vresult = Qnil;
 
3857
    
 
3858
    if ((argc < 0) || (argc > 0))
 
3859
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
3860
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_range, 1);
 
3861
    result = (double) ((arg1)->max);
 
3862
    
 
3863
    vresult = rb_float_new(result);
 
3864
    return vresult;
 
3865
}
 
3866
 
 
3867
 
 
3868
static VALUE
 
3869
_wrap_comedi_range_unit_set(int argc, VALUE *argv, VALUE self) {
 
3870
    comedi_range *arg1 = (comedi_range *) 0 ;
 
3871
    unsigned int arg2 ;
 
3872
    
 
3873
    if ((argc < 1) || (argc > 1))
 
3874
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
3875
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_range, 1);
 
3876
    arg2 = NUM2UINT(argv[0]);
 
3877
    if (arg1) (arg1)->unit = arg2;
 
3878
    
 
3879
    return Qnil;
 
3880
}
 
3881
 
 
3882
 
 
3883
static VALUE
 
3884
_wrap_comedi_range_unit_get(int argc, VALUE *argv, VALUE self) {
 
3885
    comedi_range *arg1 = (comedi_range *) 0 ;
 
3886
    unsigned int result;
 
3887
    VALUE vresult = Qnil;
 
3888
    
 
3889
    if ((argc < 0) || (argc > 0))
 
3890
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
3891
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_range, 1);
 
3892
    result = (unsigned int) ((arg1)->unit);
 
3893
    
 
3894
    vresult = UINT2NUM(result);
 
3895
    return vresult;
 
3896
}
 
3897
 
 
3898
 
 
3899
#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
 
3900
static VALUE
 
3901
_wrap_comedi_range_allocate(VALUE self) {
 
3902
#else
 
3903
    static VALUE
 
3904
    _wrap_comedi_range_allocate(int argc, VALUE *argv, VALUE self) {
 
3905
#endif
 
3906
        
 
3907
        
 
3908
        VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_comedi_range);
 
3909
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
 
3910
        rb_obj_call_init(vresult, argc, argv);
 
3911
#endif
 
3912
        return vresult;
 
3913
    }
 
3914
    
 
3915
 
 
3916
static VALUE
 
3917
_wrap_new_comedi_range(int argc, VALUE *argv, VALUE self) {
 
3918
    comedi_range *result;
 
3919
    
 
3920
    if ((argc < 0) || (argc > 0))
 
3921
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
3922
    result = (comedi_range *)(comedi_range *) calloc(1, sizeof(comedi_range));
 
3923
    DATA_PTR(self) = result;
 
3924
    return self;
 
3925
}
 
3926
 
 
3927
 
 
3928
static void
 
3929
free_comedi_range(comedi_range *arg1) {
 
3930
    free((char*) arg1);
 
3931
}
 
3932
static VALUE
 
3933
_wrap_comedi_sv_t_dev_set(int argc, VALUE *argv, VALUE self) {
 
3934
    comedi_sv_t *arg1 = (comedi_sv_t *) 0 ;
 
3935
    comedi_t *arg2 = (comedi_t *) 0 ;
 
3936
    
 
3937
    if ((argc < 1) || (argc > 1))
 
3938
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
3939
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_sv_t, 1);
 
3940
    SWIG_ConvertPtr(argv[0], (void **) &arg2, 0, 1);
 
3941
    if (arg1) (arg1)->dev = arg2;
 
3942
    
 
3943
    return Qnil;
 
3944
}
 
3945
 
 
3946
 
 
3947
static VALUE
 
3948
_wrap_comedi_sv_t_dev_get(int argc, VALUE *argv, VALUE self) {
 
3949
    comedi_sv_t *arg1 = (comedi_sv_t *) 0 ;
 
3950
    comedi_t *result;
 
3951
    VALUE vresult = Qnil;
 
3952
    
 
3953
    if ((argc < 0) || (argc > 0))
 
3954
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
3955
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_sv_t, 1);
 
3956
    result = (comedi_t *) ((arg1)->dev);
 
3957
    
 
3958
    vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_comedi_t,0);
 
3959
    return vresult;
 
3960
}
 
3961
 
 
3962
 
 
3963
static VALUE
 
3964
_wrap_comedi_sv_t_subdevice_set(int argc, VALUE *argv, VALUE self) {
 
3965
    comedi_sv_t *arg1 = (comedi_sv_t *) 0 ;
 
3966
    unsigned int arg2 ;
 
3967
    
 
3968
    if ((argc < 1) || (argc > 1))
 
3969
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
3970
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_sv_t, 1);
 
3971
    arg2 = NUM2UINT(argv[0]);
 
3972
    if (arg1) (arg1)->subdevice = arg2;
 
3973
    
 
3974
    return Qnil;
 
3975
}
 
3976
 
 
3977
 
 
3978
static VALUE
 
3979
_wrap_comedi_sv_t_subdevice_get(int argc, VALUE *argv, VALUE self) {
 
3980
    comedi_sv_t *arg1 = (comedi_sv_t *) 0 ;
 
3981
    unsigned int result;
 
3982
    VALUE vresult = Qnil;
 
3983
    
 
3984
    if ((argc < 0) || (argc > 0))
 
3985
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
3986
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_sv_t, 1);
 
3987
    result = (unsigned int) ((arg1)->subdevice);
 
3988
    
 
3989
    vresult = UINT2NUM(result);
 
3990
    return vresult;
 
3991
}
 
3992
 
 
3993
 
 
3994
static VALUE
 
3995
_wrap_comedi_sv_t_chan_set(int argc, VALUE *argv, VALUE self) {
 
3996
    comedi_sv_t *arg1 = (comedi_sv_t *) 0 ;
 
3997
    unsigned int arg2 ;
 
3998
    
 
3999
    if ((argc < 1) || (argc > 1))
 
4000
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
4001
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_sv_t, 1);
 
4002
    arg2 = NUM2UINT(argv[0]);
 
4003
    if (arg1) (arg1)->chan = arg2;
 
4004
    
 
4005
    return Qnil;
 
4006
}
 
4007
 
 
4008
 
 
4009
static VALUE
 
4010
_wrap_comedi_sv_t_chan_get(int argc, VALUE *argv, VALUE self) {
 
4011
    comedi_sv_t *arg1 = (comedi_sv_t *) 0 ;
 
4012
    unsigned int result;
 
4013
    VALUE vresult = Qnil;
 
4014
    
 
4015
    if ((argc < 0) || (argc > 0))
 
4016
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
4017
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_sv_t, 1);
 
4018
    result = (unsigned int) ((arg1)->chan);
 
4019
    
 
4020
    vresult = UINT2NUM(result);
 
4021
    return vresult;
 
4022
}
 
4023
 
 
4024
 
 
4025
static VALUE
 
4026
_wrap_comedi_sv_t_range_set(int argc, VALUE *argv, VALUE self) {
 
4027
    comedi_sv_t *arg1 = (comedi_sv_t *) 0 ;
 
4028
    int arg2 ;
 
4029
    
 
4030
    if ((argc < 1) || (argc > 1))
 
4031
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
4032
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_sv_t, 1);
 
4033
    arg2 = NUM2INT(argv[0]);
 
4034
    if (arg1) (arg1)->range = arg2;
 
4035
    
 
4036
    return Qnil;
 
4037
}
 
4038
 
 
4039
 
 
4040
static VALUE
 
4041
_wrap_comedi_sv_t_range_get(int argc, VALUE *argv, VALUE self) {
 
4042
    comedi_sv_t *arg1 = (comedi_sv_t *) 0 ;
 
4043
    int result;
 
4044
    VALUE vresult = Qnil;
 
4045
    
 
4046
    if ((argc < 0) || (argc > 0))
 
4047
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
4048
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_sv_t, 1);
 
4049
    result = (int) ((arg1)->range);
 
4050
    
 
4051
    vresult = INT2NUM(result);
 
4052
    return vresult;
 
4053
}
 
4054
 
 
4055
 
 
4056
static VALUE
 
4057
_wrap_comedi_sv_t_aref_set(int argc, VALUE *argv, VALUE self) {
 
4058
    comedi_sv_t *arg1 = (comedi_sv_t *) 0 ;
 
4059
    int arg2 ;
 
4060
    
 
4061
    if ((argc < 1) || (argc > 1))
 
4062
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
4063
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_sv_t, 1);
 
4064
    arg2 = NUM2INT(argv[0]);
 
4065
    if (arg1) (arg1)->aref = arg2;
 
4066
    
 
4067
    return Qnil;
 
4068
}
 
4069
 
 
4070
 
 
4071
static VALUE
 
4072
_wrap_comedi_sv_t_aref_get(int argc, VALUE *argv, VALUE self) {
 
4073
    comedi_sv_t *arg1 = (comedi_sv_t *) 0 ;
 
4074
    int result;
 
4075
    VALUE vresult = Qnil;
 
4076
    
 
4077
    if ((argc < 0) || (argc > 0))
 
4078
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
4079
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_sv_t, 1);
 
4080
    result = (int) ((arg1)->aref);
 
4081
    
 
4082
    vresult = INT2NUM(result);
 
4083
    return vresult;
 
4084
}
 
4085
 
 
4086
 
 
4087
static VALUE
 
4088
_wrap_comedi_sv_t_n_set(int argc, VALUE *argv, VALUE self) {
 
4089
    comedi_sv_t *arg1 = (comedi_sv_t *) 0 ;
 
4090
    int arg2 ;
 
4091
    
 
4092
    if ((argc < 1) || (argc > 1))
 
4093
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
4094
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_sv_t, 1);
 
4095
    arg2 = NUM2INT(argv[0]);
 
4096
    if (arg1) (arg1)->n = arg2;
 
4097
    
 
4098
    return Qnil;
 
4099
}
 
4100
 
 
4101
 
 
4102
static VALUE
 
4103
_wrap_comedi_sv_t_n_get(int argc, VALUE *argv, VALUE self) {
 
4104
    comedi_sv_t *arg1 = (comedi_sv_t *) 0 ;
 
4105
    int result;
 
4106
    VALUE vresult = Qnil;
 
4107
    
 
4108
    if ((argc < 0) || (argc > 0))
 
4109
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
4110
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_sv_t, 1);
 
4111
    result = (int) ((arg1)->n);
 
4112
    
 
4113
    vresult = INT2NUM(result);
 
4114
    return vresult;
 
4115
}
 
4116
 
 
4117
 
 
4118
static VALUE
 
4119
_wrap_comedi_sv_t_maxdata_set(int argc, VALUE *argv, VALUE self) {
 
4120
    comedi_sv_t *arg1 = (comedi_sv_t *) 0 ;
 
4121
    lsampl_t arg2 ;
 
4122
    
 
4123
    if ((argc < 1) || (argc > 1))
 
4124
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
4125
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_sv_t, 1);
 
4126
    arg2 = NUM2UINT(argv[0]);
 
4127
    if (arg1) (arg1)->maxdata = arg2;
 
4128
    
 
4129
    return Qnil;
 
4130
}
 
4131
 
 
4132
 
 
4133
static VALUE
 
4134
_wrap_comedi_sv_t_maxdata_get(int argc, VALUE *argv, VALUE self) {
 
4135
    comedi_sv_t *arg1 = (comedi_sv_t *) 0 ;
 
4136
    lsampl_t result;
 
4137
    VALUE vresult = Qnil;
 
4138
    
 
4139
    if ((argc < 0) || (argc > 0))
 
4140
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
4141
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_sv_t, 1);
 
4142
    result = (lsampl_t) ((arg1)->maxdata);
 
4143
    
 
4144
    vresult = UINT2NUM(result);
 
4145
    return vresult;
 
4146
}
 
4147
 
 
4148
 
 
4149
#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
 
4150
static VALUE
 
4151
_wrap_comedi_sv_t_allocate(VALUE self) {
 
4152
#else
 
4153
    static VALUE
 
4154
    _wrap_comedi_sv_t_allocate(int argc, VALUE *argv, VALUE self) {
 
4155
#endif
 
4156
        
 
4157
        
 
4158
        VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_comedi_sv_t);
 
4159
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
 
4160
        rb_obj_call_init(vresult, argc, argv);
 
4161
#endif
 
4162
        return vresult;
 
4163
    }
 
4164
    
 
4165
 
 
4166
static VALUE
 
4167
_wrap_new_comedi_sv_t(int argc, VALUE *argv, VALUE self) {
 
4168
    comedi_sv_t *result;
 
4169
    
 
4170
    if ((argc < 0) || (argc > 0))
 
4171
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
4172
    result = (comedi_sv_t *)(comedi_sv_t *) calloc(1, sizeof(comedi_sv_t));
 
4173
    DATA_PTR(self) = result;
 
4174
    return self;
 
4175
}
 
4176
 
 
4177
 
 
4178
static void
 
4179
free_comedi_sv_t(comedi_sv_t *arg1) {
 
4180
    free((char*) arg1);
 
4181
}
 
4182
static VALUE
 
4183
_wrap_comedi_open(int argc, VALUE *argv, VALUE self) {
 
4184
    char *arg1 ;
 
4185
    comedi_t *result;
 
4186
    VALUE vresult = Qnil;
 
4187
    
 
4188
    if ((argc < 1) || (argc > 1))
 
4189
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
4190
    arg1 = StringValuePtr(argv[0]);
 
4191
    result = (comedi_t *)comedi_open((char const *)arg1);
 
4192
    
 
4193
    vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_comedi_t,0);
 
4194
    return vresult;
 
4195
}
 
4196
 
 
4197
 
 
4198
static VALUE
 
4199
_wrap_comedi_close(int argc, VALUE *argv, VALUE self) {
 
4200
    comedi_t *arg1 = (comedi_t *) 0 ;
 
4201
    int result;
 
4202
    VALUE vresult = Qnil;
 
4203
    
 
4204
    if ((argc < 1) || (argc > 1))
 
4205
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
4206
    SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
 
4207
    result = (int)comedi_close(arg1);
 
4208
    
 
4209
    vresult = INT2NUM(result);
 
4210
    return vresult;
 
4211
}
 
4212
 
 
4213
 
 
4214
static VALUE
 
4215
_wrap_comedi_loglevel(int argc, VALUE *argv, VALUE self) {
 
4216
    int arg1 ;
 
4217
    int result;
 
4218
    VALUE vresult = Qnil;
 
4219
    
 
4220
    if ((argc < 1) || (argc > 1))
 
4221
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
4222
    arg1 = NUM2INT(argv[0]);
 
4223
    result = (int)comedi_loglevel(arg1);
 
4224
    
 
4225
    vresult = INT2NUM(result);
 
4226
    return vresult;
 
4227
}
 
4228
 
 
4229
 
 
4230
static VALUE
 
4231
_wrap_comedi_perror(int argc, VALUE *argv, VALUE self) {
 
4232
    char *arg1 ;
 
4233
    
 
4234
    if ((argc < 1) || (argc > 1))
 
4235
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
4236
    arg1 = StringValuePtr(argv[0]);
 
4237
    comedi_perror((char const *)arg1);
 
4238
    
 
4239
    return Qnil;
 
4240
}
 
4241
 
 
4242
 
 
4243
static VALUE
 
4244
_wrap_comedi_strerror(int argc, VALUE *argv, VALUE self) {
 
4245
    int arg1 ;
 
4246
    char *result;
 
4247
    VALUE vresult = Qnil;
 
4248
    
 
4249
    if ((argc < 1) || (argc > 1))
 
4250
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
4251
    arg1 = NUM2INT(argv[0]);
 
4252
    result = (char *)comedi_strerror(arg1);
 
4253
    
 
4254
    vresult = rb_str_new2(result);
 
4255
    return vresult;
 
4256
}
 
4257
 
 
4258
 
 
4259
static VALUE
 
4260
_wrap_comedi_errno(int argc, VALUE *argv, VALUE self) {
 
4261
    int result;
 
4262
    VALUE vresult = Qnil;
 
4263
    
 
4264
    if ((argc < 0) || (argc > 0))
 
4265
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
4266
    result = (int)comedi_errno();
 
4267
    
 
4268
    vresult = INT2NUM(result);
 
4269
    return vresult;
 
4270
}
 
4271
 
 
4272
 
 
4273
static VALUE
 
4274
_wrap_comedi_fileno(int argc, VALUE *argv, VALUE self) {
 
4275
    comedi_t *arg1 = (comedi_t *) 0 ;
 
4276
    int result;
 
4277
    VALUE vresult = Qnil;
 
4278
    
 
4279
    if ((argc < 1) || (argc > 1))
 
4280
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
4281
    SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
 
4282
    result = (int)comedi_fileno(arg1);
 
4283
    
 
4284
    vresult = INT2NUM(result);
 
4285
    return vresult;
 
4286
}
 
4287
 
 
4288
 
 
4289
static VALUE
 
4290
_wrap_comedi_set_global_oor_behavior(int argc, VALUE *argv, VALUE self) {
 
4291
    int arg1 ;
 
4292
    int result;
 
4293
    VALUE vresult = Qnil;
 
4294
    
 
4295
    if ((argc < 1) || (argc > 1))
 
4296
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
4297
    arg1 = (int) NUM2INT(argv[0]);
 
4298
    result = (int)comedi_set_global_oor_behavior((enum comedi_oor_behavior)arg1);
 
4299
    
 
4300
    vresult = INT2NUM(result);
 
4301
    return vresult;
 
4302
}
 
4303
 
 
4304
 
 
4305
static VALUE
 
4306
_wrap_comedi_get_n_subdevices(int argc, VALUE *argv, VALUE self) {
 
4307
    comedi_t *arg1 = (comedi_t *) 0 ;
 
4308
    int result;
 
4309
    VALUE vresult = Qnil;
 
4310
    
 
4311
    if ((argc < 1) || (argc > 1))
 
4312
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
4313
    SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
 
4314
    result = (int)comedi_get_n_subdevices(arg1);
 
4315
    
 
4316
    vresult = INT2NUM(result);
 
4317
    return vresult;
 
4318
}
 
4319
 
 
4320
 
 
4321
static VALUE
 
4322
_wrap_comedi_get_version_code(int argc, VALUE *argv, VALUE self) {
 
4323
    comedi_t *arg1 = (comedi_t *) 0 ;
 
4324
    int result;
 
4325
    VALUE vresult = Qnil;
 
4326
    
 
4327
    if ((argc < 1) || (argc > 1))
 
4328
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
4329
    SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
 
4330
    result = (int)comedi_get_version_code(arg1);
 
4331
    
 
4332
    vresult = INT2NUM(result);
 
4333
    return vresult;
 
4334
}
 
4335
 
 
4336
 
 
4337
static VALUE
 
4338
_wrap_comedi_get_driver_name(int argc, VALUE *argv, VALUE self) {
 
4339
    comedi_t *arg1 = (comedi_t *) 0 ;
 
4340
    char *result;
 
4341
    VALUE vresult = Qnil;
 
4342
    
 
4343
    if ((argc < 1) || (argc > 1))
 
4344
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
4345
    SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
 
4346
    result = (char *)comedi_get_driver_name(arg1);
 
4347
    
 
4348
    vresult = rb_str_new2(result);
 
4349
    return vresult;
 
4350
}
 
4351
 
 
4352
 
 
4353
static VALUE
 
4354
_wrap_comedi_get_board_name(int argc, VALUE *argv, VALUE self) {
 
4355
    comedi_t *arg1 = (comedi_t *) 0 ;
 
4356
    char *result;
 
4357
    VALUE vresult = Qnil;
 
4358
    
 
4359
    if ((argc < 1) || (argc > 1))
 
4360
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
4361
    SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
 
4362
    result = (char *)comedi_get_board_name(arg1);
 
4363
    
 
4364
    vresult = rb_str_new2(result);
 
4365
    return vresult;
 
4366
}
 
4367
 
 
4368
 
 
4369
static VALUE
 
4370
_wrap_comedi_get_read_subdevice(int argc, VALUE *argv, VALUE self) {
 
4371
    comedi_t *arg1 = (comedi_t *) 0 ;
 
4372
    int result;
 
4373
    VALUE vresult = Qnil;
 
4374
    
 
4375
    if ((argc < 1) || (argc > 1))
 
4376
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
4377
    SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
 
4378
    result = (int)comedi_get_read_subdevice(arg1);
 
4379
    
 
4380
    vresult = INT2NUM(result);
 
4381
    return vresult;
 
4382
}
 
4383
 
 
4384
 
 
4385
static VALUE
 
4386
_wrap_comedi_get_write_subdevice(int argc, VALUE *argv, VALUE self) {
 
4387
    comedi_t *arg1 = (comedi_t *) 0 ;
 
4388
    int result;
 
4389
    VALUE vresult = Qnil;
 
4390
    
 
4391
    if ((argc < 1) || (argc > 1))
 
4392
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
4393
    SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
 
4394
    result = (int)comedi_get_write_subdevice(arg1);
 
4395
    
 
4396
    vresult = INT2NUM(result);
 
4397
    return vresult;
 
4398
}
 
4399
 
 
4400
 
 
4401
static VALUE
 
4402
_wrap_comedi_get_subdevice_type(int argc, VALUE *argv, VALUE self) {
 
4403
    comedi_t *arg1 = (comedi_t *) 0 ;
 
4404
    unsigned int arg2 ;
 
4405
    int result;
 
4406
    VALUE vresult = Qnil;
 
4407
    
 
4408
    if ((argc < 2) || (argc > 2))
 
4409
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
 
4410
    SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
 
4411
    arg2 = NUM2UINT(argv[1]);
 
4412
    result = (int)comedi_get_subdevice_type(arg1,arg2);
 
4413
    
 
4414
    vresult = INT2NUM(result);
 
4415
    return vresult;
 
4416
}
 
4417
 
 
4418
 
 
4419
static VALUE
 
4420
_wrap_comedi_find_subdevice_by_type(int argc, VALUE *argv, VALUE self) {
 
4421
    comedi_t *arg1 = (comedi_t *) 0 ;
 
4422
    int arg2 ;
 
4423
    unsigned int arg3 ;
 
4424
    int result;
 
4425
    VALUE vresult = Qnil;
 
4426
    
 
4427
    if ((argc < 3) || (argc > 3))
 
4428
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc);
 
4429
    SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
 
4430
    arg2 = NUM2INT(argv[1]);
 
4431
    arg3 = NUM2UINT(argv[2]);
 
4432
    result = (int)comedi_find_subdevice_by_type(arg1,arg2,arg3);
 
4433
    
 
4434
    vresult = INT2NUM(result);
 
4435
    return vresult;
 
4436
}
 
4437
 
 
4438
 
 
4439
static VALUE
 
4440
_wrap_comedi_get_subdevice_flags(int argc, VALUE *argv, VALUE self) {
 
4441
    comedi_t *arg1 = (comedi_t *) 0 ;
 
4442
    unsigned int arg2 ;
 
4443
    int result;
 
4444
    VALUE vresult = Qnil;
 
4445
    
 
4446
    if ((argc < 2) || (argc > 2))
 
4447
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
 
4448
    SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
 
4449
    arg2 = NUM2UINT(argv[1]);
 
4450
    result = (int)comedi_get_subdevice_flags(arg1,arg2);
 
4451
    
 
4452
    vresult = INT2NUM(result);
 
4453
    return vresult;
 
4454
}
 
4455
 
 
4456
 
 
4457
static VALUE
 
4458
_wrap_comedi_get_n_channels(int argc, VALUE *argv, VALUE self) {
 
4459
    comedi_t *arg1 = (comedi_t *) 0 ;
 
4460
    unsigned int arg2 ;
 
4461
    int result;
 
4462
    VALUE vresult = Qnil;
 
4463
    
 
4464
    if ((argc < 2) || (argc > 2))
 
4465
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
 
4466
    SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
 
4467
    arg2 = NUM2UINT(argv[1]);
 
4468
    result = (int)comedi_get_n_channels(arg1,arg2);
 
4469
    
 
4470
    vresult = INT2NUM(result);
 
4471
    return vresult;
 
4472
}
 
4473
 
 
4474
 
 
4475
static VALUE
 
4476
_wrap_comedi_range_is_chan_specific(int argc, VALUE *argv, VALUE self) {
 
4477
    comedi_t *arg1 = (comedi_t *) 0 ;
 
4478
    unsigned int arg2 ;
 
4479
    int result;
 
4480
    VALUE vresult = Qnil;
 
4481
    
 
4482
    if ((argc < 2) || (argc > 2))
 
4483
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
 
4484
    SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
 
4485
    arg2 = NUM2UINT(argv[1]);
 
4486
    result = (int)comedi_range_is_chan_specific(arg1,arg2);
 
4487
    
 
4488
    vresult = INT2NUM(result);
 
4489
    return vresult;
 
4490
}
 
4491
 
 
4492
 
 
4493
static VALUE
 
4494
_wrap_comedi_maxdata_is_chan_specific(int argc, VALUE *argv, VALUE self) {
 
4495
    comedi_t *arg1 = (comedi_t *) 0 ;
 
4496
    unsigned int arg2 ;
 
4497
    int result;
 
4498
    VALUE vresult = Qnil;
 
4499
    
 
4500
    if ((argc < 2) || (argc > 2))
 
4501
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
 
4502
    SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
 
4503
    arg2 = NUM2UINT(argv[1]);
 
4504
    result = (int)comedi_maxdata_is_chan_specific(arg1,arg2);
 
4505
    
 
4506
    vresult = INT2NUM(result);
 
4507
    return vresult;
 
4508
}
 
4509
 
 
4510
 
 
4511
static VALUE
 
4512
_wrap_comedi_get_maxdata(int argc, VALUE *argv, VALUE self) {
 
4513
    comedi_t *arg1 = (comedi_t *) 0 ;
 
4514
    unsigned int arg2 ;
 
4515
    unsigned int arg3 ;
 
4516
    lsampl_t result;
 
4517
    VALUE vresult = Qnil;
 
4518
    
 
4519
    if ((argc < 3) || (argc > 3))
 
4520
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc);
 
4521
    SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
 
4522
    arg2 = NUM2UINT(argv[1]);
 
4523
    arg3 = NUM2UINT(argv[2]);
 
4524
    result = (lsampl_t)comedi_get_maxdata(arg1,arg2,arg3);
 
4525
    
 
4526
    vresult = UINT2NUM(result);
 
4527
    return vresult;
 
4528
}
 
4529
 
 
4530
 
 
4531
static VALUE
 
4532
_wrap_comedi_get_n_ranges(int argc, VALUE *argv, VALUE self) {
 
4533
    comedi_t *arg1 = (comedi_t *) 0 ;
 
4534
    unsigned int arg2 ;
 
4535
    unsigned int arg3 ;
 
4536
    int result;
 
4537
    VALUE vresult = Qnil;
 
4538
    
 
4539
    if ((argc < 3) || (argc > 3))
 
4540
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc);
 
4541
    SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
 
4542
    arg2 = NUM2UINT(argv[1]);
 
4543
    arg3 = NUM2UINT(argv[2]);
 
4544
    result = (int)comedi_get_n_ranges(arg1,arg2,arg3);
 
4545
    
 
4546
    vresult = INT2NUM(result);
 
4547
    return vresult;
 
4548
}
 
4549
 
 
4550
 
 
4551
static VALUE
 
4552
_wrap_comedi_get_range(int argc, VALUE *argv, VALUE self) {
 
4553
    comedi_t *arg1 = (comedi_t *) 0 ;
 
4554
    unsigned int arg2 ;
 
4555
    unsigned int arg3 ;
 
4556
    unsigned int arg4 ;
 
4557
    comedi_range *result;
 
4558
    VALUE vresult = Qnil;
 
4559
    
 
4560
    if ((argc < 4) || (argc > 4))
 
4561
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc);
 
4562
    SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
 
4563
    arg2 = NUM2UINT(argv[1]);
 
4564
    arg3 = NUM2UINT(argv[2]);
 
4565
    arg4 = NUM2UINT(argv[3]);
 
4566
    result = (comedi_range *)comedi_get_range(arg1,arg2,arg3,arg4);
 
4567
    
 
4568
    vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_comedi_range,0);
 
4569
    return vresult;
 
4570
}
 
4571
 
 
4572
 
 
4573
static VALUE
 
4574
_wrap_comedi_find_range(int argc, VALUE *argv, VALUE self) {
 
4575
    comedi_t *arg1 = (comedi_t *) 0 ;
 
4576
    unsigned int arg2 ;
 
4577
    unsigned int arg3 ;
 
4578
    unsigned int arg4 ;
 
4579
    double arg5 ;
 
4580
    double arg6 ;
 
4581
    int result;
 
4582
    VALUE vresult = Qnil;
 
4583
    
 
4584
    if ((argc < 6) || (argc > 6))
 
4585
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 6)",argc);
 
4586
    SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
 
4587
    arg2 = NUM2UINT(argv[1]);
 
4588
    arg3 = NUM2UINT(argv[2]);
 
4589
    arg4 = NUM2UINT(argv[3]);
 
4590
    arg5 = (double) NUM2DBL(argv[4]);
 
4591
    arg6 = (double) NUM2DBL(argv[5]);
 
4592
    result = (int)comedi_find_range(arg1,arg2,arg3,arg4,arg5,arg6);
 
4593
    
 
4594
    vresult = INT2NUM(result);
 
4595
    return vresult;
 
4596
}
 
4597
 
 
4598
 
 
4599
static VALUE
 
4600
_wrap_comedi_get_buffer_size(int argc, VALUE *argv, VALUE self) {
 
4601
    comedi_t *arg1 = (comedi_t *) 0 ;
 
4602
    unsigned int arg2 ;
 
4603
    int result;
 
4604
    VALUE vresult = Qnil;
 
4605
    
 
4606
    if ((argc < 2) || (argc > 2))
 
4607
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
 
4608
    SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
 
4609
    arg2 = NUM2UINT(argv[1]);
 
4610
    result = (int)comedi_get_buffer_size(arg1,arg2);
 
4611
    
 
4612
    vresult = INT2NUM(result);
 
4613
    return vresult;
 
4614
}
 
4615
 
 
4616
 
 
4617
static VALUE
 
4618
_wrap_comedi_get_max_buffer_size(int argc, VALUE *argv, VALUE self) {
 
4619
    comedi_t *arg1 = (comedi_t *) 0 ;
 
4620
    unsigned int arg2 ;
 
4621
    int result;
 
4622
    VALUE vresult = Qnil;
 
4623
    
 
4624
    if ((argc < 2) || (argc > 2))
 
4625
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
 
4626
    SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
 
4627
    arg2 = NUM2UINT(argv[1]);
 
4628
    result = (int)comedi_get_max_buffer_size(arg1,arg2);
 
4629
    
 
4630
    vresult = INT2NUM(result);
 
4631
    return vresult;
 
4632
}
 
4633
 
 
4634
 
 
4635
static VALUE
 
4636
_wrap_comedi_set_buffer_size(int argc, VALUE *argv, VALUE self) {
 
4637
    comedi_t *arg1 = (comedi_t *) 0 ;
 
4638
    unsigned int arg2 ;
 
4639
    unsigned int arg3 ;
 
4640
    int result;
 
4641
    VALUE vresult = Qnil;
 
4642
    
 
4643
    if ((argc < 3) || (argc > 3))
 
4644
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc);
 
4645
    SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
 
4646
    arg2 = NUM2UINT(argv[1]);
 
4647
    arg3 = NUM2UINT(argv[2]);
 
4648
    result = (int)comedi_set_buffer_size(arg1,arg2,arg3);
 
4649
    
 
4650
    vresult = INT2NUM(result);
 
4651
    return vresult;
 
4652
}
 
4653
 
 
4654
 
 
4655
static VALUE
 
4656
_wrap_comedi_do_insnlist(int argc, VALUE *argv, VALUE self) {
 
4657
    comedi_t *arg1 = (comedi_t *) 0 ;
 
4658
    comedi_insnlist *arg2 = (comedi_insnlist *) 0 ;
 
4659
    int result;
 
4660
    VALUE vresult = Qnil;
 
4661
    
 
4662
    if ((argc < 2) || (argc > 2))
 
4663
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
 
4664
    SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
 
4665
    SWIG_ConvertPtr(argv[1], (void **) &arg2, SWIGTYPE_p_comedi_insnlist, 1);
 
4666
    result = (int)comedi_do_insnlist(arg1,arg2);
 
4667
    
 
4668
    vresult = INT2NUM(result);
 
4669
    return vresult;
 
4670
}
 
4671
 
 
4672
 
 
4673
static VALUE
 
4674
_wrap_comedi_do_insn(int argc, VALUE *argv, VALUE self) {
 
4675
    comedi_t *arg1 = (comedi_t *) 0 ;
 
4676
    comedi_insn *arg2 = (comedi_insn *) 0 ;
 
4677
    int result;
 
4678
    VALUE vresult = Qnil;
 
4679
    
 
4680
    if ((argc < 2) || (argc > 2))
 
4681
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
 
4682
    SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
 
4683
    SWIG_ConvertPtr(argv[1], (void **) &arg2, SWIGTYPE_p_comedi_insn, 1);
 
4684
    result = (int)comedi_do_insn(arg1,arg2);
 
4685
    
 
4686
    vresult = INT2NUM(result);
 
4687
    return vresult;
 
4688
}
 
4689
 
 
4690
 
 
4691
static VALUE
 
4692
_wrap_comedi_lock(int argc, VALUE *argv, VALUE self) {
 
4693
    comedi_t *arg1 = (comedi_t *) 0 ;
 
4694
    unsigned int arg2 ;
 
4695
    int result;
 
4696
    VALUE vresult = Qnil;
 
4697
    
 
4698
    if ((argc < 2) || (argc > 2))
 
4699
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
 
4700
    SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
 
4701
    arg2 = NUM2UINT(argv[1]);
 
4702
    result = (int)comedi_lock(arg1,arg2);
 
4703
    
 
4704
    vresult = INT2NUM(result);
 
4705
    return vresult;
 
4706
}
 
4707
 
 
4708
 
 
4709
static VALUE
 
4710
_wrap_comedi_unlock(int argc, VALUE *argv, VALUE self) {
 
4711
    comedi_t *arg1 = (comedi_t *) 0 ;
 
4712
    unsigned int arg2 ;
 
4713
    int result;
 
4714
    VALUE vresult = Qnil;
 
4715
    
 
4716
    if ((argc < 2) || (argc > 2))
 
4717
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
 
4718
    SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
 
4719
    arg2 = NUM2UINT(argv[1]);
 
4720
    result = (int)comedi_unlock(arg1,arg2);
 
4721
    
 
4722
    vresult = INT2NUM(result);
 
4723
    return vresult;
 
4724
}
 
4725
 
 
4726
 
 
4727
static VALUE
 
4728
_wrap_comedi_to_phys(int argc, VALUE *argv, VALUE self) {
 
4729
    lsampl_t arg1 ;
 
4730
    comedi_range *arg2 = (comedi_range *) 0 ;
 
4731
    lsampl_t arg3 ;
 
4732
    double result;
 
4733
    VALUE vresult = Qnil;
 
4734
    
 
4735
    if ((argc < 3) || (argc > 3))
 
4736
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc);
 
4737
    arg1 = NUM2UINT(argv[0]);
 
4738
    SWIG_ConvertPtr(argv[1], (void **) &arg2, SWIGTYPE_p_comedi_range, 1);
 
4739
    arg3 = NUM2UINT(argv[2]);
 
4740
    result = (double)comedi_to_phys(arg1,arg2,arg3);
 
4741
    
 
4742
    vresult = rb_float_new(result);
 
4743
    return vresult;
 
4744
}
 
4745
 
 
4746
 
 
4747
static VALUE
 
4748
_wrap_comedi_from_phys(int argc, VALUE *argv, VALUE self) {
 
4749
    double arg1 ;
 
4750
    comedi_range *arg2 = (comedi_range *) 0 ;
 
4751
    lsampl_t arg3 ;
 
4752
    lsampl_t result;
 
4753
    VALUE vresult = Qnil;
 
4754
    
 
4755
    if ((argc < 3) || (argc > 3))
 
4756
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc);
 
4757
    arg1 = (double) NUM2DBL(argv[0]);
 
4758
    SWIG_ConvertPtr(argv[1], (void **) &arg2, SWIGTYPE_p_comedi_range, 1);
 
4759
    arg3 = NUM2UINT(argv[2]);
 
4760
    result = (lsampl_t)comedi_from_phys(arg1,arg2,arg3);
 
4761
    
 
4762
    vresult = UINT2NUM(result);
 
4763
    return vresult;
 
4764
}
 
4765
 
 
4766
 
 
4767
static VALUE
 
4768
_wrap_comedi_sampl_to_phys(int argc, VALUE *argv, VALUE self) {
 
4769
    double *arg1 = (double *) 0 ;
 
4770
    int arg2 ;
 
4771
    sampl_t *arg3 = (sampl_t *) 0 ;
 
4772
    int arg4 ;
 
4773
    comedi_range *arg5 = (comedi_range *) 0 ;
 
4774
    lsampl_t arg6 ;
 
4775
    int arg7 ;
 
4776
    int result;
 
4777
    VALUE vresult = Qnil;
 
4778
    
 
4779
    if ((argc < 7) || (argc > 7))
 
4780
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 7)",argc);
 
4781
    SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_double, 1);
 
4782
    arg2 = NUM2INT(argv[1]);
 
4783
    SWIG_ConvertPtr(argv[2], (void **) &arg3, SWIGTYPE_p_sampl_t, 1);
 
4784
    arg4 = NUM2INT(argv[3]);
 
4785
    SWIG_ConvertPtr(argv[4], (void **) &arg5, SWIGTYPE_p_comedi_range, 1);
 
4786
    arg6 = NUM2UINT(argv[5]);
 
4787
    arg7 = NUM2INT(argv[6]);
 
4788
    result = (int)comedi_sampl_to_phys(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
 
4789
    
 
4790
    vresult = INT2NUM(result);
 
4791
    return vresult;
 
4792
}
 
4793
 
 
4794
 
 
4795
static VALUE
 
4796
_wrap_comedi_sampl_from_phys(int argc, VALUE *argv, VALUE self) {
 
4797
    sampl_t *arg1 = (sampl_t *) 0 ;
 
4798
    int arg2 ;
 
4799
    double *arg3 = (double *) 0 ;
 
4800
    int arg4 ;
 
4801
    comedi_range *arg5 = (comedi_range *) 0 ;
 
4802
    lsampl_t arg6 ;
 
4803
    int arg7 ;
 
4804
    int result;
 
4805
    VALUE vresult = Qnil;
 
4806
    
 
4807
    if ((argc < 7) || (argc > 7))
 
4808
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 7)",argc);
 
4809
    SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_sampl_t, 1);
 
4810
    arg2 = NUM2INT(argv[1]);
 
4811
    SWIG_ConvertPtr(argv[2], (void **) &arg3, SWIGTYPE_p_double, 1);
 
4812
    arg4 = NUM2INT(argv[3]);
 
4813
    SWIG_ConvertPtr(argv[4], (void **) &arg5, SWIGTYPE_p_comedi_range, 1);
 
4814
    arg6 = NUM2UINT(argv[5]);
 
4815
    arg7 = NUM2INT(argv[6]);
 
4816
    result = (int)comedi_sampl_from_phys(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
 
4817
    
 
4818
    vresult = INT2NUM(result);
 
4819
    return vresult;
 
4820
}
 
4821
 
 
4822
 
 
4823
static VALUE
 
4824
_wrap_comedi_data_read(int argc, VALUE *argv, VALUE self) {
 
4825
    comedi_t *arg1 = (comedi_t *) 0 ;
 
4826
    unsigned int arg2 ;
 
4827
    unsigned int arg3 ;
 
4828
    unsigned int arg4 ;
 
4829
    unsigned int arg5 ;
 
4830
    lsampl_t *arg6 = (lsampl_t *) 0 ;
 
4831
    int result;
 
4832
    lsampl_t temp6 ;
 
4833
    VALUE vresult = Qnil;
 
4834
    
 
4835
    arg6 = &temp6;
 
4836
    if ((argc < 5) || (argc > 5))
 
4837
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc);
 
4838
    SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
 
4839
    arg2 = NUM2UINT(argv[1]);
 
4840
    arg3 = NUM2UINT(argv[2]);
 
4841
    arg4 = NUM2UINT(argv[3]);
 
4842
    arg5 = NUM2UINT(argv[4]);
 
4843
    result = (int)comedi_data_read(arg1,arg2,arg3,arg4,arg5,arg6);
 
4844
    
 
4845
    vresult = INT2NUM(result);
 
4846
    {
 
4847
        VALUE o = UINT2NUM((unsigned int) (*arg6));
 
4848
        vresult = output_helper(vresult, o);
 
4849
    }
 
4850
    return vresult;
 
4851
}
 
4852
 
 
4853
 
 
4854
static VALUE
 
4855
_wrap_comedi_data_read_n(int argc, VALUE *argv, VALUE self) {
 
4856
    comedi_t *arg1 = (comedi_t *) 0 ;
 
4857
    unsigned int arg2 ;
 
4858
    unsigned int arg3 ;
 
4859
    unsigned int arg4 ;
 
4860
    unsigned int arg5 ;
 
4861
    lsampl_t *arg6 = (lsampl_t *) 0 ;
 
4862
    unsigned int arg7 ;
 
4863
    int result;
 
4864
    lsampl_t temp6 ;
 
4865
    VALUE vresult = Qnil;
 
4866
    
 
4867
    arg6 = &temp6;
 
4868
    if ((argc < 6) || (argc > 6))
 
4869
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 6)",argc);
 
4870
    SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
 
4871
    arg2 = NUM2UINT(argv[1]);
 
4872
    arg3 = NUM2UINT(argv[2]);
 
4873
    arg4 = NUM2UINT(argv[3]);
 
4874
    arg5 = NUM2UINT(argv[4]);
 
4875
    arg7 = NUM2UINT(argv[5]);
 
4876
    result = (int)comedi_data_read_n(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
 
4877
    
 
4878
    vresult = INT2NUM(result);
 
4879
    {
 
4880
        VALUE o = UINT2NUM((unsigned int) (*arg6));
 
4881
        vresult = output_helper(vresult, o);
 
4882
    }
 
4883
    return vresult;
 
4884
}
 
4885
 
 
4886
 
 
4887
static VALUE
 
4888
_wrap_comedi_data_read_hint(int argc, VALUE *argv, VALUE self) {
 
4889
    comedi_t *arg1 = (comedi_t *) 0 ;
 
4890
    unsigned int arg2 ;
 
4891
    unsigned int arg3 ;
 
4892
    unsigned int arg4 ;
 
4893
    unsigned int arg5 ;
 
4894
    int result;
 
4895
    VALUE vresult = Qnil;
 
4896
    
 
4897
    if ((argc < 5) || (argc > 5))
 
4898
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc);
 
4899
    SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
 
4900
    arg2 = NUM2UINT(argv[1]);
 
4901
    arg3 = NUM2UINT(argv[2]);
 
4902
    arg4 = NUM2UINT(argv[3]);
 
4903
    arg5 = NUM2UINT(argv[4]);
 
4904
    result = (int)comedi_data_read_hint(arg1,arg2,arg3,arg4,arg5);
 
4905
    
 
4906
    vresult = INT2NUM(result);
 
4907
    return vresult;
 
4908
}
 
4909
 
 
4910
 
 
4911
static VALUE
 
4912
_wrap_comedi_data_read_delayed(int argc, VALUE *argv, VALUE self) {
 
4913
    comedi_t *arg1 = (comedi_t *) 0 ;
 
4914
    unsigned int arg2 ;
 
4915
    unsigned int arg3 ;
 
4916
    unsigned int arg4 ;
 
4917
    unsigned int arg5 ;
 
4918
    lsampl_t *arg6 = (lsampl_t *) 0 ;
 
4919
    unsigned int arg7 ;
 
4920
    int result;
 
4921
    lsampl_t temp6 ;
 
4922
    VALUE vresult = Qnil;
 
4923
    
 
4924
    arg6 = &temp6;
 
4925
    if ((argc < 6) || (argc > 6))
 
4926
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 6)",argc);
 
4927
    SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
 
4928
    arg2 = NUM2UINT(argv[1]);
 
4929
    arg3 = NUM2UINT(argv[2]);
 
4930
    arg4 = NUM2UINT(argv[3]);
 
4931
    arg5 = NUM2UINT(argv[4]);
 
4932
    arg7 = NUM2UINT(argv[5]);
 
4933
    result = (int)comedi_data_read_delayed(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
 
4934
    
 
4935
    vresult = INT2NUM(result);
 
4936
    {
 
4937
        VALUE o = UINT2NUM((unsigned int) (*arg6));
 
4938
        vresult = output_helper(vresult, o);
 
4939
    }
 
4940
    return vresult;
 
4941
}
 
4942
 
 
4943
 
 
4944
static VALUE
 
4945
_wrap_comedi_data_write(int argc, VALUE *argv, VALUE self) {
 
4946
    comedi_t *arg1 = (comedi_t *) 0 ;
 
4947
    unsigned int arg2 ;
 
4948
    unsigned int arg3 ;
 
4949
    unsigned int arg4 ;
 
4950
    unsigned int arg5 ;
 
4951
    lsampl_t arg6 ;
 
4952
    int result;
 
4953
    VALUE vresult = Qnil;
 
4954
    
 
4955
    if ((argc < 6) || (argc > 6))
 
4956
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 6)",argc);
 
4957
    SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
 
4958
    arg2 = NUM2UINT(argv[1]);
 
4959
    arg3 = NUM2UINT(argv[2]);
 
4960
    arg4 = NUM2UINT(argv[3]);
 
4961
    arg5 = NUM2UINT(argv[4]);
 
4962
    arg6 = NUM2UINT(argv[5]);
 
4963
    result = (int)comedi_data_write(arg1,arg2,arg3,arg4,arg5,arg6);
 
4964
    
 
4965
    vresult = INT2NUM(result);
 
4966
    return vresult;
 
4967
}
 
4968
 
 
4969
 
 
4970
static VALUE
 
4971
_wrap_comedi_dio_config(int argc, VALUE *argv, VALUE self) {
 
4972
    comedi_t *arg1 = (comedi_t *) 0 ;
 
4973
    unsigned int arg2 ;
 
4974
    unsigned int arg3 ;
 
4975
    unsigned int arg4 ;
 
4976
    int result;
 
4977
    VALUE vresult = Qnil;
 
4978
    
 
4979
    if ((argc < 4) || (argc > 4))
 
4980
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc);
 
4981
    SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
 
4982
    arg2 = NUM2UINT(argv[1]);
 
4983
    arg3 = NUM2UINT(argv[2]);
 
4984
    arg4 = NUM2UINT(argv[3]);
 
4985
    result = (int)comedi_dio_config(arg1,arg2,arg3,arg4);
 
4986
    
 
4987
    vresult = INT2NUM(result);
 
4988
    return vresult;
 
4989
}
 
4990
 
 
4991
 
 
4992
static VALUE
 
4993
_wrap_comedi_dio_read(int argc, VALUE *argv, VALUE self) {
 
4994
    comedi_t *arg1 = (comedi_t *) 0 ;
 
4995
    unsigned int arg2 ;
 
4996
    unsigned int arg3 ;
 
4997
    unsigned int *arg4 = (unsigned int *) 0 ;
 
4998
    int result;
 
4999
    unsigned int temp4 ;
 
5000
    VALUE vresult = Qnil;
 
5001
    
 
5002
    arg4 = &temp4;
 
5003
    if ((argc < 3) || (argc > 3))
 
5004
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc);
 
5005
    SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
 
5006
    arg2 = NUM2UINT(argv[1]);
 
5007
    arg3 = NUM2UINT(argv[2]);
 
5008
    result = (int)comedi_dio_read(arg1,arg2,arg3,arg4);
 
5009
    
 
5010
    vresult = INT2NUM(result);
 
5011
    {
 
5012
        VALUE o = UINT2NUM((unsigned int) (*arg4));
 
5013
        vresult = output_helper(vresult, o);
 
5014
    }
 
5015
    return vresult;
 
5016
}
 
5017
 
 
5018
 
 
5019
static VALUE
 
5020
_wrap_comedi_dio_write(int argc, VALUE *argv, VALUE self) {
 
5021
    comedi_t *arg1 = (comedi_t *) 0 ;
 
5022
    unsigned int arg2 ;
 
5023
    unsigned int arg3 ;
 
5024
    unsigned int arg4 ;
 
5025
    int result;
 
5026
    VALUE vresult = Qnil;
 
5027
    
 
5028
    if ((argc < 4) || (argc > 4))
 
5029
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc);
 
5030
    SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
 
5031
    arg2 = NUM2UINT(argv[1]);
 
5032
    arg3 = NUM2UINT(argv[2]);
 
5033
    arg4 = NUM2UINT(argv[3]);
 
5034
    result = (int)comedi_dio_write(arg1,arg2,arg3,arg4);
 
5035
    
 
5036
    vresult = INT2NUM(result);
 
5037
    return vresult;
 
5038
}
 
5039
 
 
5040
 
 
5041
static VALUE
 
5042
_wrap_comedi_dio_bitfield(int argc, VALUE *argv, VALUE self) {
 
5043
    comedi_t *arg1 = (comedi_t *) 0 ;
 
5044
    unsigned int arg2 ;
 
5045
    unsigned int arg3 ;
 
5046
    unsigned int *arg4 = (unsigned int *) 0 ;
 
5047
    int result;
 
5048
    unsigned int temp4 ;
 
5049
    VALUE vresult = Qnil;
 
5050
    
 
5051
    if ((argc < 4) || (argc > 4))
 
5052
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc);
 
5053
    SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
 
5054
    arg2 = NUM2UINT(argv[1]);
 
5055
    arg3 = NUM2UINT(argv[2]);
 
5056
    {
 
5057
        temp4 = (unsigned int) NUM2UINT(argv[3]);
 
5058
        arg4 = &temp4;
 
5059
    }
 
5060
    result = (int)comedi_dio_bitfield(arg1,arg2,arg3,arg4);
 
5061
    
 
5062
    vresult = INT2NUM(result);
 
5063
    {
 
5064
        VALUE o = UINT2NUM((unsigned int) (*arg4));
 
5065
        vresult = output_helper(vresult, o);
 
5066
    }
 
5067
    return vresult;
 
5068
}
 
5069
 
 
5070
 
 
5071
static VALUE
 
5072
_wrap_comedi_sv_init(int argc, VALUE *argv, VALUE self) {
 
5073
    comedi_sv_t *arg1 = (comedi_sv_t *) 0 ;
 
5074
    comedi_t *arg2 = (comedi_t *) 0 ;
 
5075
    unsigned int arg3 ;
 
5076
    unsigned int arg4 ;
 
5077
    int result;
 
5078
    VALUE vresult = Qnil;
 
5079
    
 
5080
    if ((argc < 4) || (argc > 4))
 
5081
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc);
 
5082
    SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_comedi_sv_t, 1);
 
5083
    SWIG_ConvertPtr(argv[1], (void **) &arg2, 0, 1);
 
5084
    arg3 = NUM2UINT(argv[2]);
 
5085
    arg4 = NUM2UINT(argv[3]);
 
5086
    result = (int)comedi_sv_init(arg1,arg2,arg3,arg4);
 
5087
    
 
5088
    vresult = INT2NUM(result);
 
5089
    return vresult;
 
5090
}
 
5091
 
 
5092
 
 
5093
static VALUE
 
5094
_wrap_comedi_sv_update(int argc, VALUE *argv, VALUE self) {
 
5095
    comedi_sv_t *arg1 = (comedi_sv_t *) 0 ;
 
5096
    int result;
 
5097
    VALUE vresult = Qnil;
 
5098
    
 
5099
    if ((argc < 1) || (argc > 1))
 
5100
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
5101
    SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_comedi_sv_t, 1);
 
5102
    result = (int)comedi_sv_update(arg1);
 
5103
    
 
5104
    vresult = INT2NUM(result);
 
5105
    return vresult;
 
5106
}
 
5107
 
 
5108
 
 
5109
static VALUE
 
5110
_wrap_comedi_sv_measure(int argc, VALUE *argv, VALUE self) {
 
5111
    comedi_sv_t *arg1 = (comedi_sv_t *) 0 ;
 
5112
    double *arg2 = (double *) 0 ;
 
5113
    int result;
 
5114
    VALUE vresult = Qnil;
 
5115
    
 
5116
    if ((argc < 2) || (argc > 2))
 
5117
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
 
5118
    SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_comedi_sv_t, 1);
 
5119
    SWIG_ConvertPtr(argv[1], (void **) &arg2, SWIGTYPE_p_double, 1);
 
5120
    result = (int)comedi_sv_measure(arg1,arg2);
 
5121
    
 
5122
    vresult = INT2NUM(result);
 
5123
    return vresult;
 
5124
}
 
5125
 
 
5126
 
 
5127
static VALUE
 
5128
_wrap_comedi_get_cmd_src_mask(int argc, VALUE *argv, VALUE self) {
 
5129
    comedi_t *arg1 = (comedi_t *) 0 ;
 
5130
    unsigned int arg2 ;
 
5131
    comedi_cmd *arg3 = (comedi_cmd *) 0 ;
 
5132
    int result;
 
5133
    VALUE info3 ;
 
5134
    VALUE vresult = Qnil;
 
5135
    
 
5136
    if ((argc < 3) || (argc > 3))
 
5137
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc);
 
5138
    SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
 
5139
    arg2 = NUM2UINT(argv[1]);
 
5140
    SWIG_ConvertPtr(argv[2], (void **) &arg3, SWIGTYPE_p_comedi_cmd, 1);
 
5141
    result = (int)comedi_get_cmd_src_mask(arg1,arg2,arg3);
 
5142
    
 
5143
    vresult = INT2NUM(result);
 
5144
    {
 
5145
        vresult = output_helper(vresult, argv[2]);
 
5146
    }
 
5147
    return vresult;
 
5148
}
 
5149
 
 
5150
 
 
5151
static VALUE
 
5152
_wrap_comedi_get_cmd_generic_timed(int argc, VALUE *argv, VALUE self) {
 
5153
    comedi_t *arg1 = (comedi_t *) 0 ;
 
5154
    unsigned int arg2 ;
 
5155
    comedi_cmd *arg3 = (comedi_cmd *) 0 ;
 
5156
    unsigned int arg4 ;
 
5157
    int result;
 
5158
    VALUE info3 ;
 
5159
    VALUE vresult = Qnil;
 
5160
    
 
5161
    if ((argc < 4) || (argc > 4))
 
5162
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc);
 
5163
    SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
 
5164
    arg2 = NUM2UINT(argv[1]);
 
5165
    SWIG_ConvertPtr(argv[2], (void **) &arg3, SWIGTYPE_p_comedi_cmd, 1);
 
5166
    arg4 = NUM2UINT(argv[3]);
 
5167
    result = (int)comedi_get_cmd_generic_timed(arg1,arg2,arg3,arg4);
 
5168
    
 
5169
    vresult = INT2NUM(result);
 
5170
    {
 
5171
        vresult = output_helper(vresult, argv[2]);
 
5172
    }
 
5173
    return vresult;
 
5174
}
 
5175
 
 
5176
 
 
5177
static VALUE
 
5178
_wrap_comedi_cancel(int argc, VALUE *argv, VALUE self) {
 
5179
    comedi_t *arg1 = (comedi_t *) 0 ;
 
5180
    unsigned int arg2 ;
 
5181
    int result;
 
5182
    VALUE vresult = Qnil;
 
5183
    
 
5184
    if ((argc < 2) || (argc > 2))
 
5185
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
 
5186
    SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
 
5187
    arg2 = NUM2UINT(argv[1]);
 
5188
    result = (int)comedi_cancel(arg1,arg2);
 
5189
    
 
5190
    vresult = INT2NUM(result);
 
5191
    return vresult;
 
5192
}
 
5193
 
 
5194
 
 
5195
static VALUE
 
5196
_wrap_comedi_command(int argc, VALUE *argv, VALUE self) {
 
5197
    comedi_t *arg1 = (comedi_t *) 0 ;
 
5198
    comedi_cmd *arg2 = (comedi_cmd *) 0 ;
 
5199
    int result;
 
5200
    VALUE vresult = Qnil;
 
5201
    
 
5202
    if ((argc < 2) || (argc > 2))
 
5203
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
 
5204
    SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
 
5205
    SWIG_ConvertPtr(argv[1], (void **) &arg2, SWIGTYPE_p_comedi_cmd, 1);
 
5206
    result = (int)comedi_command(arg1,arg2);
 
5207
    
 
5208
    vresult = INT2NUM(result);
 
5209
    return vresult;
 
5210
}
 
5211
 
 
5212
 
 
5213
static VALUE
 
5214
_wrap_comedi_command_test(int argc, VALUE *argv, VALUE self) {
 
5215
    comedi_t *arg1 = (comedi_t *) 0 ;
 
5216
    comedi_cmd *arg2 = (comedi_cmd *) 0 ;
 
5217
    int result;
 
5218
    VALUE info2 ;
 
5219
    VALUE vresult = Qnil;
 
5220
    
 
5221
    if ((argc < 2) || (argc > 2))
 
5222
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
 
5223
    SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
 
5224
    SWIG_ConvertPtr(argv[1], (void **) &arg2, SWIGTYPE_p_comedi_cmd, 1);
 
5225
    result = (int)comedi_command_test(arg1,arg2);
 
5226
    
 
5227
    vresult = INT2NUM(result);
 
5228
    {
 
5229
        vresult = output_helper(vresult, argv[1]);
 
5230
    }
 
5231
    return vresult;
 
5232
}
 
5233
 
 
5234
 
 
5235
static VALUE
 
5236
_wrap_comedi_poll(int argc, VALUE *argv, VALUE self) {
 
5237
    comedi_t *arg1 = (comedi_t *) 0 ;
 
5238
    unsigned int arg2 ;
 
5239
    int result;
 
5240
    VALUE vresult = Qnil;
 
5241
    
 
5242
    if ((argc < 2) || (argc > 2))
 
5243
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
 
5244
    SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
 
5245
    arg2 = NUM2UINT(argv[1]);
 
5246
    result = (int)comedi_poll(arg1,arg2);
 
5247
    
 
5248
    vresult = INT2NUM(result);
 
5249
    return vresult;
 
5250
}
 
5251
 
 
5252
 
 
5253
static VALUE
 
5254
_wrap_comedi_set_max_buffer_size(int argc, VALUE *argv, VALUE self) {
 
5255
    comedi_t *arg1 = (comedi_t *) 0 ;
 
5256
    unsigned int arg2 ;
 
5257
    unsigned int arg3 ;
 
5258
    int result;
 
5259
    VALUE vresult = Qnil;
 
5260
    
 
5261
    if ((argc < 3) || (argc > 3))
 
5262
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc);
 
5263
    SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
 
5264
    arg2 = NUM2UINT(argv[1]);
 
5265
    arg3 = NUM2UINT(argv[2]);
 
5266
    result = (int)comedi_set_max_buffer_size(arg1,arg2,arg3);
 
5267
    
 
5268
    vresult = INT2NUM(result);
 
5269
    return vresult;
 
5270
}
 
5271
 
 
5272
 
 
5273
static VALUE
 
5274
_wrap_comedi_get_buffer_contents(int argc, VALUE *argv, VALUE self) {
 
5275
    comedi_t *arg1 = (comedi_t *) 0 ;
 
5276
    unsigned int arg2 ;
 
5277
    int result;
 
5278
    VALUE vresult = Qnil;
 
5279
    
 
5280
    if ((argc < 2) || (argc > 2))
 
5281
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
 
5282
    SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
 
5283
    arg2 = NUM2UINT(argv[1]);
 
5284
    result = (int)comedi_get_buffer_contents(arg1,arg2);
 
5285
    
 
5286
    vresult = INT2NUM(result);
 
5287
    return vresult;
 
5288
}
 
5289
 
 
5290
 
 
5291
static VALUE
 
5292
_wrap_comedi_mark_buffer_read(int argc, VALUE *argv, VALUE self) {
 
5293
    comedi_t *arg1 = (comedi_t *) 0 ;
 
5294
    unsigned int arg2 ;
 
5295
    unsigned int arg3 ;
 
5296
    int result;
 
5297
    VALUE vresult = Qnil;
 
5298
    
 
5299
    if ((argc < 3) || (argc > 3))
 
5300
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc);
 
5301
    SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
 
5302
    arg2 = NUM2UINT(argv[1]);
 
5303
    arg3 = NUM2UINT(argv[2]);
 
5304
    result = (int)comedi_mark_buffer_read(arg1,arg2,arg3);
 
5305
    
 
5306
    vresult = INT2NUM(result);
 
5307
    return vresult;
 
5308
}
 
5309
 
 
5310
 
 
5311
static VALUE
 
5312
_wrap_comedi_get_buffer_offset(int argc, VALUE *argv, VALUE self) {
 
5313
    comedi_t *arg1 = (comedi_t *) 0 ;
 
5314
    unsigned int arg2 ;
 
5315
    int result;
 
5316
    VALUE vresult = Qnil;
 
5317
    
 
5318
    if ((argc < 2) || (argc > 2))
 
5319
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
 
5320
    SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
 
5321
    arg2 = NUM2UINT(argv[1]);
 
5322
    result = (int)comedi_get_buffer_offset(arg1,arg2);
 
5323
    
 
5324
    vresult = INT2NUM(result);
 
5325
    return vresult;
 
5326
}
 
5327
 
 
5328
 
 
5329
static VALUE
 
5330
_wrap_comedi_caldac_t_subdevice_set(int argc, VALUE *argv, VALUE self) {
 
5331
    comedi_caldac_t *arg1 = (comedi_caldac_t *) 0 ;
 
5332
    unsigned int arg2 ;
 
5333
    
 
5334
    if ((argc < 1) || (argc > 1))
 
5335
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
5336
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_caldac_t, 1);
 
5337
    arg2 = NUM2UINT(argv[0]);
 
5338
    if (arg1) (arg1)->subdevice = arg2;
 
5339
    
 
5340
    return Qnil;
 
5341
}
 
5342
 
 
5343
 
 
5344
static VALUE
 
5345
_wrap_comedi_caldac_t_subdevice_get(int argc, VALUE *argv, VALUE self) {
 
5346
    comedi_caldac_t *arg1 = (comedi_caldac_t *) 0 ;
 
5347
    unsigned int result;
 
5348
    VALUE vresult = Qnil;
 
5349
    
 
5350
    if ((argc < 0) || (argc > 0))
 
5351
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
5352
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_caldac_t, 1);
 
5353
    result = (unsigned int) ((arg1)->subdevice);
 
5354
    
 
5355
    vresult = UINT2NUM(result);
 
5356
    return vresult;
 
5357
}
 
5358
 
 
5359
 
 
5360
static VALUE
 
5361
_wrap_comedi_caldac_t_channel_set(int argc, VALUE *argv, VALUE self) {
 
5362
    comedi_caldac_t *arg1 = (comedi_caldac_t *) 0 ;
 
5363
    unsigned int arg2 ;
 
5364
    
 
5365
    if ((argc < 1) || (argc > 1))
 
5366
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
5367
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_caldac_t, 1);
 
5368
    arg2 = NUM2UINT(argv[0]);
 
5369
    if (arg1) (arg1)->channel = arg2;
 
5370
    
 
5371
    return Qnil;
 
5372
}
 
5373
 
 
5374
 
 
5375
static VALUE
 
5376
_wrap_comedi_caldac_t_channel_get(int argc, VALUE *argv, VALUE self) {
 
5377
    comedi_caldac_t *arg1 = (comedi_caldac_t *) 0 ;
 
5378
    unsigned int result;
 
5379
    VALUE vresult = Qnil;
 
5380
    
 
5381
    if ((argc < 0) || (argc > 0))
 
5382
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
5383
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_caldac_t, 1);
 
5384
    result = (unsigned int) ((arg1)->channel);
 
5385
    
 
5386
    vresult = UINT2NUM(result);
 
5387
    return vresult;
 
5388
}
 
5389
 
 
5390
 
 
5391
static VALUE
 
5392
_wrap_comedi_caldac_t_value_set(int argc, VALUE *argv, VALUE self) {
 
5393
    comedi_caldac_t *arg1 = (comedi_caldac_t *) 0 ;
 
5394
    unsigned int arg2 ;
 
5395
    
 
5396
    if ((argc < 1) || (argc > 1))
 
5397
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
5398
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_caldac_t, 1);
 
5399
    arg2 = NUM2UINT(argv[0]);
 
5400
    if (arg1) (arg1)->value = arg2;
 
5401
    
 
5402
    return Qnil;
 
5403
}
 
5404
 
 
5405
 
 
5406
static VALUE
 
5407
_wrap_comedi_caldac_t_value_get(int argc, VALUE *argv, VALUE self) {
 
5408
    comedi_caldac_t *arg1 = (comedi_caldac_t *) 0 ;
 
5409
    unsigned int result;
 
5410
    VALUE vresult = Qnil;
 
5411
    
 
5412
    if ((argc < 0) || (argc > 0))
 
5413
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
5414
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_caldac_t, 1);
 
5415
    result = (unsigned int) ((arg1)->value);
 
5416
    
 
5417
    vresult = UINT2NUM(result);
 
5418
    return vresult;
 
5419
}
 
5420
 
 
5421
 
 
5422
#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
 
5423
static VALUE
 
5424
_wrap_comedi_caldac_t_allocate(VALUE self) {
 
5425
#else
 
5426
    static VALUE
 
5427
    _wrap_comedi_caldac_t_allocate(int argc, VALUE *argv, VALUE self) {
 
5428
#endif
 
5429
        
 
5430
        
 
5431
        VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_comedi_caldac_t);
 
5432
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
 
5433
        rb_obj_call_init(vresult, argc, argv);
 
5434
#endif
 
5435
        return vresult;
 
5436
    }
 
5437
    
 
5438
 
 
5439
static VALUE
 
5440
_wrap_new_comedi_caldac_t(int argc, VALUE *argv, VALUE self) {
 
5441
    comedi_caldac_t *result;
 
5442
    
 
5443
    if ((argc < 0) || (argc > 0))
 
5444
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
5445
    result = (comedi_caldac_t *)(comedi_caldac_t *) calloc(1, sizeof(comedi_caldac_t));
 
5446
    DATA_PTR(self) = result;
 
5447
    return self;
 
5448
}
 
5449
 
 
5450
 
 
5451
static void
 
5452
free_comedi_caldac_t(comedi_caldac_t *arg1) {
 
5453
    free((char*) arg1);
 
5454
}
 
5455
static VALUE
 
5456
_wrap_comedi_calibration_setting_t_subdevice_set(int argc, VALUE *argv, VALUE self) {
 
5457
    comedi_calibration_setting_t *arg1 = (comedi_calibration_setting_t *) 0 ;
 
5458
    unsigned int arg2 ;
 
5459
    
 
5460
    if ((argc < 1) || (argc > 1))
 
5461
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
5462
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_calibration_setting_t, 1);
 
5463
    arg2 = NUM2UINT(argv[0]);
 
5464
    if (arg1) (arg1)->subdevice = arg2;
 
5465
    
 
5466
    return Qnil;
 
5467
}
 
5468
 
 
5469
 
 
5470
static VALUE
 
5471
_wrap_comedi_calibration_setting_t_subdevice_get(int argc, VALUE *argv, VALUE self) {
 
5472
    comedi_calibration_setting_t *arg1 = (comedi_calibration_setting_t *) 0 ;
 
5473
    unsigned int result;
 
5474
    VALUE vresult = Qnil;
 
5475
    
 
5476
    if ((argc < 0) || (argc > 0))
 
5477
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
5478
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_calibration_setting_t, 1);
 
5479
    result = (unsigned int) ((arg1)->subdevice);
 
5480
    
 
5481
    vresult = UINT2NUM(result);
 
5482
    return vresult;
 
5483
}
 
5484
 
 
5485
 
 
5486
static VALUE
 
5487
_wrap_comedi_calibration_setting_t_channels_set(int argc, VALUE *argv, VALUE self) {
 
5488
    comedi_calibration_setting_t *arg1 = (comedi_calibration_setting_t *) 0 ;
 
5489
    unsigned int *arg2 = (unsigned int *) 0 ;
 
5490
    
 
5491
    if ((argc < 1) || (argc > 1))
 
5492
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
5493
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_calibration_setting_t, 1);
 
5494
    SWIG_ConvertPtr(argv[0], (void **) &arg2, SWIGTYPE_p_unsigned_int, 1);
 
5495
    if (arg1) (arg1)->channels = arg2;
 
5496
    
 
5497
    return Qnil;
 
5498
}
 
5499
 
 
5500
 
 
5501
static VALUE
 
5502
_wrap_comedi_calibration_setting_t_channels_get(int argc, VALUE *argv, VALUE self) {
 
5503
    comedi_calibration_setting_t *arg1 = (comedi_calibration_setting_t *) 0 ;
 
5504
    unsigned int *result;
 
5505
    VALUE vresult = Qnil;
 
5506
    
 
5507
    if ((argc < 0) || (argc > 0))
 
5508
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
5509
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_calibration_setting_t, 1);
 
5510
    result = (unsigned int *) ((arg1)->channels);
 
5511
    
 
5512
    vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_unsigned_int,0);
 
5513
    return vresult;
 
5514
}
 
5515
 
 
5516
 
 
5517
static VALUE
 
5518
_wrap_comedi_calibration_setting_t_num_channels_set(int argc, VALUE *argv, VALUE self) {
 
5519
    comedi_calibration_setting_t *arg1 = (comedi_calibration_setting_t *) 0 ;
 
5520
    unsigned int arg2 ;
 
5521
    
 
5522
    if ((argc < 1) || (argc > 1))
 
5523
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
5524
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_calibration_setting_t, 1);
 
5525
    arg2 = NUM2UINT(argv[0]);
 
5526
    if (arg1) (arg1)->num_channels = arg2;
 
5527
    
 
5528
    return Qnil;
 
5529
}
 
5530
 
 
5531
 
 
5532
static VALUE
 
5533
_wrap_comedi_calibration_setting_t_num_channels_get(int argc, VALUE *argv, VALUE self) {
 
5534
    comedi_calibration_setting_t *arg1 = (comedi_calibration_setting_t *) 0 ;
 
5535
    unsigned int result;
 
5536
    VALUE vresult = Qnil;
 
5537
    
 
5538
    if ((argc < 0) || (argc > 0))
 
5539
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
5540
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_calibration_setting_t, 1);
 
5541
    result = (unsigned int) ((arg1)->num_channels);
 
5542
    
 
5543
    vresult = UINT2NUM(result);
 
5544
    return vresult;
 
5545
}
 
5546
 
 
5547
 
 
5548
static VALUE
 
5549
_wrap_comedi_calibration_setting_t_ranges_set(int argc, VALUE *argv, VALUE self) {
 
5550
    comedi_calibration_setting_t *arg1 = (comedi_calibration_setting_t *) 0 ;
 
5551
    unsigned int *arg2 = (unsigned int *) 0 ;
 
5552
    
 
5553
    if ((argc < 1) || (argc > 1))
 
5554
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
5555
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_calibration_setting_t, 1);
 
5556
    SWIG_ConvertPtr(argv[0], (void **) &arg2, SWIGTYPE_p_unsigned_int, 1);
 
5557
    if (arg1) (arg1)->ranges = arg2;
 
5558
    
 
5559
    return Qnil;
 
5560
}
 
5561
 
 
5562
 
 
5563
static VALUE
 
5564
_wrap_comedi_calibration_setting_t_ranges_get(int argc, VALUE *argv, VALUE self) {
 
5565
    comedi_calibration_setting_t *arg1 = (comedi_calibration_setting_t *) 0 ;
 
5566
    unsigned int *result;
 
5567
    VALUE vresult = Qnil;
 
5568
    
 
5569
    if ((argc < 0) || (argc > 0))
 
5570
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
5571
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_calibration_setting_t, 1);
 
5572
    result = (unsigned int *) ((arg1)->ranges);
 
5573
    
 
5574
    vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_unsigned_int,0);
 
5575
    return vresult;
 
5576
}
 
5577
 
 
5578
 
 
5579
static VALUE
 
5580
_wrap_comedi_calibration_setting_t_num_ranges_set(int argc, VALUE *argv, VALUE self) {
 
5581
    comedi_calibration_setting_t *arg1 = (comedi_calibration_setting_t *) 0 ;
 
5582
    unsigned int arg2 ;
 
5583
    
 
5584
    if ((argc < 1) || (argc > 1))
 
5585
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
5586
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_calibration_setting_t, 1);
 
5587
    arg2 = NUM2UINT(argv[0]);
 
5588
    if (arg1) (arg1)->num_ranges = arg2;
 
5589
    
 
5590
    return Qnil;
 
5591
}
 
5592
 
 
5593
 
 
5594
static VALUE
 
5595
_wrap_comedi_calibration_setting_t_num_ranges_get(int argc, VALUE *argv, VALUE self) {
 
5596
    comedi_calibration_setting_t *arg1 = (comedi_calibration_setting_t *) 0 ;
 
5597
    unsigned int result;
 
5598
    VALUE vresult = Qnil;
 
5599
    
 
5600
    if ((argc < 0) || (argc > 0))
 
5601
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
5602
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_calibration_setting_t, 1);
 
5603
    result = (unsigned int) ((arg1)->num_ranges);
 
5604
    
 
5605
    vresult = UINT2NUM(result);
 
5606
    return vresult;
 
5607
}
 
5608
 
 
5609
 
 
5610
static VALUE
 
5611
_wrap_comedi_calibration_setting_t_arefs_set(int argc, VALUE *argv, VALUE self) {
 
5612
    comedi_calibration_setting_t *arg1 = (comedi_calibration_setting_t *) 0 ;
 
5613
    unsigned int *arg2 ;
 
5614
    
 
5615
    if ((argc < 1) || (argc > 1))
 
5616
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
5617
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_calibration_setting_t, 1);
 
5618
    SWIG_ConvertPtr(argv[0], (void **) &arg2, SWIGTYPE_p_unsigned_int, 1);
 
5619
    {
 
5620
        int ii;
 
5621
        unsigned int *b = (unsigned int *) arg1->arefs;
 
5622
        for (ii = 0; ii < 4; ii++) b[ii] = *((unsigned int *) arg2 + ii);
 
5623
    }
 
5624
    return Qnil;
 
5625
}
 
5626
 
 
5627
 
 
5628
static VALUE
 
5629
_wrap_comedi_calibration_setting_t_arefs_get(int argc, VALUE *argv, VALUE self) {
 
5630
    comedi_calibration_setting_t *arg1 = (comedi_calibration_setting_t *) 0 ;
 
5631
    unsigned int *result;
 
5632
    VALUE vresult = Qnil;
 
5633
    
 
5634
    if ((argc < 0) || (argc > 0))
 
5635
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
5636
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_calibration_setting_t, 1);
 
5637
    result = (unsigned int *)(unsigned int *) ((arg1)->arefs);
 
5638
    
 
5639
    vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_unsigned_int,0);
 
5640
    return vresult;
 
5641
}
 
5642
 
 
5643
 
 
5644
static VALUE
 
5645
_wrap_comedi_calibration_setting_t_num_arefs_set(int argc, VALUE *argv, VALUE self) {
 
5646
    comedi_calibration_setting_t *arg1 = (comedi_calibration_setting_t *) 0 ;
 
5647
    unsigned int arg2 ;
 
5648
    
 
5649
    if ((argc < 1) || (argc > 1))
 
5650
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
5651
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_calibration_setting_t, 1);
 
5652
    arg2 = NUM2UINT(argv[0]);
 
5653
    if (arg1) (arg1)->num_arefs = arg2;
 
5654
    
 
5655
    return Qnil;
 
5656
}
 
5657
 
 
5658
 
 
5659
static VALUE
 
5660
_wrap_comedi_calibration_setting_t_num_arefs_get(int argc, VALUE *argv, VALUE self) {
 
5661
    comedi_calibration_setting_t *arg1 = (comedi_calibration_setting_t *) 0 ;
 
5662
    unsigned int result;
 
5663
    VALUE vresult = Qnil;
 
5664
    
 
5665
    if ((argc < 0) || (argc > 0))
 
5666
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
5667
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_calibration_setting_t, 1);
 
5668
    result = (unsigned int) ((arg1)->num_arefs);
 
5669
    
 
5670
    vresult = UINT2NUM(result);
 
5671
    return vresult;
 
5672
}
 
5673
 
 
5674
 
 
5675
static VALUE
 
5676
_wrap_comedi_calibration_setting_t_caldacs_set(int argc, VALUE *argv, VALUE self) {
 
5677
    comedi_calibration_setting_t *arg1 = (comedi_calibration_setting_t *) 0 ;
 
5678
    comedi_caldac_t *arg2 = (comedi_caldac_t *) 0 ;
 
5679
    
 
5680
    if ((argc < 1) || (argc > 1))
 
5681
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
5682
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_calibration_setting_t, 1);
 
5683
    SWIG_ConvertPtr(argv[0], (void **) &arg2, SWIGTYPE_p_comedi_caldac_t, 1);
 
5684
    if (arg1) (arg1)->caldacs = arg2;
 
5685
    
 
5686
    return Qnil;
 
5687
}
 
5688
 
 
5689
 
 
5690
static VALUE
 
5691
_wrap_comedi_calibration_setting_t_caldacs_get(int argc, VALUE *argv, VALUE self) {
 
5692
    comedi_calibration_setting_t *arg1 = (comedi_calibration_setting_t *) 0 ;
 
5693
    comedi_caldac_t *result;
 
5694
    VALUE vresult = Qnil;
 
5695
    
 
5696
    if ((argc < 0) || (argc > 0))
 
5697
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
5698
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_calibration_setting_t, 1);
 
5699
    result = (comedi_caldac_t *) ((arg1)->caldacs);
 
5700
    
 
5701
    vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_comedi_caldac_t,0);
 
5702
    return vresult;
 
5703
}
 
5704
 
 
5705
 
 
5706
static VALUE
 
5707
_wrap_comedi_calibration_setting_t_num_caldacs_set(int argc, VALUE *argv, VALUE self) {
 
5708
    comedi_calibration_setting_t *arg1 = (comedi_calibration_setting_t *) 0 ;
 
5709
    unsigned int arg2 ;
 
5710
    
 
5711
    if ((argc < 1) || (argc > 1))
 
5712
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
5713
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_calibration_setting_t, 1);
 
5714
    arg2 = NUM2UINT(argv[0]);
 
5715
    if (arg1) (arg1)->num_caldacs = arg2;
 
5716
    
 
5717
    return Qnil;
 
5718
}
 
5719
 
 
5720
 
 
5721
static VALUE
 
5722
_wrap_comedi_calibration_setting_t_num_caldacs_get(int argc, VALUE *argv, VALUE self) {
 
5723
    comedi_calibration_setting_t *arg1 = (comedi_calibration_setting_t *) 0 ;
 
5724
    unsigned int result;
 
5725
    VALUE vresult = Qnil;
 
5726
    
 
5727
    if ((argc < 0) || (argc > 0))
 
5728
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
5729
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_calibration_setting_t, 1);
 
5730
    result = (unsigned int) ((arg1)->num_caldacs);
 
5731
    
 
5732
    vresult = UINT2NUM(result);
 
5733
    return vresult;
 
5734
}
 
5735
 
 
5736
 
 
5737
#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
 
5738
static VALUE
 
5739
_wrap_comedi_calibration_setting_t_allocate(VALUE self) {
 
5740
#else
 
5741
    static VALUE
 
5742
    _wrap_comedi_calibration_setting_t_allocate(int argc, VALUE *argv, VALUE self) {
 
5743
#endif
 
5744
        
 
5745
        
 
5746
        VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_comedi_calibration_setting_t);
 
5747
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
 
5748
        rb_obj_call_init(vresult, argc, argv);
 
5749
#endif
 
5750
        return vresult;
 
5751
    }
 
5752
    
 
5753
 
 
5754
static VALUE
 
5755
_wrap_new_comedi_calibration_setting_t(int argc, VALUE *argv, VALUE self) {
 
5756
    comedi_calibration_setting_t *result;
 
5757
    
 
5758
    if ((argc < 0) || (argc > 0))
 
5759
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
5760
    result = (comedi_calibration_setting_t *)(comedi_calibration_setting_t *) calloc(1, sizeof(comedi_calibration_setting_t));
 
5761
    DATA_PTR(self) = result;
 
5762
    return self;
 
5763
}
 
5764
 
 
5765
 
 
5766
static void
 
5767
free_comedi_calibration_setting_t(comedi_calibration_setting_t *arg1) {
 
5768
    free((char*) arg1);
 
5769
}
 
5770
static VALUE
 
5771
_wrap_comedi_calibration_t_driver_name_set(int argc, VALUE *argv, VALUE self) {
 
5772
    comedi_calibration_t *arg1 = (comedi_calibration_t *) 0 ;
 
5773
    char *arg2 ;
 
5774
    
 
5775
    if ((argc < 1) || (argc > 1))
 
5776
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
5777
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_calibration_t, 1);
 
5778
    arg2 = StringValuePtr(argv[0]);
 
5779
    {
 
5780
        if (arg1->driver_name) free((char*)arg1->driver_name);
 
5781
        if (arg2) {
 
5782
            arg1->driver_name = (char *) malloc(strlen(arg2)+1);
 
5783
            strcpy((char*)arg1->driver_name,arg2);
 
5784
        } else {
 
5785
            arg1->driver_name = 0;
 
5786
        }
 
5787
    }
 
5788
    return Qnil;
 
5789
}
 
5790
 
 
5791
 
 
5792
static VALUE
 
5793
_wrap_comedi_calibration_t_driver_name_get(int argc, VALUE *argv, VALUE self) {
 
5794
    comedi_calibration_t *arg1 = (comedi_calibration_t *) 0 ;
 
5795
    char *result;
 
5796
    VALUE vresult = Qnil;
 
5797
    
 
5798
    if ((argc < 0) || (argc > 0))
 
5799
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
5800
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_calibration_t, 1);
 
5801
    result = (char *) ((arg1)->driver_name);
 
5802
    
 
5803
    vresult = rb_str_new2(result);
 
5804
    return vresult;
 
5805
}
 
5806
 
 
5807
 
 
5808
static VALUE
 
5809
_wrap_comedi_calibration_t_board_name_set(int argc, VALUE *argv, VALUE self) {
 
5810
    comedi_calibration_t *arg1 = (comedi_calibration_t *) 0 ;
 
5811
    char *arg2 ;
 
5812
    
 
5813
    if ((argc < 1) || (argc > 1))
 
5814
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
5815
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_calibration_t, 1);
 
5816
    arg2 = StringValuePtr(argv[0]);
 
5817
    {
 
5818
        if (arg1->board_name) free((char*)arg1->board_name);
 
5819
        if (arg2) {
 
5820
            arg1->board_name = (char *) malloc(strlen(arg2)+1);
 
5821
            strcpy((char*)arg1->board_name,arg2);
 
5822
        } else {
 
5823
            arg1->board_name = 0;
 
5824
        }
 
5825
    }
 
5826
    return Qnil;
 
5827
}
 
5828
 
 
5829
 
 
5830
static VALUE
 
5831
_wrap_comedi_calibration_t_board_name_get(int argc, VALUE *argv, VALUE self) {
 
5832
    comedi_calibration_t *arg1 = (comedi_calibration_t *) 0 ;
 
5833
    char *result;
 
5834
    VALUE vresult = Qnil;
 
5835
    
 
5836
    if ((argc < 0) || (argc > 0))
 
5837
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
5838
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_calibration_t, 1);
 
5839
    result = (char *) ((arg1)->board_name);
 
5840
    
 
5841
    vresult = rb_str_new2(result);
 
5842
    return vresult;
 
5843
}
 
5844
 
 
5845
 
 
5846
static VALUE
 
5847
_wrap_comedi_calibration_t_settings_set(int argc, VALUE *argv, VALUE self) {
 
5848
    comedi_calibration_t *arg1 = (comedi_calibration_t *) 0 ;
 
5849
    comedi_calibration_setting_t *arg2 = (comedi_calibration_setting_t *) 0 ;
 
5850
    
 
5851
    if ((argc < 1) || (argc > 1))
 
5852
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
5853
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_calibration_t, 1);
 
5854
    SWIG_ConvertPtr(argv[0], (void **) &arg2, SWIGTYPE_p_comedi_calibration_setting_t, 1);
 
5855
    if (arg1) (arg1)->settings = arg2;
 
5856
    
 
5857
    return Qnil;
 
5858
}
 
5859
 
 
5860
 
 
5861
static VALUE
 
5862
_wrap_comedi_calibration_t_settings_get(int argc, VALUE *argv, VALUE self) {
 
5863
    comedi_calibration_t *arg1 = (comedi_calibration_t *) 0 ;
 
5864
    comedi_calibration_setting_t *result;
 
5865
    VALUE vresult = Qnil;
 
5866
    
 
5867
    if ((argc < 0) || (argc > 0))
 
5868
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
5869
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_calibration_t, 1);
 
5870
    result = (comedi_calibration_setting_t *) ((arg1)->settings);
 
5871
    
 
5872
    vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_comedi_calibration_setting_t,0);
 
5873
    return vresult;
 
5874
}
 
5875
 
 
5876
 
 
5877
static VALUE
 
5878
_wrap_comedi_calibration_t_num_settings_set(int argc, VALUE *argv, VALUE self) {
 
5879
    comedi_calibration_t *arg1 = (comedi_calibration_t *) 0 ;
 
5880
    unsigned int arg2 ;
 
5881
    
 
5882
    if ((argc < 1) || (argc > 1))
 
5883
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
5884
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_calibration_t, 1);
 
5885
    arg2 = NUM2UINT(argv[0]);
 
5886
    if (arg1) (arg1)->num_settings = arg2;
 
5887
    
 
5888
    return Qnil;
 
5889
}
 
5890
 
 
5891
 
 
5892
static VALUE
 
5893
_wrap_comedi_calibration_t_num_settings_get(int argc, VALUE *argv, VALUE self) {
 
5894
    comedi_calibration_t *arg1 = (comedi_calibration_t *) 0 ;
 
5895
    unsigned int result;
 
5896
    VALUE vresult = Qnil;
 
5897
    
 
5898
    if ((argc < 0) || (argc > 0))
 
5899
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
5900
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_comedi_calibration_t, 1);
 
5901
    result = (unsigned int) ((arg1)->num_settings);
 
5902
    
 
5903
    vresult = UINT2NUM(result);
 
5904
    return vresult;
 
5905
}
 
5906
 
 
5907
 
 
5908
#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
 
5909
static VALUE
 
5910
_wrap_comedi_calibration_t_allocate(VALUE self) {
 
5911
#else
 
5912
    static VALUE
 
5913
    _wrap_comedi_calibration_t_allocate(int argc, VALUE *argv, VALUE self) {
 
5914
#endif
 
5915
        
 
5916
        
 
5917
        VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_comedi_calibration_t);
 
5918
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
 
5919
        rb_obj_call_init(vresult, argc, argv);
 
5920
#endif
 
5921
        return vresult;
 
5922
    }
 
5923
    
 
5924
 
 
5925
static VALUE
 
5926
_wrap_new_comedi_calibration_t(int argc, VALUE *argv, VALUE self) {
 
5927
    comedi_calibration_t *result;
 
5928
    
 
5929
    if ((argc < 0) || (argc > 0))
 
5930
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
 
5931
    result = (comedi_calibration_t *)(comedi_calibration_t *) calloc(1, sizeof(comedi_calibration_t));
 
5932
    DATA_PTR(self) = result;
 
5933
    return self;
 
5934
}
 
5935
 
 
5936
 
 
5937
static void
 
5938
free_comedi_calibration_t(comedi_calibration_t *arg1) {
 
5939
    free((char*) arg1);
 
5940
}
 
5941
static VALUE
 
5942
_wrap_comedi_parse_calibration_file(int argc, VALUE *argv, VALUE self) {
 
5943
    char *arg1 ;
 
5944
    comedi_calibration_t *result;
 
5945
    VALUE vresult = Qnil;
 
5946
    
 
5947
    if ((argc < 1) || (argc > 1))
 
5948
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
5949
    arg1 = StringValuePtr(argv[0]);
 
5950
    result = (comedi_calibration_t *)comedi_parse_calibration_file((char const *)arg1);
 
5951
    
 
5952
    vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_comedi_calibration_t,0);
 
5953
    return vresult;
 
5954
}
 
5955
 
 
5956
 
 
5957
static VALUE
 
5958
_wrap_comedi_apply_parsed_calibration(int argc, VALUE *argv, VALUE self) {
 
5959
    comedi_t *arg1 = (comedi_t *) 0 ;
 
5960
    unsigned int arg2 ;
 
5961
    unsigned int arg3 ;
 
5962
    unsigned int arg4 ;
 
5963
    unsigned int arg5 ;
 
5964
    comedi_calibration_t *arg6 = (comedi_calibration_t *) 0 ;
 
5965
    int result;
 
5966
    VALUE vresult = Qnil;
 
5967
    
 
5968
    if ((argc < 6) || (argc > 6))
 
5969
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 6)",argc);
 
5970
    SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
 
5971
    arg2 = NUM2UINT(argv[1]);
 
5972
    arg3 = NUM2UINT(argv[2]);
 
5973
    arg4 = NUM2UINT(argv[3]);
 
5974
    arg5 = NUM2UINT(argv[4]);
 
5975
    SWIG_ConvertPtr(argv[5], (void **) &arg6, SWIGTYPE_p_comedi_calibration_t, 1);
 
5976
    result = (int)comedi_apply_parsed_calibration(arg1,arg2,arg3,arg4,arg5,(comedi_calibration_t const *)arg6);
 
5977
    
 
5978
    vresult = INT2NUM(result);
 
5979
    return vresult;
 
5980
}
 
5981
 
 
5982
 
 
5983
static VALUE
 
5984
_wrap_comedi_get_default_calibration_path(int argc, VALUE *argv, VALUE self) {
 
5985
    comedi_t *arg1 = (comedi_t *) 0 ;
 
5986
    char *result;
 
5987
    VALUE vresult = Qnil;
 
5988
    
 
5989
    if ((argc < 1) || (argc > 1))
 
5990
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
5991
    SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
 
5992
    result = (char *)comedi_get_default_calibration_path(arg1);
 
5993
    
 
5994
    vresult = rb_str_new2(result);
 
5995
    return vresult;
 
5996
}
 
5997
 
 
5998
 
 
5999
static VALUE
 
6000
_wrap_comedi_cleanup_calibration(int argc, VALUE *argv, VALUE self) {
 
6001
    comedi_calibration_t *arg1 = (comedi_calibration_t *) 0 ;
 
6002
    
 
6003
    if ((argc < 1) || (argc > 1))
 
6004
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
 
6005
    SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_comedi_calibration_t, 1);
 
6006
    comedi_cleanup_calibration(arg1);
 
6007
    
 
6008
    return Qnil;
 
6009
}
 
6010
 
 
6011
 
 
6012
static VALUE
 
6013
_wrap_comedi_apply_calibration(int argc, VALUE *argv, VALUE self) {
 
6014
    comedi_t *arg1 = (comedi_t *) 0 ;
 
6015
    unsigned int arg2 ;
 
6016
    unsigned int arg3 ;
 
6017
    unsigned int arg4 ;
 
6018
    unsigned int arg5 ;
 
6019
    char *arg6 ;
 
6020
    int result;
 
6021
    VALUE vresult = Qnil;
 
6022
    
 
6023
    if ((argc < 6) || (argc > 6))
 
6024
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 6)",argc);
 
6025
    SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
 
6026
    arg2 = NUM2UINT(argv[1]);
 
6027
    arg3 = NUM2UINT(argv[2]);
 
6028
    arg4 = NUM2UINT(argv[3]);
 
6029
    arg5 = NUM2UINT(argv[4]);
 
6030
    arg6 = StringValuePtr(argv[5]);
 
6031
    result = (int)comedi_apply_calibration(arg1,arg2,arg3,arg4,arg5,(char const *)arg6);
 
6032
    
 
6033
    vresult = INT2NUM(result);
 
6034
    return vresult;
 
6035
}
 
6036
 
 
6037
 
 
6038
 
 
6039
/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
 
6040
 
 
6041
static void *_p_chanlistTo_p_unsigned_int(void *x) {
 
6042
    return (void *)((unsigned int *)  ((chanlist *) x));
 
6043
}
 
6044
static swig_type_info _swigt__p_lsampl_t[] = {{"_p_lsampl_t", 0, "lsampl_t *", 0},{"_p_chanlist"},{"_p_lsampl_t"},{"_p_unsigned_int"},{0}};
 
6045
static swig_type_info _swigt__p_sampl_t[] = {{"_p_sampl_t", 0, "sampl_t *", 0},{"_p_sampl_t"},{0}};
 
6046
static swig_type_info _swigt__p_comedi_calibration_setting_t[] = {{"_p_comedi_calibration_setting_t", 0, "comedi_calibration_setting_t *", 0},{"_p_comedi_calibration_setting_t"},{0}};
 
6047
static swig_type_info _swigt__p_double[] = {{"_p_double", 0, "double *", 0},{"_p_double"},{0}};
 
6048
static swig_type_info _swigt__p_comedi_range[] = {{"_p_comedi_range", 0, "comedi_range *", 0},{"_p_comedi_range"},{0}};
 
6049
static swig_type_info _swigt__p_unsigned_int[] = {{"_p_unsigned_int", 0, "unsigned int *", 0},{"_p_chanlist", _p_chanlistTo_p_unsigned_int},{"_p_lsampl_t"},{"_p_unsigned_int"},{0}};
 
6050
static swig_type_info _swigt__p_void[] = {{"_p_void", 0, "void *", 0},{"_p_comedi_t"},{"_p_void"},{0}};
 
6051
static swig_type_info _swigt__p_comedi_subdinfo_struct[] = {{"_p_comedi_subdinfo_struct", 0, "struct comedi_subdinfo_struct *", 0},{"_p_comedi_subdinfo_struct"},{0}};
 
6052
static swig_type_info _swigt__p_comedi_krange_struct[] = {{"_p_comedi_krange_struct", 0, "struct comedi_krange_struct *", 0},{"_p_comedi_krange_struct"},{0}};
 
6053
static swig_type_info _swigt__p_comedi_rangeinfo_struct[] = {{"_p_comedi_rangeinfo_struct", 0, "struct comedi_rangeinfo_struct *", 0},{"_p_comedi_rangeinfo_struct"},{0}};
 
6054
static swig_type_info _swigt__p_comedi_chaninfo_struct[] = {{"_p_comedi_chaninfo_struct", 0, "struct comedi_chaninfo_struct *", 0},{"_p_comedi_chaninfo_struct"},{0}};
 
6055
static swig_type_info _swigt__p_comedi_cmd_struct[] = {{"_p_comedi_cmd_struct", 0, "struct comedi_cmd_struct *", 0},{"_p_comedi_cmd_struct"},{"_p_comedi_cmd"},{0}};
 
6056
static swig_type_info _swigt__p_comedi_insnlist_struct[] = {{"_p_comedi_insnlist_struct", 0, "struct comedi_insnlist_struct *", 0},{"_p_comedi_insnlist"},{"_p_comedi_insnlist_struct"},{0}};
 
6057
static swig_type_info _swigt__p_comedi_insn_struct[] = {{"_p_comedi_insn_struct", 0, "struct comedi_insn_struct *", 0},{"_p_comedi_insn_struct"},{"_p_comedi_insn"},{0}};
 
6058
static swig_type_info _swigt__p_comedi_trig_struct[] = {{"_p_comedi_trig_struct", 0, "struct comedi_trig_struct *", 0},{"_p_comedi_trig_struct"},{0}};
 
6059
static swig_type_info _swigt__p_comedi_devinfo_struct[] = {{"_p_comedi_devinfo_struct", 0, "struct comedi_devinfo_struct *", 0},{"_p_comedi_devinfo_struct"},{0}};
 
6060
static swig_type_info _swigt__p_char[] = {{"_p_char", 0, "char *", 0},{"_p_char"},{0}};
 
6061
static swig_type_info _swigt__p_comedi_devconfig_struct[] = {{"_p_comedi_devconfig_struct", 0, "struct comedi_devconfig_struct *", 0},{"_p_comedi_devconfig_struct"},{0}};
 
6062
static swig_type_info _swigt__p_comedi_bufconfig_struct[] = {{"_p_comedi_bufconfig_struct", 0, "struct comedi_bufconfig_struct *", 0},{"_p_comedi_bufconfig_struct"},{0}};
 
6063
static swig_type_info _swigt__p_comedi_bufinfo_struct[] = {{"_p_comedi_bufinfo_struct", 0, "struct comedi_bufinfo_struct *", 0},{"_p_comedi_bufinfo_struct"},{0}};
 
6064
static swig_type_info _swigt__p_comedi_calibration_t[] = {{"_p_comedi_calibration_t", 0, "comedi_calibration_t *", 0},{"_p_comedi_calibration_t"},{0}};
 
6065
static swig_type_info _swigt__p_comedi_sv_t[] = {{"_p_comedi_sv_t", 0, "comedi_sv_t *", 0},{"_p_comedi_sv_t"},{0}};
 
6066
static swig_type_info _swigt__p_chanlist[] = {{"_p_chanlist", 0, "chanlist *", 0},{"_p_chanlist"},{0}};
 
6067
static swig_type_info _swigt__p_comedi_insn[] = {{"_p_comedi_insn", 0, "comedi_insn *", 0},{"_p_comedi_insn_struct"},{"_p_comedi_insn"},{0}};
 
6068
static swig_type_info _swigt__p_comedi_insnlist[] = {{"_p_comedi_insnlist", 0, "comedi_insnlist *", 0},{"_p_comedi_insnlist"},{"_p_comedi_insnlist_struct"},{0}};
 
6069
static swig_type_info _swigt__p_comedi_caldac_t[] = {{"_p_comedi_caldac_t", 0, "comedi_caldac_t *", 0},{"_p_comedi_caldac_t"},{0}};
 
6070
static swig_type_info _swigt__p_comedi_t[] = {{"_p_comedi_t", 0, "comedi_t *", 0},{"_p_comedi_t"},{"_p_void"},{0}};
 
6071
static swig_type_info _swigt__p_int[] = {{"_p_int", 0, "int *", 0},{"_p_int"},{0}};
 
6072
static swig_type_info _swigt__p_comedi_cmd[] = {{"_p_comedi_cmd", 0, "comedi_cmd *", 0},{"_p_comedi_cmd"},{"_p_comedi_cmd_struct"},{0}};
 
6073
 
 
6074
static swig_type_info *swig_types_initial[] = {
 
6075
_swigt__p_lsampl_t, 
 
6076
_swigt__p_sampl_t, 
 
6077
_swigt__p_comedi_calibration_setting_t, 
 
6078
_swigt__p_double, 
 
6079
_swigt__p_comedi_range, 
 
6080
_swigt__p_unsigned_int, 
 
6081
_swigt__p_void, 
 
6082
_swigt__p_comedi_subdinfo_struct, 
 
6083
_swigt__p_comedi_krange_struct, 
 
6084
_swigt__p_comedi_rangeinfo_struct, 
 
6085
_swigt__p_comedi_chaninfo_struct, 
 
6086
_swigt__p_comedi_cmd_struct, 
 
6087
_swigt__p_comedi_insnlist_struct, 
 
6088
_swigt__p_comedi_insn_struct, 
 
6089
_swigt__p_comedi_trig_struct, 
 
6090
_swigt__p_comedi_devinfo_struct, 
 
6091
_swigt__p_char, 
 
6092
_swigt__p_comedi_devconfig_struct, 
 
6093
_swigt__p_comedi_bufconfig_struct, 
 
6094
_swigt__p_comedi_bufinfo_struct, 
 
6095
_swigt__p_comedi_calibration_t, 
 
6096
_swigt__p_comedi_sv_t, 
 
6097
_swigt__p_chanlist, 
 
6098
_swigt__p_comedi_insn, 
 
6099
_swigt__p_comedi_insnlist, 
 
6100
_swigt__p_comedi_caldac_t, 
 
6101
_swigt__p_comedi_t, 
 
6102
_swigt__p_int, 
 
6103
_swigt__p_comedi_cmd, 
 
6104
0
 
6105
};
 
6106
 
 
6107
 
 
6108
/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
 
6109
 
 
6110
 
 
6111
#ifdef __cplusplus
 
6112
extern "C"
 
6113
#endif
 
6114
SWIGEXPORT(void) Init_comedi(void) {
 
6115
    int i;
 
6116
    
 
6117
    SWIG_InitRuntime();
 
6118
    mComedi = rb_define_module("Comedi");
 
6119
    
 
6120
    for (i = 0; swig_types_initial[i]; i++) {
 
6121
        swig_types[i] = SWIG_TypeRegister(swig_types_initial[i]);
 
6122
        SWIG_define_class(swig_types[i]);
 
6123
    }
 
6124
    
 
6125
    rb_define_module_function(mComedi, "cr_pack", _wrap_cr_pack, -1);
 
6126
    rb_define_module_function(mComedi, "cr_pack_flags", _wrap_cr_pack_flags, -1);
 
6127
    rb_define_module_function(mComedi, "cr_chan", _wrap_cr_chan, -1);
 
6128
    rb_define_module_function(mComedi, "cr_range", _wrap_cr_range, -1);
 
6129
    rb_define_module_function(mComedi, "cr_aref", _wrap_cr_aref, -1);
 
6130
    
 
6131
    cChanlist.klass = rb_define_class_under(mComedi, "Chanlist", rb_cObject);
 
6132
    SWIG_TypeClientData(SWIGTYPE_p_chanlist, (void *) &cChanlist);
 
6133
    rb_define_alloc_func(cChanlist.klass, _wrap_chanlist_allocate);
 
6134
    rb_define_method(cChanlist.klass, "initialize", _wrap_new_chanlist, -1);
 
6135
    rb_define_method(cChanlist.klass, "[]", _wrap_chanlist___getitem__, -1);
 
6136
    rb_define_method(cChanlist.klass, "[]=", _wrap_chanlist___setitem__, -1);
 
6137
    rb_define_method(cChanlist.klass, "cast", _wrap_chanlist_cast, -1);
 
6138
    rb_define_singleton_method(cChanlist.klass, "frompointer", _wrap_chanlist_frompointer, -1);
 
6139
    cChanlist.mark = 0;
 
6140
    cChanlist.destroy = (void (*)(void *)) free_chanlist;
 
6141
    rb_define_const(mComedi,"CR_FLAGS_MASK", INT2NUM(0xfc000000));
 
6142
    rb_define_const(mComedi,"CR_ALT_FILTER", INT2NUM((1<<26)));
 
6143
    rb_define_const(mComedi,"CR_DITHER", INT2NUM((1<<26)));
 
6144
    rb_define_const(mComedi,"CR_DEGLITCH", INT2NUM((1<<26)));
 
6145
    rb_define_const(mComedi,"CR_ALT_SOURCE", INT2NUM((1<<27)));
 
6146
    rb_define_const(mComedi,"CR_EDGE", INT2NUM((1<<30)));
 
6147
    rb_define_const(mComedi,"CR_INVERT", INT2NUM((1<<31)));
 
6148
    rb_define_const(mComedi,"AREF_GROUND", INT2NUM(0x00));
 
6149
    rb_define_const(mComedi,"AREF_COMMON", INT2NUM(0x01));
 
6150
    rb_define_const(mComedi,"AREF_DIFF", INT2NUM(0x02));
 
6151
    rb_define_const(mComedi,"AREF_OTHER", INT2NUM(0x03));
 
6152
    rb_define_const(mComedi,"GPCT_RESET", INT2NUM(0x0001));
 
6153
    rb_define_const(mComedi,"GPCT_SET_SOURCE", INT2NUM(0x0002));
 
6154
    rb_define_const(mComedi,"GPCT_SET_GATE", INT2NUM(0x0004));
 
6155
    rb_define_const(mComedi,"GPCT_SET_DIRECTION", INT2NUM(0x0008));
 
6156
    rb_define_const(mComedi,"GPCT_SET_OPERATION", INT2NUM(0x0010));
 
6157
    rb_define_const(mComedi,"GPCT_ARM", INT2NUM(0x0020));
 
6158
    rb_define_const(mComedi,"GPCT_DISARM", INT2NUM(0x0040));
 
6159
    rb_define_const(mComedi,"GPCT_GET_INT_CLK_FRQ", INT2NUM(0x0080));
 
6160
    rb_define_const(mComedi,"GPCT_INT_CLOCK", INT2NUM(0x0001));
 
6161
    rb_define_const(mComedi,"GPCT_EXT_PIN", INT2NUM(0x0002));
 
6162
    rb_define_const(mComedi,"GPCT_NO_GATE", INT2NUM(0x0004));
 
6163
    rb_define_const(mComedi,"GPCT_UP", INT2NUM(0x0008));
 
6164
    rb_define_const(mComedi,"GPCT_DOWN", INT2NUM(0x0010));
 
6165
    rb_define_const(mComedi,"GPCT_HWUD", INT2NUM(0x0020));
 
6166
    rb_define_const(mComedi,"GPCT_SIMPLE_EVENT", INT2NUM(0x0040));
 
6167
    rb_define_const(mComedi,"GPCT_SINGLE_PERIOD", INT2NUM(0x0080));
 
6168
    rb_define_const(mComedi,"GPCT_SINGLE_PW", INT2NUM(0x0100));
 
6169
    rb_define_const(mComedi,"GPCT_CONT_PULSE_OUT", INT2NUM(0x0200));
 
6170
    rb_define_const(mComedi,"GPCT_SINGLE_PULSE_OUT", INT2NUM(0x0400));
 
6171
    rb_define_const(mComedi,"INSN_MASK_WRITE", INT2NUM(0x8000000));
 
6172
    rb_define_const(mComedi,"INSN_MASK_READ", INT2NUM(0x4000000));
 
6173
    rb_define_const(mComedi,"INSN_MASK_SPECIAL", INT2NUM(0x2000000));
 
6174
    rb_define_const(mComedi,"INSN_READ", INT2NUM((0|0x4000000)));
 
6175
    rb_define_const(mComedi,"INSN_WRITE", INT2NUM((1|0x8000000)));
 
6176
    rb_define_const(mComedi,"INSN_BITS", INT2NUM((2|0x4000000|0x8000000)));
 
6177
    rb_define_const(mComedi,"INSN_CONFIG", INT2NUM((3|0x4000000|0x8000000)));
 
6178
    rb_define_const(mComedi,"INSN_GTOD", INT2NUM((4|0x4000000|0x2000000)));
 
6179
    rb_define_const(mComedi,"INSN_WAIT", INT2NUM((5|0x8000000|0x2000000)));
 
6180
    rb_define_const(mComedi,"INSN_INTTRIG", INT2NUM((6|0x8000000|0x2000000)));
 
6181
    rb_define_const(mComedi,"TRIG_BOGUS", INT2NUM(0x0001));
 
6182
    rb_define_const(mComedi,"TRIG_DITHER", INT2NUM(0x0002));
 
6183
    rb_define_const(mComedi,"TRIG_DEGLITCH", INT2NUM(0x0004));
 
6184
    rb_define_const(mComedi,"TRIG_CONFIG", INT2NUM(0x0010));
 
6185
    rb_define_const(mComedi,"CMDF_PRIORITY", INT2NUM(0x00000008));
 
6186
    rb_define_const(mComedi,"TRIG_RT", INT2NUM(0x00000008));
 
6187
    rb_define_const(mComedi,"TRIG_WAKE_EOS", INT2NUM(0x00000020));
 
6188
    rb_define_const(mComedi,"CMDF_WRITE", INT2NUM(0x00000040));
 
6189
    rb_define_const(mComedi,"TRIG_WRITE", INT2NUM(0x00000040));
 
6190
    rb_define_const(mComedi,"CMDF_RAWDATA", INT2NUM(0x00000080));
 
6191
    rb_define_const(mComedi,"COMEDI_EV_START", INT2NUM(0x00040000));
 
6192
    rb_define_const(mComedi,"COMEDI_EV_SCAN_BEGIN", INT2NUM(0x00080000));
 
6193
    rb_define_const(mComedi,"COMEDI_EV_CONVERT", INT2NUM(0x00100000));
 
6194
    rb_define_const(mComedi,"COMEDI_EV_SCAN_END", INT2NUM(0x00200000));
 
6195
    rb_define_const(mComedi,"COMEDI_EV_STOP", INT2NUM(0x00400000));
 
6196
    rb_define_const(mComedi,"TRIG_ROUND_MASK", INT2NUM(0x00030000));
 
6197
    rb_define_const(mComedi,"TRIG_ROUND_NEAREST", INT2NUM(0x00000000));
 
6198
    rb_define_const(mComedi,"TRIG_ROUND_DOWN", INT2NUM(0x00010000));
 
6199
    rb_define_const(mComedi,"TRIG_ROUND_UP", INT2NUM(0x00020000));
 
6200
    rb_define_const(mComedi,"TRIG_ROUND_UP_NEXT", INT2NUM(0x00030000));
 
6201
    rb_define_const(mComedi,"TRIG_ANY", INT2NUM(0xffffffff));
 
6202
    rb_define_const(mComedi,"TRIG_INVALID", INT2NUM(0x00000000));
 
6203
    rb_define_const(mComedi,"TRIG_NONE", INT2NUM(0x00000001));
 
6204
    rb_define_const(mComedi,"TRIG_NOW", INT2NUM(0x00000002));
 
6205
    rb_define_const(mComedi,"TRIG_FOLLOW", INT2NUM(0x00000004));
 
6206
    rb_define_const(mComedi,"TRIG_TIME", INT2NUM(0x00000008));
 
6207
    rb_define_const(mComedi,"TRIG_TIMER", INT2NUM(0x00000010));
 
6208
    rb_define_const(mComedi,"TRIG_COUNT", INT2NUM(0x00000020));
 
6209
    rb_define_const(mComedi,"TRIG_EXT", INT2NUM(0x00000040));
 
6210
    rb_define_const(mComedi,"TRIG_INT", INT2NUM(0x00000080));
 
6211
    rb_define_const(mComedi,"TRIG_OTHER", INT2NUM(0x00000100));
 
6212
    rb_define_const(mComedi,"SDF_BUSY", INT2NUM(0x0001));
 
6213
    rb_define_const(mComedi,"SDF_BUSY_OWNER", INT2NUM(0x0002));
 
6214
    rb_define_const(mComedi,"SDF_LOCKED", INT2NUM(0x0004));
 
6215
    rb_define_const(mComedi,"SDF_LOCK_OWNER", INT2NUM(0x0008));
 
6216
    rb_define_const(mComedi,"SDF_MAXDATA", INT2NUM(0x0010));
 
6217
    rb_define_const(mComedi,"SDF_FLAGS", INT2NUM(0x0020));
 
6218
    rb_define_const(mComedi,"SDF_RANGETYPE", INT2NUM(0x0040));
 
6219
    rb_define_const(mComedi,"SDF_MODE0", INT2NUM(0x0080));
 
6220
    rb_define_const(mComedi,"SDF_MODE1", INT2NUM(0x0100));
 
6221
    rb_define_const(mComedi,"SDF_MODE2", INT2NUM(0x0200));
 
6222
    rb_define_const(mComedi,"SDF_MODE3", INT2NUM(0x0400));
 
6223
    rb_define_const(mComedi,"SDF_MODE4", INT2NUM(0x0800));
 
6224
    rb_define_const(mComedi,"SDF_CMD", INT2NUM(0x1000));
 
6225
    rb_define_const(mComedi,"SDF_READABLE", INT2NUM(0x00010000));
 
6226
    rb_define_const(mComedi,"SDF_WRITABLE", INT2NUM(0x00020000));
 
6227
    rb_define_const(mComedi,"SDF_WRITEABLE", INT2NUM(0x00020000));
 
6228
    rb_define_const(mComedi,"SDF_INTERNAL", INT2NUM(0x00040000));
 
6229
    rb_define_const(mComedi,"SDF_RT", INT2NUM(0x00080000));
 
6230
    rb_define_const(mComedi,"SDF_GROUND", INT2NUM(0x00100000));
 
6231
    rb_define_const(mComedi,"SDF_COMMON", INT2NUM(0x00200000));
 
6232
    rb_define_const(mComedi,"SDF_DIFF", INT2NUM(0x00400000));
 
6233
    rb_define_const(mComedi,"SDF_OTHER", INT2NUM(0x00800000));
 
6234
    rb_define_const(mComedi,"SDF_DITHER", INT2NUM(0x01000000));
 
6235
    rb_define_const(mComedi,"SDF_DEGLITCH", INT2NUM(0x02000000));
 
6236
    rb_define_const(mComedi,"SDF_MMAP", INT2NUM(0x04000000));
 
6237
    rb_define_const(mComedi,"SDF_RUNNING", INT2NUM(0x08000000));
 
6238
    rb_define_const(mComedi,"SDF_LSAMPL", INT2NUM(0x10000000));
 
6239
    rb_define_const(mComedi,"SDF_PACKED", INT2NUM(0x20000000));
 
6240
    rb_define_const(mComedi,"COMEDI_SUBD_UNUSED", INT2NUM(0));
 
6241
    rb_define_const(mComedi,"COMEDI_SUBD_AI", INT2NUM(1));
 
6242
    rb_define_const(mComedi,"COMEDI_SUBD_AO", INT2NUM(2));
 
6243
    rb_define_const(mComedi,"COMEDI_SUBD_DI", INT2NUM(3));
 
6244
    rb_define_const(mComedi,"COMEDI_SUBD_DO", INT2NUM(4));
 
6245
    rb_define_const(mComedi,"COMEDI_SUBD_DIO", INT2NUM(5));
 
6246
    rb_define_const(mComedi,"COMEDI_SUBD_COUNTER", INT2NUM(6));
 
6247
    rb_define_const(mComedi,"COMEDI_SUBD_TIMER", INT2NUM(7));
 
6248
    rb_define_const(mComedi,"COMEDI_SUBD_MEMORY", INT2NUM(8));
 
6249
    rb_define_const(mComedi,"COMEDI_SUBD_CALIB", INT2NUM(9));
 
6250
    rb_define_const(mComedi,"COMEDI_SUBD_PROC", INT2NUM(10));
 
6251
    rb_define_const(mComedi,"COMEDI_INPUT", INT2NUM(0));
 
6252
    rb_define_const(mComedi,"COMEDI_OUTPUT", INT2NUM(1));
 
6253
    rb_define_const(mComedi,"COMEDI_OPENDRAIN", INT2NUM(2));
 
6254
    rb_define_const(mComedi,"INSN_CONFIG_ANALOG_TRIG", INT2NUM(0x10));
 
6255
    rb_define_const(mComedi,"INSN_CONFIG_ALT_SOURCE", INT2NUM(0x14));
 
6256
    rb_define_const(mComedi,"INSN_CONFIG_DIGITAL_TRIG", INT2NUM(0x15));
 
6257
    rb_define_const(mComedi,"INSN_CONFIG_BLOCK_SIZE", INT2NUM(0x16));
 
6258
    rb_define_const(mComedi,"INSN_CONFIG_TIMER_1", INT2NUM(0x17));
 
6259
    rb_define_const(mComedi,"INSN_CONFIG_FILTER", INT2NUM(0x18));
 
6260
    rb_define_const(mComedi,"INSN_CONFIG_CHANGE_NOTIFY", INT2NUM(0x19));
 
6261
    
 
6262
    cComedi_trig_struct.klass = rb_define_class_under(mComedi, "Comedi_trig_struct", rb_cObject);
 
6263
    SWIG_TypeClientData(SWIGTYPE_p_comedi_trig_struct, (void *) &cComedi_trig_struct);
 
6264
    rb_define_alloc_func(cComedi_trig_struct.klass, _wrap_comedi_trig_struct_allocate);
 
6265
    rb_define_method(cComedi_trig_struct.klass, "initialize", _wrap_new_comedi_trig_struct, -1);
 
6266
    rb_define_method(cComedi_trig_struct.klass, "subdev=", _wrap_comedi_trig_struct_subdev_set, -1);
 
6267
    rb_define_method(cComedi_trig_struct.klass, "subdev", _wrap_comedi_trig_struct_subdev_get, -1);
 
6268
    rb_define_method(cComedi_trig_struct.klass, "mode=", _wrap_comedi_trig_struct_mode_set, -1);
 
6269
    rb_define_method(cComedi_trig_struct.klass, "mode", _wrap_comedi_trig_struct_mode_get, -1);
 
6270
    rb_define_method(cComedi_trig_struct.klass, "flags=", _wrap_comedi_trig_struct_flags_set, -1);
 
6271
    rb_define_method(cComedi_trig_struct.klass, "flags", _wrap_comedi_trig_struct_flags_get, -1);
 
6272
    rb_define_method(cComedi_trig_struct.klass, "n_chan=", _wrap_comedi_trig_struct_n_chan_set, -1);
 
6273
    rb_define_method(cComedi_trig_struct.klass, "n_chan", _wrap_comedi_trig_struct_n_chan_get, -1);
 
6274
    rb_define_method(cComedi_trig_struct.klass, "chanlist=", _wrap_comedi_trig_struct_chanlist_set, -1);
 
6275
    rb_define_method(cComedi_trig_struct.klass, "chanlist", _wrap_comedi_trig_struct_chanlist_get, -1);
 
6276
    rb_define_method(cComedi_trig_struct.klass, "data=", _wrap_comedi_trig_struct_data_set, -1);
 
6277
    rb_define_method(cComedi_trig_struct.klass, "data", _wrap_comedi_trig_struct_data_get, -1);
 
6278
    rb_define_method(cComedi_trig_struct.klass, "n=", _wrap_comedi_trig_struct_n_set, -1);
 
6279
    rb_define_method(cComedi_trig_struct.klass, "n", _wrap_comedi_trig_struct_n_get, -1);
 
6280
    rb_define_method(cComedi_trig_struct.klass, "trigsrc=", _wrap_comedi_trig_struct_trigsrc_set, -1);
 
6281
    rb_define_method(cComedi_trig_struct.klass, "trigsrc", _wrap_comedi_trig_struct_trigsrc_get, -1);
 
6282
    rb_define_method(cComedi_trig_struct.klass, "trigvar=", _wrap_comedi_trig_struct_trigvar_set, -1);
 
6283
    rb_define_method(cComedi_trig_struct.klass, "trigvar", _wrap_comedi_trig_struct_trigvar_get, -1);
 
6284
    rb_define_method(cComedi_trig_struct.klass, "trigvar1=", _wrap_comedi_trig_struct_trigvar1_set, -1);
 
6285
    rb_define_method(cComedi_trig_struct.klass, "trigvar1", _wrap_comedi_trig_struct_trigvar1_get, -1);
 
6286
    rb_define_method(cComedi_trig_struct.klass, "data_len=", _wrap_comedi_trig_struct_data_len_set, -1);
 
6287
    rb_define_method(cComedi_trig_struct.klass, "data_len", _wrap_comedi_trig_struct_data_len_get, -1);
 
6288
    rb_define_method(cComedi_trig_struct.klass, "unused=", _wrap_comedi_trig_struct_unused_set, -1);
 
6289
    rb_define_method(cComedi_trig_struct.klass, "unused", _wrap_comedi_trig_struct_unused_get, -1);
 
6290
    cComedi_trig_struct.mark = 0;
 
6291
    cComedi_trig_struct.destroy = (void (*)(void *)) free_comedi_trig_struct;
 
6292
    
 
6293
    cComedi_insn_struct.klass = rb_define_class_under(mComedi, "Comedi_insn_struct", rb_cObject);
 
6294
    SWIG_TypeClientData(SWIGTYPE_p_comedi_insn_struct, (void *) &cComedi_insn_struct);
 
6295
    rb_define_alloc_func(cComedi_insn_struct.klass, _wrap_comedi_insn_struct_allocate);
 
6296
    rb_define_method(cComedi_insn_struct.klass, "initialize", _wrap_new_comedi_insn_struct, -1);
 
6297
    rb_define_method(cComedi_insn_struct.klass, "insn=", _wrap_comedi_insn_struct_insn_set, -1);
 
6298
    rb_define_method(cComedi_insn_struct.klass, "insn", _wrap_comedi_insn_struct_insn_get, -1);
 
6299
    rb_define_method(cComedi_insn_struct.klass, "n=", _wrap_comedi_insn_struct_n_set, -1);
 
6300
    rb_define_method(cComedi_insn_struct.klass, "n", _wrap_comedi_insn_struct_n_get, -1);
 
6301
    rb_define_method(cComedi_insn_struct.klass, "data=", _wrap_comedi_insn_struct_data_set, -1);
 
6302
    rb_define_method(cComedi_insn_struct.klass, "data", _wrap_comedi_insn_struct_data_get, -1);
 
6303
    rb_define_method(cComedi_insn_struct.klass, "subdev=", _wrap_comedi_insn_struct_subdev_set, -1);
 
6304
    rb_define_method(cComedi_insn_struct.klass, "subdev", _wrap_comedi_insn_struct_subdev_get, -1);
 
6305
    rb_define_method(cComedi_insn_struct.klass, "chanspec=", _wrap_comedi_insn_struct_chanspec_set, -1);
 
6306
    rb_define_method(cComedi_insn_struct.klass, "chanspec", _wrap_comedi_insn_struct_chanspec_get, -1);
 
6307
    rb_define_method(cComedi_insn_struct.klass, "unused=", _wrap_comedi_insn_struct_unused_set, -1);
 
6308
    rb_define_method(cComedi_insn_struct.klass, "unused", _wrap_comedi_insn_struct_unused_get, -1);
 
6309
    cComedi_insn_struct.mark = 0;
 
6310
    cComedi_insn_struct.destroy = (void (*)(void *)) free_comedi_insn_struct;
 
6311
    
 
6312
    cComedi_insnlist_struct.klass = rb_define_class_under(mComedi, "Comedi_insnlist_struct", rb_cObject);
 
6313
    SWIG_TypeClientData(SWIGTYPE_p_comedi_insnlist_struct, (void *) &cComedi_insnlist_struct);
 
6314
    rb_define_alloc_func(cComedi_insnlist_struct.klass, _wrap_comedi_insnlist_struct_allocate);
 
6315
    rb_define_method(cComedi_insnlist_struct.klass, "initialize", _wrap_new_comedi_insnlist_struct, -1);
 
6316
    rb_define_method(cComedi_insnlist_struct.klass, "n_insns=", _wrap_comedi_insnlist_struct_n_insns_set, -1);
 
6317
    rb_define_method(cComedi_insnlist_struct.klass, "n_insns", _wrap_comedi_insnlist_struct_n_insns_get, -1);
 
6318
    rb_define_method(cComedi_insnlist_struct.klass, "insns=", _wrap_comedi_insnlist_struct_insns_set, -1);
 
6319
    rb_define_method(cComedi_insnlist_struct.klass, "insns", _wrap_comedi_insnlist_struct_insns_get, -1);
 
6320
    cComedi_insnlist_struct.mark = 0;
 
6321
    cComedi_insnlist_struct.destroy = (void (*)(void *)) free_comedi_insnlist_struct;
 
6322
    
 
6323
    cComedi_cmd_struct.klass = rb_define_class_under(mComedi, "Comedi_cmd_struct", rb_cObject);
 
6324
    SWIG_TypeClientData(SWIGTYPE_p_comedi_cmd_struct, (void *) &cComedi_cmd_struct);
 
6325
    rb_define_alloc_func(cComedi_cmd_struct.klass, _wrap_comedi_cmd_struct_allocate);
 
6326
    rb_define_method(cComedi_cmd_struct.klass, "initialize", _wrap_new_comedi_cmd_struct, -1);
 
6327
    rb_define_method(cComedi_cmd_struct.klass, "subdev=", _wrap_comedi_cmd_struct_subdev_set, -1);
 
6328
    rb_define_method(cComedi_cmd_struct.klass, "subdev", _wrap_comedi_cmd_struct_subdev_get, -1);
 
6329
    rb_define_method(cComedi_cmd_struct.klass, "flags=", _wrap_comedi_cmd_struct_flags_set, -1);
 
6330
    rb_define_method(cComedi_cmd_struct.klass, "flags", _wrap_comedi_cmd_struct_flags_get, -1);
 
6331
    rb_define_method(cComedi_cmd_struct.klass, "start_src=", _wrap_comedi_cmd_struct_start_src_set, -1);
 
6332
    rb_define_method(cComedi_cmd_struct.klass, "start_src", _wrap_comedi_cmd_struct_start_src_get, -1);
 
6333
    rb_define_method(cComedi_cmd_struct.klass, "start_arg=", _wrap_comedi_cmd_struct_start_arg_set, -1);
 
6334
    rb_define_method(cComedi_cmd_struct.klass, "start_arg", _wrap_comedi_cmd_struct_start_arg_get, -1);
 
6335
    rb_define_method(cComedi_cmd_struct.klass, "scan_begin_src=", _wrap_comedi_cmd_struct_scan_begin_src_set, -1);
 
6336
    rb_define_method(cComedi_cmd_struct.klass, "scan_begin_src", _wrap_comedi_cmd_struct_scan_begin_src_get, -1);
 
6337
    rb_define_method(cComedi_cmd_struct.klass, "scan_begin_arg=", _wrap_comedi_cmd_struct_scan_begin_arg_set, -1);
 
6338
    rb_define_method(cComedi_cmd_struct.klass, "scan_begin_arg", _wrap_comedi_cmd_struct_scan_begin_arg_get, -1);
 
6339
    rb_define_method(cComedi_cmd_struct.klass, "convert_src=", _wrap_comedi_cmd_struct_convert_src_set, -1);
 
6340
    rb_define_method(cComedi_cmd_struct.klass, "convert_src", _wrap_comedi_cmd_struct_convert_src_get, -1);
 
6341
    rb_define_method(cComedi_cmd_struct.klass, "convert_arg=", _wrap_comedi_cmd_struct_convert_arg_set, -1);
 
6342
    rb_define_method(cComedi_cmd_struct.klass, "convert_arg", _wrap_comedi_cmd_struct_convert_arg_get, -1);
 
6343
    rb_define_method(cComedi_cmd_struct.klass, "scan_end_src=", _wrap_comedi_cmd_struct_scan_end_src_set, -1);
 
6344
    rb_define_method(cComedi_cmd_struct.klass, "scan_end_src", _wrap_comedi_cmd_struct_scan_end_src_get, -1);
 
6345
    rb_define_method(cComedi_cmd_struct.klass, "scan_end_arg=", _wrap_comedi_cmd_struct_scan_end_arg_set, -1);
 
6346
    rb_define_method(cComedi_cmd_struct.klass, "scan_end_arg", _wrap_comedi_cmd_struct_scan_end_arg_get, -1);
 
6347
    rb_define_method(cComedi_cmd_struct.klass, "stop_src=", _wrap_comedi_cmd_struct_stop_src_set, -1);
 
6348
    rb_define_method(cComedi_cmd_struct.klass, "stop_src", _wrap_comedi_cmd_struct_stop_src_get, -1);
 
6349
    rb_define_method(cComedi_cmd_struct.klass, "stop_arg=", _wrap_comedi_cmd_struct_stop_arg_set, -1);
 
6350
    rb_define_method(cComedi_cmd_struct.klass, "stop_arg", _wrap_comedi_cmd_struct_stop_arg_get, -1);
 
6351
    rb_define_method(cComedi_cmd_struct.klass, "chanlist=", _wrap_comedi_cmd_struct_chanlist_set, -1);
 
6352
    rb_define_method(cComedi_cmd_struct.klass, "chanlist", _wrap_comedi_cmd_struct_chanlist_get, -1);
 
6353
    rb_define_method(cComedi_cmd_struct.klass, "chanlist_len=", _wrap_comedi_cmd_struct_chanlist_len_set, -1);
 
6354
    rb_define_method(cComedi_cmd_struct.klass, "chanlist_len", _wrap_comedi_cmd_struct_chanlist_len_get, -1);
 
6355
    rb_define_method(cComedi_cmd_struct.klass, "data=", _wrap_comedi_cmd_struct_data_set, -1);
 
6356
    rb_define_method(cComedi_cmd_struct.klass, "data", _wrap_comedi_cmd_struct_data_get, -1);
 
6357
    rb_define_method(cComedi_cmd_struct.klass, "data_len=", _wrap_comedi_cmd_struct_data_len_set, -1);
 
6358
    rb_define_method(cComedi_cmd_struct.klass, "data_len", _wrap_comedi_cmd_struct_data_len_get, -1);
 
6359
    cComedi_cmd_struct.mark = 0;
 
6360
    cComedi_cmd_struct.destroy = (void (*)(void *)) free_comedi_cmd_struct;
 
6361
    
 
6362
    cComedi_chaninfo_struct.klass = rb_define_class_under(mComedi, "Comedi_chaninfo_struct", rb_cObject);
 
6363
    SWIG_TypeClientData(SWIGTYPE_p_comedi_chaninfo_struct, (void *) &cComedi_chaninfo_struct);
 
6364
    rb_define_alloc_func(cComedi_chaninfo_struct.klass, _wrap_comedi_chaninfo_struct_allocate);
 
6365
    rb_define_method(cComedi_chaninfo_struct.klass, "initialize", _wrap_new_comedi_chaninfo_struct, -1);
 
6366
    rb_define_method(cComedi_chaninfo_struct.klass, "subdev=", _wrap_comedi_chaninfo_struct_subdev_set, -1);
 
6367
    rb_define_method(cComedi_chaninfo_struct.klass, "subdev", _wrap_comedi_chaninfo_struct_subdev_get, -1);
 
6368
    rb_define_method(cComedi_chaninfo_struct.klass, "maxdata_list=", _wrap_comedi_chaninfo_struct_maxdata_list_set, -1);
 
6369
    rb_define_method(cComedi_chaninfo_struct.klass, "maxdata_list", _wrap_comedi_chaninfo_struct_maxdata_list_get, -1);
 
6370
    rb_define_method(cComedi_chaninfo_struct.klass, "flaglist=", _wrap_comedi_chaninfo_struct_flaglist_set, -1);
 
6371
    rb_define_method(cComedi_chaninfo_struct.klass, "flaglist", _wrap_comedi_chaninfo_struct_flaglist_get, -1);
 
6372
    rb_define_method(cComedi_chaninfo_struct.klass, "rangelist=", _wrap_comedi_chaninfo_struct_rangelist_set, -1);
 
6373
    rb_define_method(cComedi_chaninfo_struct.klass, "rangelist", _wrap_comedi_chaninfo_struct_rangelist_get, -1);
 
6374
    rb_define_method(cComedi_chaninfo_struct.klass, "unused=", _wrap_comedi_chaninfo_struct_unused_set, -1);
 
6375
    rb_define_method(cComedi_chaninfo_struct.klass, "unused", _wrap_comedi_chaninfo_struct_unused_get, -1);
 
6376
    cComedi_chaninfo_struct.mark = 0;
 
6377
    cComedi_chaninfo_struct.destroy = (void (*)(void *)) free_comedi_chaninfo_struct;
 
6378
    
 
6379
    cComedi_rangeinfo_struct.klass = rb_define_class_under(mComedi, "Comedi_rangeinfo_struct", rb_cObject);
 
6380
    SWIG_TypeClientData(SWIGTYPE_p_comedi_rangeinfo_struct, (void *) &cComedi_rangeinfo_struct);
 
6381
    rb_define_alloc_func(cComedi_rangeinfo_struct.klass, _wrap_comedi_rangeinfo_struct_allocate);
 
6382
    rb_define_method(cComedi_rangeinfo_struct.klass, "initialize", _wrap_new_comedi_rangeinfo_struct, -1);
 
6383
    rb_define_method(cComedi_rangeinfo_struct.klass, "range_type=", _wrap_comedi_rangeinfo_struct_range_type_set, -1);
 
6384
    rb_define_method(cComedi_rangeinfo_struct.klass, "range_type", _wrap_comedi_rangeinfo_struct_range_type_get, -1);
 
6385
    rb_define_method(cComedi_rangeinfo_struct.klass, "range_ptr=", _wrap_comedi_rangeinfo_struct_range_ptr_set, -1);
 
6386
    rb_define_method(cComedi_rangeinfo_struct.klass, "range_ptr", _wrap_comedi_rangeinfo_struct_range_ptr_get, -1);
 
6387
    cComedi_rangeinfo_struct.mark = 0;
 
6388
    cComedi_rangeinfo_struct.destroy = (void (*)(void *)) free_comedi_rangeinfo_struct;
 
6389
    
 
6390
    cComedi_krange_struct.klass = rb_define_class_under(mComedi, "Comedi_krange_struct", rb_cObject);
 
6391
    SWIG_TypeClientData(SWIGTYPE_p_comedi_krange_struct, (void *) &cComedi_krange_struct);
 
6392
    rb_define_alloc_func(cComedi_krange_struct.klass, _wrap_comedi_krange_struct_allocate);
 
6393
    rb_define_method(cComedi_krange_struct.klass, "initialize", _wrap_new_comedi_krange_struct, -1);
 
6394
    rb_define_method(cComedi_krange_struct.klass, "min=", _wrap_comedi_krange_struct_min_set, -1);
 
6395
    rb_define_method(cComedi_krange_struct.klass, "min", _wrap_comedi_krange_struct_min_get, -1);
 
6396
    rb_define_method(cComedi_krange_struct.klass, "max=", _wrap_comedi_krange_struct_max_set, -1);
 
6397
    rb_define_method(cComedi_krange_struct.klass, "max", _wrap_comedi_krange_struct_max_get, -1);
 
6398
    rb_define_method(cComedi_krange_struct.klass, "flags=", _wrap_comedi_krange_struct_flags_set, -1);
 
6399
    rb_define_method(cComedi_krange_struct.klass, "flags", _wrap_comedi_krange_struct_flags_get, -1);
 
6400
    cComedi_krange_struct.mark = 0;
 
6401
    cComedi_krange_struct.destroy = (void (*)(void *)) free_comedi_krange_struct;
 
6402
    
 
6403
    cComedi_subdinfo_struct.klass = rb_define_class_under(mComedi, "Comedi_subdinfo_struct", rb_cObject);
 
6404
    SWIG_TypeClientData(SWIGTYPE_p_comedi_subdinfo_struct, (void *) &cComedi_subdinfo_struct);
 
6405
    rb_define_alloc_func(cComedi_subdinfo_struct.klass, _wrap_comedi_subdinfo_struct_allocate);
 
6406
    rb_define_method(cComedi_subdinfo_struct.klass, "initialize", _wrap_new_comedi_subdinfo_struct, -1);
 
6407
    rb_define_method(cComedi_subdinfo_struct.klass, "type=", _wrap_comedi_subdinfo_struct_type_set, -1);
 
6408
    rb_define_method(cComedi_subdinfo_struct.klass, "type", _wrap_comedi_subdinfo_struct_type_get, -1);
 
6409
    rb_define_method(cComedi_subdinfo_struct.klass, "n_chan=", _wrap_comedi_subdinfo_struct_n_chan_set, -1);
 
6410
    rb_define_method(cComedi_subdinfo_struct.klass, "n_chan", _wrap_comedi_subdinfo_struct_n_chan_get, -1);
 
6411
    rb_define_method(cComedi_subdinfo_struct.klass, "subd_flags=", _wrap_comedi_subdinfo_struct_subd_flags_set, -1);
 
6412
    rb_define_method(cComedi_subdinfo_struct.klass, "subd_flags", _wrap_comedi_subdinfo_struct_subd_flags_get, -1);
 
6413
    rb_define_method(cComedi_subdinfo_struct.klass, "timer_type=", _wrap_comedi_subdinfo_struct_timer_type_set, -1);
 
6414
    rb_define_method(cComedi_subdinfo_struct.klass, "timer_type", _wrap_comedi_subdinfo_struct_timer_type_get, -1);
 
6415
    rb_define_method(cComedi_subdinfo_struct.klass, "len_chanlist=", _wrap_comedi_subdinfo_struct_len_chanlist_set, -1);
 
6416
    rb_define_method(cComedi_subdinfo_struct.klass, "len_chanlist", _wrap_comedi_subdinfo_struct_len_chanlist_get, -1);
 
6417
    rb_define_method(cComedi_subdinfo_struct.klass, "maxdata=", _wrap_comedi_subdinfo_struct_maxdata_set, -1);
 
6418
    rb_define_method(cComedi_subdinfo_struct.klass, "maxdata", _wrap_comedi_subdinfo_struct_maxdata_get, -1);
 
6419
    rb_define_method(cComedi_subdinfo_struct.klass, "flags=", _wrap_comedi_subdinfo_struct_flags_set, -1);
 
6420
    rb_define_method(cComedi_subdinfo_struct.klass, "flags", _wrap_comedi_subdinfo_struct_flags_get, -1);
 
6421
    rb_define_method(cComedi_subdinfo_struct.klass, "range_type=", _wrap_comedi_subdinfo_struct_range_type_set, -1);
 
6422
    rb_define_method(cComedi_subdinfo_struct.klass, "range_type", _wrap_comedi_subdinfo_struct_range_type_get, -1);
 
6423
    rb_define_method(cComedi_subdinfo_struct.klass, "settling_time_0=", _wrap_comedi_subdinfo_struct_settling_time_0_set, -1);
 
6424
    rb_define_method(cComedi_subdinfo_struct.klass, "settling_time_0", _wrap_comedi_subdinfo_struct_settling_time_0_get, -1);
 
6425
    rb_define_method(cComedi_subdinfo_struct.klass, "unused=", _wrap_comedi_subdinfo_struct_unused_set, -1);
 
6426
    rb_define_method(cComedi_subdinfo_struct.klass, "unused", _wrap_comedi_subdinfo_struct_unused_get, -1);
 
6427
    cComedi_subdinfo_struct.mark = 0;
 
6428
    cComedi_subdinfo_struct.destroy = (void (*)(void *)) free_comedi_subdinfo_struct;
 
6429
    
 
6430
    cComedi_devinfo_struct.klass = rb_define_class_under(mComedi, "Comedi_devinfo_struct", rb_cObject);
 
6431
    SWIG_TypeClientData(SWIGTYPE_p_comedi_devinfo_struct, (void *) &cComedi_devinfo_struct);
 
6432
    rb_define_alloc_func(cComedi_devinfo_struct.klass, _wrap_comedi_devinfo_struct_allocate);
 
6433
    rb_define_method(cComedi_devinfo_struct.klass, "initialize", _wrap_new_comedi_devinfo_struct, -1);
 
6434
    rb_define_method(cComedi_devinfo_struct.klass, "version_code=", _wrap_comedi_devinfo_struct_version_code_set, -1);
 
6435
    rb_define_method(cComedi_devinfo_struct.klass, "version_code", _wrap_comedi_devinfo_struct_version_code_get, -1);
 
6436
    rb_define_method(cComedi_devinfo_struct.klass, "n_subdevs=", _wrap_comedi_devinfo_struct_n_subdevs_set, -1);
 
6437
    rb_define_method(cComedi_devinfo_struct.klass, "n_subdevs", _wrap_comedi_devinfo_struct_n_subdevs_get, -1);
 
6438
    rb_define_method(cComedi_devinfo_struct.klass, "driver_name=", _wrap_comedi_devinfo_struct_driver_name_set, -1);
 
6439
    rb_define_method(cComedi_devinfo_struct.klass, "driver_name", _wrap_comedi_devinfo_struct_driver_name_get, -1);
 
6440
    rb_define_method(cComedi_devinfo_struct.klass, "board_name=", _wrap_comedi_devinfo_struct_board_name_set, -1);
 
6441
    rb_define_method(cComedi_devinfo_struct.klass, "board_name", _wrap_comedi_devinfo_struct_board_name_get, -1);
 
6442
    rb_define_method(cComedi_devinfo_struct.klass, "read_subdevice=", _wrap_comedi_devinfo_struct_read_subdevice_set, -1);
 
6443
    rb_define_method(cComedi_devinfo_struct.klass, "read_subdevice", _wrap_comedi_devinfo_struct_read_subdevice_get, -1);
 
6444
    rb_define_method(cComedi_devinfo_struct.klass, "write_subdevice=", _wrap_comedi_devinfo_struct_write_subdevice_set, -1);
 
6445
    rb_define_method(cComedi_devinfo_struct.klass, "write_subdevice", _wrap_comedi_devinfo_struct_write_subdevice_get, -1);
 
6446
    rb_define_method(cComedi_devinfo_struct.klass, "unused=", _wrap_comedi_devinfo_struct_unused_set, -1);
 
6447
    rb_define_method(cComedi_devinfo_struct.klass, "unused", _wrap_comedi_devinfo_struct_unused_get, -1);
 
6448
    cComedi_devinfo_struct.mark = 0;
 
6449
    cComedi_devinfo_struct.destroy = (void (*)(void *)) free_comedi_devinfo_struct;
 
6450
    
 
6451
    cComedi_devconfig_struct.klass = rb_define_class_under(mComedi, "Comedi_devconfig_struct", rb_cObject);
 
6452
    SWIG_TypeClientData(SWIGTYPE_p_comedi_devconfig_struct, (void *) &cComedi_devconfig_struct);
 
6453
    rb_define_alloc_func(cComedi_devconfig_struct.klass, _wrap_comedi_devconfig_struct_allocate);
 
6454
    rb_define_method(cComedi_devconfig_struct.klass, "initialize", _wrap_new_comedi_devconfig_struct, -1);
 
6455
    rb_define_method(cComedi_devconfig_struct.klass, "board_name=", _wrap_comedi_devconfig_struct_board_name_set, -1);
 
6456
    rb_define_method(cComedi_devconfig_struct.klass, "board_name", _wrap_comedi_devconfig_struct_board_name_get, -1);
 
6457
    rb_define_method(cComedi_devconfig_struct.klass, "options=", _wrap_comedi_devconfig_struct_options_set, -1);
 
6458
    rb_define_method(cComedi_devconfig_struct.klass, "options", _wrap_comedi_devconfig_struct_options_get, -1);
 
6459
    cComedi_devconfig_struct.mark = 0;
 
6460
    cComedi_devconfig_struct.destroy = (void (*)(void *)) free_comedi_devconfig_struct;
 
6461
    
 
6462
    cComedi_bufconfig_struct.klass = rb_define_class_under(mComedi, "Comedi_bufconfig_struct", rb_cObject);
 
6463
    SWIG_TypeClientData(SWIGTYPE_p_comedi_bufconfig_struct, (void *) &cComedi_bufconfig_struct);
 
6464
    rb_define_alloc_func(cComedi_bufconfig_struct.klass, _wrap_comedi_bufconfig_struct_allocate);
 
6465
    rb_define_method(cComedi_bufconfig_struct.klass, "initialize", _wrap_new_comedi_bufconfig_struct, -1);
 
6466
    rb_define_method(cComedi_bufconfig_struct.klass, "subdevice=", _wrap_comedi_bufconfig_struct_subdevice_set, -1);
 
6467
    rb_define_method(cComedi_bufconfig_struct.klass, "subdevice", _wrap_comedi_bufconfig_struct_subdevice_get, -1);
 
6468
    rb_define_method(cComedi_bufconfig_struct.klass, "flags=", _wrap_comedi_bufconfig_struct_flags_set, -1);
 
6469
    rb_define_method(cComedi_bufconfig_struct.klass, "flags", _wrap_comedi_bufconfig_struct_flags_get, -1);
 
6470
    rb_define_method(cComedi_bufconfig_struct.klass, "maximum_size=", _wrap_comedi_bufconfig_struct_maximum_size_set, -1);
 
6471
    rb_define_method(cComedi_bufconfig_struct.klass, "maximum_size", _wrap_comedi_bufconfig_struct_maximum_size_get, -1);
 
6472
    rb_define_method(cComedi_bufconfig_struct.klass, "size=", _wrap_comedi_bufconfig_struct_size_set, -1);
 
6473
    rb_define_method(cComedi_bufconfig_struct.klass, "size", _wrap_comedi_bufconfig_struct_size_get, -1);
 
6474
    rb_define_method(cComedi_bufconfig_struct.klass, "unused=", _wrap_comedi_bufconfig_struct_unused_set, -1);
 
6475
    rb_define_method(cComedi_bufconfig_struct.klass, "unused", _wrap_comedi_bufconfig_struct_unused_get, -1);
 
6476
    cComedi_bufconfig_struct.mark = 0;
 
6477
    cComedi_bufconfig_struct.destroy = (void (*)(void *)) free_comedi_bufconfig_struct;
 
6478
    
 
6479
    cComedi_bufinfo_struct.klass = rb_define_class_under(mComedi, "Comedi_bufinfo_struct", rb_cObject);
 
6480
    SWIG_TypeClientData(SWIGTYPE_p_comedi_bufinfo_struct, (void *) &cComedi_bufinfo_struct);
 
6481
    rb_define_alloc_func(cComedi_bufinfo_struct.klass, _wrap_comedi_bufinfo_struct_allocate);
 
6482
    rb_define_method(cComedi_bufinfo_struct.klass, "initialize", _wrap_new_comedi_bufinfo_struct, -1);
 
6483
    rb_define_method(cComedi_bufinfo_struct.klass, "subdevice=", _wrap_comedi_bufinfo_struct_subdevice_set, -1);
 
6484
    rb_define_method(cComedi_bufinfo_struct.klass, "subdevice", _wrap_comedi_bufinfo_struct_subdevice_get, -1);
 
6485
    rb_define_method(cComedi_bufinfo_struct.klass, "bytes_read=", _wrap_comedi_bufinfo_struct_bytes_read_set, -1);
 
6486
    rb_define_method(cComedi_bufinfo_struct.klass, "bytes_read", _wrap_comedi_bufinfo_struct_bytes_read_get, -1);
 
6487
    rb_define_method(cComedi_bufinfo_struct.klass, "buf_int_ptr=", _wrap_comedi_bufinfo_struct_buf_int_ptr_set, -1);
 
6488
    rb_define_method(cComedi_bufinfo_struct.klass, "buf_int_ptr", _wrap_comedi_bufinfo_struct_buf_int_ptr_get, -1);
 
6489
    rb_define_method(cComedi_bufinfo_struct.klass, "buf_user_ptr=", _wrap_comedi_bufinfo_struct_buf_user_ptr_set, -1);
 
6490
    rb_define_method(cComedi_bufinfo_struct.klass, "buf_user_ptr", _wrap_comedi_bufinfo_struct_buf_user_ptr_get, -1);
 
6491
    rb_define_method(cComedi_bufinfo_struct.klass, "buf_int_count=", _wrap_comedi_bufinfo_struct_buf_int_count_set, -1);
 
6492
    rb_define_method(cComedi_bufinfo_struct.klass, "buf_int_count", _wrap_comedi_bufinfo_struct_buf_int_count_get, -1);
 
6493
    rb_define_method(cComedi_bufinfo_struct.klass, "buf_user_count=", _wrap_comedi_bufinfo_struct_buf_user_count_set, -1);
 
6494
    rb_define_method(cComedi_bufinfo_struct.klass, "buf_user_count", _wrap_comedi_bufinfo_struct_buf_user_count_get, -1);
 
6495
    rb_define_method(cComedi_bufinfo_struct.klass, "bytes_written=", _wrap_comedi_bufinfo_struct_bytes_written_set, -1);
 
6496
    rb_define_method(cComedi_bufinfo_struct.klass, "bytes_written", _wrap_comedi_bufinfo_struct_bytes_written_get, -1);
 
6497
    rb_define_method(cComedi_bufinfo_struct.klass, "unused=", _wrap_comedi_bufinfo_struct_unused_set, -1);
 
6498
    rb_define_method(cComedi_bufinfo_struct.klass, "unused", _wrap_comedi_bufinfo_struct_unused_get, -1);
 
6499
    cComedi_bufinfo_struct.mark = 0;
 
6500
    cComedi_bufinfo_struct.destroy = (void (*)(void *)) free_comedi_bufinfo_struct;
 
6501
    rb_define_const(mComedi,"RF_EXTERNAL", INT2NUM((1<<8)));
 
6502
    rb_define_const(mComedi,"UNIT_volt", INT2NUM(0));
 
6503
    rb_define_const(mComedi,"UNIT_mA", INT2NUM(1));
 
6504
    rb_define_const(mComedi,"UNIT_none", INT2NUM(2));
 
6505
    rb_define_const(mComedi,"COMEDI_CB_EOS", INT2NUM(1));
 
6506
    rb_define_const(mComedi,"COMEDI_CB_EOA", INT2NUM(2));
 
6507
    rb_define_const(mComedi,"COMEDI_CB_BLOCK", INT2NUM(4));
 
6508
    rb_define_const(mComedi,"COMEDI_CB_EOBUF", INT2NUM(8));
 
6509
    rb_define_const(mComedi,"COMEDI_CB_ERROR", INT2NUM(16));
 
6510
    rb_define_const(mComedi,"COMEDI_CB_OVERFLOW", INT2NUM(32));
 
6511
    
 
6512
    cComedi_range.klass = rb_define_class_under(mComedi, "Comedi_range", rb_cObject);
 
6513
    SWIG_TypeClientData(SWIGTYPE_p_comedi_range, (void *) &cComedi_range);
 
6514
    rb_define_alloc_func(cComedi_range.klass, _wrap_comedi_range_allocate);
 
6515
    rb_define_method(cComedi_range.klass, "initialize", _wrap_new_comedi_range, -1);
 
6516
    rb_define_method(cComedi_range.klass, "min=", _wrap_comedi_range_min_set, -1);
 
6517
    rb_define_method(cComedi_range.klass, "min", _wrap_comedi_range_min_get, -1);
 
6518
    rb_define_method(cComedi_range.klass, "max=", _wrap_comedi_range_max_set, -1);
 
6519
    rb_define_method(cComedi_range.klass, "max", _wrap_comedi_range_max_get, -1);
 
6520
    rb_define_method(cComedi_range.klass, "unit=", _wrap_comedi_range_unit_set, -1);
 
6521
    rb_define_method(cComedi_range.klass, "unit", _wrap_comedi_range_unit_get, -1);
 
6522
    cComedi_range.mark = 0;
 
6523
    cComedi_range.destroy = (void (*)(void *)) free_comedi_range;
 
6524
    
 
6525
    cComedi_sv_t.klass = rb_define_class_under(mComedi, "Comedi_sv_t", rb_cObject);
 
6526
    SWIG_TypeClientData(SWIGTYPE_p_comedi_sv_t, (void *) &cComedi_sv_t);
 
6527
    rb_define_alloc_func(cComedi_sv_t.klass, _wrap_comedi_sv_t_allocate);
 
6528
    rb_define_method(cComedi_sv_t.klass, "initialize", _wrap_new_comedi_sv_t, -1);
 
6529
    rb_define_method(cComedi_sv_t.klass, "dev=", _wrap_comedi_sv_t_dev_set, -1);
 
6530
    rb_define_method(cComedi_sv_t.klass, "dev", _wrap_comedi_sv_t_dev_get, -1);
 
6531
    rb_define_method(cComedi_sv_t.klass, "subdevice=", _wrap_comedi_sv_t_subdevice_set, -1);
 
6532
    rb_define_method(cComedi_sv_t.klass, "subdevice", _wrap_comedi_sv_t_subdevice_get, -1);
 
6533
    rb_define_method(cComedi_sv_t.klass, "chan=", _wrap_comedi_sv_t_chan_set, -1);
 
6534
    rb_define_method(cComedi_sv_t.klass, "chan", _wrap_comedi_sv_t_chan_get, -1);
 
6535
    rb_define_method(cComedi_sv_t.klass, "range=", _wrap_comedi_sv_t_range_set, -1);
 
6536
    rb_define_method(cComedi_sv_t.klass, "range", _wrap_comedi_sv_t_range_get, -1);
 
6537
    rb_define_method(cComedi_sv_t.klass, "aref=", _wrap_comedi_sv_t_aref_set, -1);
 
6538
    rb_define_method(cComedi_sv_t.klass, "aref", _wrap_comedi_sv_t_aref_get, -1);
 
6539
    rb_define_method(cComedi_sv_t.klass, "n=", _wrap_comedi_sv_t_n_set, -1);
 
6540
    rb_define_method(cComedi_sv_t.klass, "n", _wrap_comedi_sv_t_n_get, -1);
 
6541
    rb_define_method(cComedi_sv_t.klass, "maxdata=", _wrap_comedi_sv_t_maxdata_set, -1);
 
6542
    rb_define_method(cComedi_sv_t.klass, "maxdata", _wrap_comedi_sv_t_maxdata_get, -1);
 
6543
    cComedi_sv_t.mark = 0;
 
6544
    cComedi_sv_t.destroy = (void (*)(void *)) free_comedi_sv_t;
 
6545
    rb_define_const(mComedi,"COMEDI_OOR_NUMBER", INT2NUM(COMEDI_OOR_NUMBER));
 
6546
    rb_define_const(mComedi,"COMEDI_OOR_NAN", INT2NUM(COMEDI_OOR_NAN));
 
6547
    rb_define_module_function(mComedi, "comedi_open", _wrap_comedi_open, -1);
 
6548
    rb_define_module_function(mComedi, "comedi_close", _wrap_comedi_close, -1);
 
6549
    rb_define_module_function(mComedi, "comedi_loglevel", _wrap_comedi_loglevel, -1);
 
6550
    rb_define_module_function(mComedi, "comedi_perror", _wrap_comedi_perror, -1);
 
6551
    rb_define_module_function(mComedi, "comedi_strerror", _wrap_comedi_strerror, -1);
 
6552
    rb_define_module_function(mComedi, "comedi_errno", _wrap_comedi_errno, -1);
 
6553
    rb_define_module_function(mComedi, "comedi_fileno", _wrap_comedi_fileno, -1);
 
6554
    rb_define_module_function(mComedi, "comedi_set_global_oor_behavior", _wrap_comedi_set_global_oor_behavior, -1);
 
6555
    rb_define_module_function(mComedi, "comedi_get_n_subdevices", _wrap_comedi_get_n_subdevices, -1);
 
6556
    rb_define_module_function(mComedi, "comedi_get_version_code", _wrap_comedi_get_version_code, -1);
 
6557
    rb_define_module_function(mComedi, "comedi_get_driver_name", _wrap_comedi_get_driver_name, -1);
 
6558
    rb_define_module_function(mComedi, "comedi_get_board_name", _wrap_comedi_get_board_name, -1);
 
6559
    rb_define_module_function(mComedi, "comedi_get_read_subdevice", _wrap_comedi_get_read_subdevice, -1);
 
6560
    rb_define_module_function(mComedi, "comedi_get_write_subdevice", _wrap_comedi_get_write_subdevice, -1);
 
6561
    rb_define_module_function(mComedi, "comedi_get_subdevice_type", _wrap_comedi_get_subdevice_type, -1);
 
6562
    rb_define_module_function(mComedi, "comedi_find_subdevice_by_type", _wrap_comedi_find_subdevice_by_type, -1);
 
6563
    rb_define_module_function(mComedi, "comedi_get_subdevice_flags", _wrap_comedi_get_subdevice_flags, -1);
 
6564
    rb_define_module_function(mComedi, "comedi_get_n_channels", _wrap_comedi_get_n_channels, -1);
 
6565
    rb_define_module_function(mComedi, "comedi_range_is_chan_specific", _wrap_comedi_range_is_chan_specific, -1);
 
6566
    rb_define_module_function(mComedi, "comedi_maxdata_is_chan_specific", _wrap_comedi_maxdata_is_chan_specific, -1);
 
6567
    rb_define_module_function(mComedi, "comedi_get_maxdata", _wrap_comedi_get_maxdata, -1);
 
6568
    rb_define_module_function(mComedi, "comedi_get_n_ranges", _wrap_comedi_get_n_ranges, -1);
 
6569
    rb_define_module_function(mComedi, "comedi_get_range", _wrap_comedi_get_range, -1);
 
6570
    rb_define_module_function(mComedi, "comedi_find_range", _wrap_comedi_find_range, -1);
 
6571
    rb_define_module_function(mComedi, "comedi_get_buffer_size", _wrap_comedi_get_buffer_size, -1);
 
6572
    rb_define_module_function(mComedi, "comedi_get_max_buffer_size", _wrap_comedi_get_max_buffer_size, -1);
 
6573
    rb_define_module_function(mComedi, "comedi_set_buffer_size", _wrap_comedi_set_buffer_size, -1);
 
6574
    rb_define_module_function(mComedi, "comedi_do_insnlist", _wrap_comedi_do_insnlist, -1);
 
6575
    rb_define_module_function(mComedi, "comedi_do_insn", _wrap_comedi_do_insn, -1);
 
6576
    rb_define_module_function(mComedi, "comedi_lock", _wrap_comedi_lock, -1);
 
6577
    rb_define_module_function(mComedi, "comedi_unlock", _wrap_comedi_unlock, -1);
 
6578
    rb_define_module_function(mComedi, "comedi_to_phys", _wrap_comedi_to_phys, -1);
 
6579
    rb_define_module_function(mComedi, "comedi_from_phys", _wrap_comedi_from_phys, -1);
 
6580
    rb_define_module_function(mComedi, "comedi_sampl_to_phys", _wrap_comedi_sampl_to_phys, -1);
 
6581
    rb_define_module_function(mComedi, "comedi_sampl_from_phys", _wrap_comedi_sampl_from_phys, -1);
 
6582
    rb_define_module_function(mComedi, "comedi_data_read", _wrap_comedi_data_read, -1);
 
6583
    rb_define_module_function(mComedi, "comedi_data_read_n", _wrap_comedi_data_read_n, -1);
 
6584
    rb_define_module_function(mComedi, "comedi_data_read_hint", _wrap_comedi_data_read_hint, -1);
 
6585
    rb_define_module_function(mComedi, "comedi_data_read_delayed", _wrap_comedi_data_read_delayed, -1);
 
6586
    rb_define_module_function(mComedi, "comedi_data_write", _wrap_comedi_data_write, -1);
 
6587
    rb_define_module_function(mComedi, "comedi_dio_config", _wrap_comedi_dio_config, -1);
 
6588
    rb_define_module_function(mComedi, "comedi_dio_read", _wrap_comedi_dio_read, -1);
 
6589
    rb_define_module_function(mComedi, "comedi_dio_write", _wrap_comedi_dio_write, -1);
 
6590
    rb_define_module_function(mComedi, "comedi_dio_bitfield", _wrap_comedi_dio_bitfield, -1);
 
6591
    rb_define_module_function(mComedi, "comedi_sv_init", _wrap_comedi_sv_init, -1);
 
6592
    rb_define_module_function(mComedi, "comedi_sv_update", _wrap_comedi_sv_update, -1);
 
6593
    rb_define_module_function(mComedi, "comedi_sv_measure", _wrap_comedi_sv_measure, -1);
 
6594
    rb_define_module_function(mComedi, "comedi_get_cmd_src_mask", _wrap_comedi_get_cmd_src_mask, -1);
 
6595
    rb_define_module_function(mComedi, "comedi_get_cmd_generic_timed", _wrap_comedi_get_cmd_generic_timed, -1);
 
6596
    rb_define_module_function(mComedi, "comedi_cancel", _wrap_comedi_cancel, -1);
 
6597
    rb_define_module_function(mComedi, "comedi_command", _wrap_comedi_command, -1);
 
6598
    rb_define_module_function(mComedi, "comedi_command_test", _wrap_comedi_command_test, -1);
 
6599
    rb_define_module_function(mComedi, "comedi_poll", _wrap_comedi_poll, -1);
 
6600
    rb_define_module_function(mComedi, "comedi_set_max_buffer_size", _wrap_comedi_set_max_buffer_size, -1);
 
6601
    rb_define_module_function(mComedi, "comedi_get_buffer_contents", _wrap_comedi_get_buffer_contents, -1);
 
6602
    rb_define_module_function(mComedi, "comedi_mark_buffer_read", _wrap_comedi_mark_buffer_read, -1);
 
6603
    rb_define_module_function(mComedi, "comedi_get_buffer_offset", _wrap_comedi_get_buffer_offset, -1);
 
6604
    
 
6605
    cComedi_caldac_t.klass = rb_define_class_under(mComedi, "Comedi_caldac_t", rb_cObject);
 
6606
    SWIG_TypeClientData(SWIGTYPE_p_comedi_caldac_t, (void *) &cComedi_caldac_t);
 
6607
    rb_define_alloc_func(cComedi_caldac_t.klass, _wrap_comedi_caldac_t_allocate);
 
6608
    rb_define_method(cComedi_caldac_t.klass, "initialize", _wrap_new_comedi_caldac_t, -1);
 
6609
    rb_define_method(cComedi_caldac_t.klass, "subdevice=", _wrap_comedi_caldac_t_subdevice_set, -1);
 
6610
    rb_define_method(cComedi_caldac_t.klass, "subdevice", _wrap_comedi_caldac_t_subdevice_get, -1);
 
6611
    rb_define_method(cComedi_caldac_t.klass, "channel=", _wrap_comedi_caldac_t_channel_set, -1);
 
6612
    rb_define_method(cComedi_caldac_t.klass, "channel", _wrap_comedi_caldac_t_channel_get, -1);
 
6613
    rb_define_method(cComedi_caldac_t.klass, "value=", _wrap_comedi_caldac_t_value_set, -1);
 
6614
    rb_define_method(cComedi_caldac_t.klass, "value", _wrap_comedi_caldac_t_value_get, -1);
 
6615
    cComedi_caldac_t.mark = 0;
 
6616
    cComedi_caldac_t.destroy = (void (*)(void *)) free_comedi_caldac_t;
 
6617
    rb_define_const(mComedi,"CS_MAX_AREFS_LENGTH", INT2NUM(4));
 
6618
    
 
6619
    cComedi_calibration_setting_t.klass = rb_define_class_under(mComedi, "Comedi_calibration_setting_t", rb_cObject);
 
6620
    SWIG_TypeClientData(SWIGTYPE_p_comedi_calibration_setting_t, (void *) &cComedi_calibration_setting_t);
 
6621
    rb_define_alloc_func(cComedi_calibration_setting_t.klass, _wrap_comedi_calibration_setting_t_allocate);
 
6622
    rb_define_method(cComedi_calibration_setting_t.klass, "initialize", _wrap_new_comedi_calibration_setting_t, -1);
 
6623
    rb_define_method(cComedi_calibration_setting_t.klass, "subdevice=", _wrap_comedi_calibration_setting_t_subdevice_set, -1);
 
6624
    rb_define_method(cComedi_calibration_setting_t.klass, "subdevice", _wrap_comedi_calibration_setting_t_subdevice_get, -1);
 
6625
    rb_define_method(cComedi_calibration_setting_t.klass, "channels=", _wrap_comedi_calibration_setting_t_channels_set, -1);
 
6626
    rb_define_method(cComedi_calibration_setting_t.klass, "channels", _wrap_comedi_calibration_setting_t_channels_get, -1);
 
6627
    rb_define_method(cComedi_calibration_setting_t.klass, "num_channels=", _wrap_comedi_calibration_setting_t_num_channels_set, -1);
 
6628
    rb_define_method(cComedi_calibration_setting_t.klass, "num_channels", _wrap_comedi_calibration_setting_t_num_channels_get, -1);
 
6629
    rb_define_method(cComedi_calibration_setting_t.klass, "ranges=", _wrap_comedi_calibration_setting_t_ranges_set, -1);
 
6630
    rb_define_method(cComedi_calibration_setting_t.klass, "ranges", _wrap_comedi_calibration_setting_t_ranges_get, -1);
 
6631
    rb_define_method(cComedi_calibration_setting_t.klass, "num_ranges=", _wrap_comedi_calibration_setting_t_num_ranges_set, -1);
 
6632
    rb_define_method(cComedi_calibration_setting_t.klass, "num_ranges", _wrap_comedi_calibration_setting_t_num_ranges_get, -1);
 
6633
    rb_define_method(cComedi_calibration_setting_t.klass, "arefs=", _wrap_comedi_calibration_setting_t_arefs_set, -1);
 
6634
    rb_define_method(cComedi_calibration_setting_t.klass, "arefs", _wrap_comedi_calibration_setting_t_arefs_get, -1);
 
6635
    rb_define_method(cComedi_calibration_setting_t.klass, "num_arefs=", _wrap_comedi_calibration_setting_t_num_arefs_set, -1);
 
6636
    rb_define_method(cComedi_calibration_setting_t.klass, "num_arefs", _wrap_comedi_calibration_setting_t_num_arefs_get, -1);
 
6637
    rb_define_method(cComedi_calibration_setting_t.klass, "caldacs=", _wrap_comedi_calibration_setting_t_caldacs_set, -1);
 
6638
    rb_define_method(cComedi_calibration_setting_t.klass, "caldacs", _wrap_comedi_calibration_setting_t_caldacs_get, -1);
 
6639
    rb_define_method(cComedi_calibration_setting_t.klass, "num_caldacs=", _wrap_comedi_calibration_setting_t_num_caldacs_set, -1);
 
6640
    rb_define_method(cComedi_calibration_setting_t.klass, "num_caldacs", _wrap_comedi_calibration_setting_t_num_caldacs_get, -1);
 
6641
    cComedi_calibration_setting_t.mark = 0;
 
6642
    cComedi_calibration_setting_t.destroy = (void (*)(void *)) free_comedi_calibration_setting_t;
 
6643
    
 
6644
    cComedi_calibration_t.klass = rb_define_class_under(mComedi, "Comedi_calibration_t", rb_cObject);
 
6645
    SWIG_TypeClientData(SWIGTYPE_p_comedi_calibration_t, (void *) &cComedi_calibration_t);
 
6646
    rb_define_alloc_func(cComedi_calibration_t.klass, _wrap_comedi_calibration_t_allocate);
 
6647
    rb_define_method(cComedi_calibration_t.klass, "initialize", _wrap_new_comedi_calibration_t, -1);
 
6648
    rb_define_method(cComedi_calibration_t.klass, "driver_name=", _wrap_comedi_calibration_t_driver_name_set, -1);
 
6649
    rb_define_method(cComedi_calibration_t.klass, "driver_name", _wrap_comedi_calibration_t_driver_name_get, -1);
 
6650
    rb_define_method(cComedi_calibration_t.klass, "board_name=", _wrap_comedi_calibration_t_board_name_set, -1);
 
6651
    rb_define_method(cComedi_calibration_t.klass, "board_name", _wrap_comedi_calibration_t_board_name_get, -1);
 
6652
    rb_define_method(cComedi_calibration_t.klass, "settings=", _wrap_comedi_calibration_t_settings_set, -1);
 
6653
    rb_define_method(cComedi_calibration_t.klass, "settings", _wrap_comedi_calibration_t_settings_get, -1);
 
6654
    rb_define_method(cComedi_calibration_t.klass, "num=tings=", _wrap_comedi_calibration_t_num_settings_set, -1);
 
6655
    rb_define_method(cComedi_calibration_t.klass, "num=tings", _wrap_comedi_calibration_t_num_settings_get, -1);
 
6656
    cComedi_calibration_t.mark = 0;
 
6657
    cComedi_calibration_t.destroy = (void (*)(void *)) free_comedi_calibration_t;
 
6658
    rb_define_module_function(mComedi, "comedi_parse_calibration_file", _wrap_comedi_parse_calibration_file, -1);
 
6659
    rb_define_module_function(mComedi, "comedi_apply_parsed_calibration", _wrap_comedi_apply_parsed_calibration, -1);
 
6660
    rb_define_module_function(mComedi, "comedi_get_default_calibration_path", _wrap_comedi_get_default_calibration_path, -1);
 
6661
    rb_define_module_function(mComedi, "comedi_cleanup_calibration", _wrap_comedi_cleanup_calibration, -1);
 
6662
    rb_define_module_function(mComedi, "comedi_apply_calibration", _wrap_comedi_apply_calibration, -1);
 
6663
}
 
6664