source: fact/trigger/VME_wrap.c@ 18350

Last change on this file since 18350 was 115, checked in by daqct3, 15 years ago
New Functions
File size: 32.9 KB
Line 
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#define SWIGPYTHON
12
13#include "Python.h"
14
15/*************************************************************** -*- c -*-
16 * python/precommon.swg
17 *
18 * Rename all exported symbols from common.swg, to avoid symbol
19 * clashes if multiple interpreters are included
20 *
21 ************************************************************************/
22
23#define SWIG_TypeRegister SWIG_Python_TypeRegister
24#define SWIG_TypeCheck SWIG_Python_TypeCheck
25#define SWIG_TypeCast SWIG_Python_TypeCast
26#define SWIG_TypeDynamicCast SWIG_Python_TypeDynamicCast
27#define SWIG_TypeName SWIG_Python_TypeName
28#define SWIG_TypeQuery SWIG_Python_TypeQuery
29#define SWIG_TypeClientData SWIG_Python_TypeClientData
30#define SWIG_PackData SWIG_Python_PackData
31#define SWIG_UnpackData SWIG_Python_UnpackData
32
33
34/***********************************************************************
35 * common.swg
36 *
37 * This file contains generic SWIG runtime support for pointer
38 * type checking as well as a few commonly used macros to control
39 * external linkage.
40 *
41 * Author : David Beazley (beazley@cs.uchicago.edu)
42 *
43 * Copyright (c) 1999-2000, The University of Chicago
44 *
45 * This file may be freely redistributed without license or fee provided
46 * this copyright message remains intact.
47 ************************************************************************/
48
49#include <string.h>
50
51#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
52# if defined(_MSC_VER) || defined(__GNUC__)
53# if defined(STATIC_LINKED)
54# define SWIGEXPORT(a) a
55# define SWIGIMPORT(a) extern a
56# else
57# define SWIGEXPORT(a) __declspec(dllexport) a
58# define SWIGIMPORT(a) extern a
59# endif
60# else
61# if defined(__BORLANDC__)
62# define SWIGEXPORT(a) a _export
63# define SWIGIMPORT(a) a _export
64# else
65# define SWIGEXPORT(a) a
66# define SWIGIMPORT(a) a
67# endif
68# endif
69#else
70# define SWIGEXPORT(a) a
71# define SWIGIMPORT(a) a
72#endif
73
74#ifdef SWIG_GLOBAL
75# define SWIGRUNTIME(a) SWIGEXPORT(a)
76#else
77# define SWIGRUNTIME(a) static a
78#endif
79
80#ifdef __cplusplus
81extern "C" {
82#endif
83
84typedef void *(*swig_converter_func)(void *);
85typedef struct swig_type_info *(*swig_dycast_func)(void **);
86
87typedef struct swig_type_info {
88 const char *name;
89 swig_converter_func converter;
90 const char *str;
91 void *clientdata;
92 swig_dycast_func dcast;
93 struct swig_type_info *next;
94 struct swig_type_info *prev;
95} swig_type_info;
96
97#ifdef SWIG_NOINCLUDE
98
99SWIGIMPORT(swig_type_info *) SWIG_TypeRegister(swig_type_info *);
100SWIGIMPORT(swig_type_info *) SWIG_TypeCheck(char *c, swig_type_info *);
101SWIGIMPORT(void *) SWIG_TypeCast(swig_type_info *, void *);
102SWIGIMPORT(swig_type_info *) SWIG_TypeDynamicCast(swig_type_info *, void **);
103SWIGIMPORT(const char *) SWIG_TypeName(const swig_type_info *);
104SWIGIMPORT(swig_type_info *) SWIG_TypeQuery(const char *);
105SWIGIMPORT(void) SWIG_TypeClientData(swig_type_info *, void *);
106SWIGIMPORT(char *) SWIG_PackData(char *, void *, int);
107SWIGIMPORT(char *) SWIG_UnpackData(char *, void *, int);
108
109#else
110
111static swig_type_info *swig_type_list = 0;
112
113/* Register a type mapping with the type-checking */
114SWIGRUNTIME(swig_type_info *)
115SWIG_TypeRegister(swig_type_info *ti) {
116 swig_type_info *tc, *head, *ret, *next;
117 /* Check to see if this type has already been registered */
118 tc = swig_type_list;
119 while (tc) {
120 if (strcmp(tc->name, ti->name) == 0) {
121 /* Already exists in the table. Just add additional types to the list */
122 if (tc->clientdata) ti->clientdata = tc->clientdata;
123 head = tc;
124 next = tc->next;
125 goto l1;
126 }
127 tc = tc->prev;
128 }
129 head = ti;
130 next = 0;
131
132 /* Place in list */
133 ti->prev = swig_type_list;
134 swig_type_list = ti;
135
136 /* Build linked lists */
137 l1:
138 ret = head;
139 tc = ti + 1;
140 /* Patch up the rest of the links */
141 while (tc->name) {
142 head->next = tc;
143 tc->prev = head;
144 head = tc;
145 tc++;
146 }
147 if (next) next->prev = head;
148 head->next = next;
149 return ret;
150}
151
152/* Check the typename */
153SWIGRUNTIME(swig_type_info *)
154SWIG_TypeCheck(char *c, swig_type_info *ty) {
155 swig_type_info *s;
156 if (!ty) return 0; /* Void pointer */
157 s = ty->next; /* First element always just a name */
158 do {
159 if (strcmp(s->name,c) == 0) {
160 if (s == ty->next) return s;
161 /* Move s to the top of the linked list */
162 s->prev->next = s->next;
163 if (s->next) {
164 s->next->prev = s->prev;
165 }
166 /* Insert s as second element in the list */
167 s->next = ty->next;
168 if (ty->next) ty->next->prev = s;
169 ty->next = s;
170 s->prev = ty;
171 return s;
172 }
173 s = s->next;
174 } while (s && (s != ty->next));
175 return 0;
176}
177
178/* Cast a pointer up an inheritance hierarchy */
179SWIGRUNTIME(void *)
180SWIG_TypeCast(swig_type_info *ty, void *ptr) {
181 if ((!ty) || (!ty->converter)) return ptr;
182 return (*ty->converter)(ptr);
183}
184
185/* Dynamic pointer casting. Down an inheritance hierarchy */
186SWIGRUNTIME(swig_type_info *)
187SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
188 swig_type_info *lastty = ty;
189 if (!ty || !ty->dcast) return ty;
190 while (ty && (ty->dcast)) {
191 ty = (*ty->dcast)(ptr);
192 if (ty) lastty = ty;
193 }
194 return lastty;
195}
196
197/* Return the name associated with this type */
198SWIGRUNTIME(const char *)
199SWIG_TypeName(const swig_type_info *ty) {
200 return ty->name;
201}
202
203/* Search for a swig_type_info structure */
204SWIGRUNTIME(swig_type_info *)
205SWIG_TypeQuery(const char *name) {
206 swig_type_info *ty = swig_type_list;
207 while (ty) {
208 if (ty->str && (strcmp(name,ty->str) == 0)) return ty;
209 if (ty->name && (strcmp(name,ty->name) == 0)) return ty;
210 ty = ty->prev;
211 }
212 return 0;
213}
214
215/* Set the clientdata field for a type */
216SWIGRUNTIME(void)
217SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
218 swig_type_info *tc, *equiv;
219 if (ti->clientdata == clientdata) return;
220 ti->clientdata = clientdata;
221 equiv = ti->next;
222 while (equiv) {
223 if (!equiv->converter) {
224 tc = swig_type_list;
225 while (tc) {
226 if ((strcmp(tc->name, equiv->name) == 0))
227 SWIG_TypeClientData(tc,clientdata);
228 tc = tc->prev;
229 }
230 }
231 equiv = equiv->next;
232 }
233}
234
235/* Pack binary data into a string */
236SWIGRUNTIME(char *)
237SWIG_PackData(char *c, void *ptr, int sz) {
238 static char hex[17] = "0123456789abcdef";
239 int i;
240 unsigned char *u = (unsigned char *) ptr;
241 register unsigned char uu;
242 for (i = 0; i < sz; i++,u++) {
243 uu = *u;
244 *(c++) = hex[(uu & 0xf0) >> 4];
245 *(c++) = hex[uu & 0xf];
246 }
247 return c;
248}
249
250/* Unpack binary data from a string */
251SWIGRUNTIME(char *)
252SWIG_UnpackData(char *c, void *ptr, int sz) {
253 register unsigned char uu = 0;
254 register int d;
255 unsigned char *u = (unsigned char *) ptr;
256 int i;
257 for (i = 0; i < sz; i++, u++) {
258 d = *(c++);
259 if ((d >= '0') && (d <= '9'))
260 uu = ((d - '0') << 4);
261 else if ((d >= 'a') && (d <= 'f'))
262 uu = ((d - ('a'-10)) << 4);
263 d = *(c++);
264 if ((d >= '0') && (d <= '9'))
265 uu |= (d - '0');
266 else if ((d >= 'a') && (d <= 'f'))
267 uu |= (d - ('a'-10));
268 *u = uu;
269 }
270 return c;
271}
272
273#endif
274
275#ifdef __cplusplus
276}
277#endif
278
279/***********************************************************************
280 * python.swg
281 *
282 * This file contains the runtime support for Python modules
283 * and includes code for managing global variables and pointer
284 * type checking.
285 *
286 * Author : David Beazley (beazley@cs.uchicago.edu)
287 ************************************************************************/
288
289#include "Python.h"
290
291#ifdef __cplusplus
292extern "C" {
293#endif
294
295#define SWIG_PY_INT 1
296#define SWIG_PY_FLOAT 2
297#define SWIG_PY_STRING 3
298#define SWIG_PY_POINTER 4
299#define SWIG_PY_BINARY 5
300
301/* Flags for pointer conversion */
302
303#define SWIG_POINTER_EXCEPTION 0x1
304#define SWIG_POINTER_DISOWN 0x2
305
306/* Exception handling in wrappers */
307#define SWIG_fail goto fail
308
309/* Constant information structure */
310typedef struct swig_const_info {
311 int type;
312 char *name;
313 long lvalue;
314 double dvalue;
315 void *pvalue;
316 swig_type_info **ptype;
317} swig_const_info;
318
319/* Common SWIG API */
320#define SWIG_ConvertPtr(obj, pp, type, flags) \
321 SWIG_Python_ConvertPtr(obj, pp, type, flags)
322#define SWIG_NewPointerObj(p, type, flags) \
323 SWIG_Python_NewPointerObj(p, type, flags)
324#define SWIG_MustGetPtr(p, type, argnum, flags) \
325 SWIG_Python_MustGetPtr(p, type, argnum, flags)
326
327/* Python-specific SWIG API */
328#define SWIG_newvarlink() \
329 SWIG_Python_newvarlink()
330#define SWIG_addvarlink(p, name, get_attr, set_attr) \
331 SWIG_Python_addvarlink(p, name, get_attr, set_attr)
332#define SWIG_ConvertPacked(obj, ptr, sz, ty, flags) \
333 SWIG_Python_ConvertPacked(obj, ptr, sz, ty, flags)
334#define SWIG_NewPackedObj(ptr, sz, type) \
335 SWIG_Python_NewPackedObj(ptr, sz, type)
336#define SWIG_InstallConstants(d, constants) \
337 SWIG_Python_InstallConstants(d, constants)
338
339#ifdef SWIG_NOINCLUDE
340
341SWIGIMPORT(int) SWIG_Python_ConvertPtr(PyObject *, void **, swig_type_info *, int);
342SWIGIMPORT(PyObject *) SWIG_Python_NewPointerObj(void *, swig_type_info *,int own);
343SWIGIMPORT(void *) SWIG_Python_MustGetPtr(PyObject *, swig_type_info *, int, int);
344SWIGIMPORT(PyObject *) SWIG_Python_newvarlink(void);
345SWIGIMPORT(void) SWIG_Python_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *));
346SWIGIMPORT(int) SWIG_Python_ConvertPacked(PyObject *, void *, int sz, swig_type_info *, int);
347SWIGIMPORT(PyObject *) SWIG_Python_NewPackedObj(void *, int sz, swig_type_info *);
348SWIGIMPORT(void) SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]);
349
350#else
351
352/* -----------------------------------------------------------------------------
353 * global variable support code.
354 * ----------------------------------------------------------------------------- */
355
356typedef struct swig_globalvar {
357 char *name; /* Name of global variable */
358 PyObject *(*get_attr)(void); /* Return the current value */
359 int (*set_attr)(PyObject *); /* Set the value */
360 struct swig_globalvar *next;
361} swig_globalvar;
362
363typedef struct swig_varlinkobject {
364 PyObject_HEAD
365 swig_globalvar *vars;
366} swig_varlinkobject;
367
368static PyObject *
369swig_varlink_repr(swig_varlinkobject *v) {
370 v = v;
371 return PyString_FromString("<Global variables>");
372}
373
374static int
375swig_varlink_print(swig_varlinkobject *v, FILE *fp, int flags) {
376 swig_globalvar *var;
377 flags = flags;
378 fprintf(fp,"Global variables { ");
379 for (var = v->vars; var; var=var->next) {
380 fprintf(fp,"%s", var->name);
381 if (var->next) fprintf(fp,", ");
382 }
383 fprintf(fp," }\n");
384 return 0;
385}
386
387static PyObject *
388swig_varlink_getattr(swig_varlinkobject *v, char *n) {
389 swig_globalvar *var = v->vars;
390 while (var) {
391 if (strcmp(var->name,n) == 0) {
392 return (*var->get_attr)();
393 }
394 var = var->next;
395 }
396 PyErr_SetString(PyExc_NameError,"Unknown C global variable");
397 return NULL;
398}
399
400static int
401swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
402 swig_globalvar *var = v->vars;
403 while (var) {
404 if (strcmp(var->name,n) == 0) {
405 return (*var->set_attr)(p);
406 }
407 var = var->next;
408 }
409 PyErr_SetString(PyExc_NameError,"Unknown C global variable");
410 return 1;
411}
412
413statichere PyTypeObject varlinktype = {
414 PyObject_HEAD_INIT(0)
415 0,
416 (char *)"swigvarlink", /* Type name */
417 sizeof(swig_varlinkobject), /* Basic size */
418 0, /* Itemsize */
419 0, /* Deallocator */
420 (printfunc) swig_varlink_print, /* Print */
421 (getattrfunc) swig_varlink_getattr, /* get attr */
422 (setattrfunc) swig_varlink_setattr, /* Set attr */
423 0, /* tp_compare */
424 (reprfunc) swig_varlink_repr, /* tp_repr */
425 0, /* tp_as_number */
426 0, /* tp_as_mapping*/
427 0, /* tp_hash */
428};
429
430/* Create a variable linking object for use later */
431SWIGRUNTIME(PyObject *)
432SWIG_Python_newvarlink(void) {
433 swig_varlinkobject *result = 0;
434 result = PyMem_NEW(swig_varlinkobject,1);
435 varlinktype.ob_type = &PyType_Type; /* Patch varlinktype into a PyType */
436 result->ob_type = &varlinktype;
437 result->vars = 0;
438 result->ob_refcnt = 0;
439 Py_XINCREF((PyObject *) result);
440 return ((PyObject*) result);
441}
442
443SWIGRUNTIME(void)
444SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
445 swig_varlinkobject *v;
446 swig_globalvar *gv;
447 v= (swig_varlinkobject *) p;
448 gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
449 gv->name = (char *) malloc(strlen(name)+1);
450 strcpy(gv->name,name);
451 gv->get_attr = get_attr;
452 gv->set_attr = set_attr;
453 gv->next = v->vars;
454 v->vars = gv;
455}
456
457/* Convert a pointer value */
458SWIGRUNTIME(int)
459SWIG_Python_ConvertPtr(PyObject *obj, void **ptr, swig_type_info *ty, int flags) {
460 swig_type_info *tc;
461 char *c = 0;
462 static PyObject *SWIG_this = 0;
463 int newref = 0;
464 PyObject *pyobj = 0;
465
466 if (!obj) return 0;
467 if (obj == Py_None) {
468 *ptr = 0;
469 return 0;
470 }
471#ifdef SWIG_COBJECT_TYPES
472 if (!(PyCObject_Check(obj))) {
473 if (!SWIG_this)
474 SWIG_this = PyString_FromString("this");
475 pyobj = obj;
476 obj = PyObject_GetAttr(obj,SWIG_this);
477 newref = 1;
478 if (!obj) goto type_error;
479 if (!PyCObject_Check(obj)) {
480 Py_DECREF(obj);
481 goto type_error;
482 }
483 }
484 *ptr = PyCObject_AsVoidPtr(obj);
485 c = (char *) PyCObject_GetDesc(obj);
486 if (newref) Py_DECREF(obj);
487 goto cobject;
488#else
489 if (!(PyString_Check(obj))) {
490 if (!SWIG_this)
491 SWIG_this = PyString_FromString("this");
492 pyobj = obj;
493 obj = PyObject_GetAttr(obj,SWIG_this);
494 newref = 1;
495 if (!obj) goto type_error;
496 if (!PyString_Check(obj)) {
497 Py_DECREF(obj);
498 goto type_error;
499 }
500 }
501 c = PyString_AsString(obj);
502 /* Pointer values must start with leading underscore */
503 if (*c != '_') {
504 *ptr = (void *) 0;
505 if (strcmp(c,"NULL") == 0) {
506 if (newref) { Py_DECREF(obj); }
507 return 0;
508 } else {
509 if (newref) { Py_DECREF(obj); }
510 goto type_error;
511 }
512 }
513 c++;
514 c = SWIG_UnpackData(c,ptr,sizeof(void *));
515 if (newref) { Py_DECREF(obj); }
516#endif
517
518#ifdef SWIG_COBJECT_TYPES
519cobject:
520#endif
521
522 if (ty) {
523 tc = SWIG_TypeCheck(c,ty);
524 if (!tc) goto type_error;
525 *ptr = SWIG_TypeCast(tc,(void*) *ptr);
526 }
527
528 if ((pyobj) && (flags & SWIG_POINTER_DISOWN)) {
529 PyObject *zero = PyInt_FromLong(0);
530 PyObject_SetAttrString(pyobj,(char*)"thisown",zero);
531 Py_DECREF(zero);
532 }
533 return 0;
534
535type_error:
536 if (flags & SWIG_POINTER_EXCEPTION) {
537 if (ty && c) {
538 char *temp = (char *) malloc(64+strlen(ty->name)+strlen(c));
539 sprintf(temp,"Type error. Got %s, expected %s", c, ty->name);
540 PyErr_SetString(PyExc_TypeError, temp);
541 free((char *) temp);
542 } else {
543 PyErr_SetString(PyExc_TypeError,"Expected a pointer");
544 }
545 }
546 return -1;
547}
548
549/* Convert a pointer value, signal an exception on a type mismatch */
550SWIGRUNTIME(void *)
551SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) {
552 void *result;
553 SWIG_Python_ConvertPtr(obj, &result, ty, flags | SWIG_POINTER_EXCEPTION);
554 return result;
555}
556
557/* Convert a packed value value */
558SWIGRUNTIME(int)
559SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, int sz, swig_type_info *ty, int flags) {
560 swig_type_info *tc;
561 char *c = 0;
562
563 if ((!obj) || (!PyString_Check(obj))) goto type_error;
564 c = PyString_AsString(obj);
565 /* Pointer values must start with leading underscore */
566 if (*c != '_') goto type_error;
567 c++;
568 c = SWIG_UnpackData(c,ptr,sz);
569 if (ty) {
570 tc = SWIG_TypeCheck(c,ty);
571 if (!tc) goto type_error;
572 }
573 return 0;
574
575type_error:
576
577 if (flags) {
578 if (ty && c) {
579 char *temp = (char *) malloc(64+strlen(ty->name)+strlen(c));
580 sprintf(temp,"Type error. Got %s, expected %s", c, ty->name);
581 PyErr_SetString(PyExc_TypeError, temp);
582 free((char *) temp);
583 } else {
584 PyErr_SetString(PyExc_TypeError,"Expected a pointer");
585 }
586 }
587 return -1;
588}
589
590/* Create a new pointer object */
591SWIGRUNTIME(PyObject *)
592SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int own) {
593 PyObject *robj;
594 if (!ptr) {
595 Py_INCREF(Py_None);
596 return Py_None;
597 }
598#ifdef SWIG_COBJECT_TYPES
599 robj = PyCObject_FromVoidPtrAndDesc((void *) ptr, (char *) type->name, NULL);
600#else
601 {
602 char result[1024];
603 char *r = result;
604 *(r++) = '_';
605 r = SWIG_PackData(r,&ptr,sizeof(void *));
606 strcpy(r,type->name);
607 robj = PyString_FromString(result);
608 }
609#endif
610 if (!robj || (robj == Py_None)) return robj;
611 if (type->clientdata) {
612 PyObject *inst;
613 PyObject *args = Py_BuildValue((char*)"(O)", robj);
614 Py_DECREF(robj);
615 inst = PyObject_CallObject((PyObject *) type->clientdata, args);
616 Py_DECREF(args);
617 if (inst) {
618 if (own) {
619 PyObject *n = PyInt_FromLong(1);
620 PyObject_SetAttrString(inst,(char*)"thisown",n);
621 Py_DECREF(n);
622 }
623 robj = inst;
624 }
625 }
626 return robj;
627}
628
629SWIGRUNTIME(PyObject *)
630SWIG_Python_NewPackedObj(void *ptr, int sz, swig_type_info *type) {
631 char result[1024];
632 char *r = result;
633 if ((2*sz + 1 + strlen(type->name)) > 1000) return 0;
634 *(r++) = '_';
635 r = SWIG_PackData(r,ptr,sz);
636 strcpy(r,type->name);
637 return PyString_FromString(result);
638}
639
640/* Install Constants */
641SWIGRUNTIME(void)
642SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
643 int i;
644 PyObject *obj;
645 for (i = 0; constants[i].type; i++) {
646 switch(constants[i].type) {
647 case SWIG_PY_INT:
648 obj = PyInt_FromLong(constants[i].lvalue);
649 break;
650 case SWIG_PY_FLOAT:
651 obj = PyFloat_FromDouble(constants[i].dvalue);
652 break;
653 case SWIG_PY_STRING:
654 obj = PyString_FromString((char *) constants[i].pvalue);
655 break;
656 case SWIG_PY_POINTER:
657 obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
658 break;
659 case SWIG_PY_BINARY:
660 obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
661 break;
662 default:
663 obj = 0;
664 break;
665 }
666 if (obj) {
667 PyDict_SetItemString(d,constants[i].name,obj);
668 Py_DECREF(obj);
669 }
670 }
671}
672
673#endif
674
675/* Contract support */
676
677#define SWIG_contract_assert(expr, msg) if (!(expr)) { PyErr_SetString(PyExc_RuntimeError, (char *) msg ); goto fail; } else
678
679#ifdef __cplusplus
680}
681#endif
682
683
684/* -------- TYPES TABLE (BEGIN) -------- */
685
686#define SWIGTYPE_p_VME_ErrorCode_t swig_types[0]
687#define SWIGTYPE_p_char swig_types[1]
688static swig_type_info *swig_types[3];
689
690/* -------- TYPES TABLE (END) -------- */
691
692
693/*-----------------------------------------------
694 @(target):= _VME.so
695 ------------------------------------------------*/
696#define SWIG_init init_VME
697
698#define SWIG_name "_VME"
699
700//include extra headers necessary in your C source.
701//#include <headers.h>
702#include "v560.h"
703
704#ifdef __cplusplus
705extern "C" {
706#endif
707static PyObject *_wrap_VME_Open(PyObject *self, PyObject *args) {
708 PyObject *resultobj;
709 VME_ErrorCode_t result;
710
711 if(!PyArg_ParseTuple(args,(char *)":VME_Open")) goto fail;
712 result = VME_Open();
713
714 {
715 VME_ErrorCode_t * resultptr;
716 resultptr = (VME_ErrorCode_t *) malloc(sizeof(VME_ErrorCode_t));
717 memmove(resultptr, &result, sizeof(VME_ErrorCode_t));
718 resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_VME_ErrorCode_t, 1);
719 }
720 return resultobj;
721 fail:
722 return NULL;
723}
724
725
726static PyObject *_wrap_VME_Close(PyObject *self, PyObject *args) {
727 PyObject *resultobj;
728 VME_ErrorCode_t result;
729
730 if(!PyArg_ParseTuple(args,(char *)":VME_Close")) goto fail;
731 result = VME_Close();
732
733 {
734 VME_ErrorCode_t * resultptr;
735 resultptr = (VME_ErrorCode_t *) malloc(sizeof(VME_ErrorCode_t));
736 memmove(resultptr, &result, sizeof(VME_ErrorCode_t));
737 resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_VME_ErrorCode_t, 1);
738 }
739 return resultobj;
740 fail:
741 return NULL;
742}
743
744
745static PyObject *_wrap_VME_ErrorPrint(PyObject *self, PyObject *args) {
746 PyObject *resultobj;
747 VME_ErrorCode_t arg1 ;
748 int result;
749 VME_ErrorCode_t *argp1 ;
750 PyObject * obj0 = 0 ;
751
752 if(!PyArg_ParseTuple(args,(char *)"O:VME_ErrorPrint",&obj0)) goto fail;
753 if ((SWIG_ConvertPtr(obj0,(void **) &argp1, SWIGTYPE_p_VME_ErrorCode_t,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail;
754 arg1 = *argp1;
755 result = (int)VME_ErrorPrint(arg1);
756
757 resultobj = PyInt_FromLong((long)result);
758 return resultobj;
759 fail:
760 return NULL;
761}
762
763
764static PyObject *_wrap_V560_Open(PyObject *self, PyObject *args) {
765 PyObject *resultobj;
766 VME_ErrorCode_t result;
767
768 if(!PyArg_ParseTuple(args,(char *)":V560_Open")) goto fail;
769 result = V560_Open();
770
771 {
772 VME_ErrorCode_t * resultptr;
773 resultptr = (VME_ErrorCode_t *) malloc(sizeof(VME_ErrorCode_t));
774 memmove(resultptr, &result, sizeof(VME_ErrorCode_t));
775 resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_VME_ErrorCode_t, 1);
776 }
777 return resultobj;
778 fail:
779 return NULL;
780}
781
782
783static PyObject *_wrap_V560_Send_Scale_Increment(PyObject *self, PyObject *args) {
784 PyObject *resultobj;
785 short arg1 ;
786 int result;
787
788 if(!PyArg_ParseTuple(args,(char *)"h:V560_Send_Scale_Increment",&arg1)) goto fail;
789 result = (int)V560_Send_Scale_Increment(arg1);
790
791 resultobj = PyInt_FromLong((long)result);
792 return resultobj;
793 fail:
794 return NULL;
795}
796
797
798static PyObject *_wrap_V560_Set_Veto(PyObject *self, PyObject *args) {
799 PyObject *resultobj;
800 short arg1 ;
801 int result;
802
803 if(!PyArg_ParseTuple(args,(char *)"h:V560_Set_Veto",&arg1)) goto fail;
804 result = (int)V560_Set_Veto(arg1);
805
806 resultobj = PyInt_FromLong((long)result);
807 return resultobj;
808 fail:
809 return NULL;
810}
811
812
813static PyObject *_wrap_V560_Reset_Veto(PyObject *self, PyObject *args) {
814 PyObject *resultobj;
815 short arg1 ;
816 int result;
817
818 if(!PyArg_ParseTuple(args,(char *)"h:V560_Reset_Veto",&arg1)) goto fail;
819 result = (int)V560_Reset_Veto(arg1);
820
821 resultobj = PyInt_FromLong((long)result);
822 return resultobj;
823 fail:
824 return NULL;
825}
826
827
828static PyObject *_wrap_V560_Clear_Scales(PyObject *self, PyObject *args) {
829 PyObject *resultobj;
830 short arg1 ;
831 int result;
832
833 if(!PyArg_ParseTuple(args,(char *)"h:V560_Clear_Scales",&arg1)) goto fail;
834 result = (int)V560_Clear_Scales(arg1);
835
836 resultobj = PyInt_FromLong((long)result);
837 return resultobj;
838 fail:
839 return NULL;
840}
841
842
843static PyObject *_wrap_V560_Read_Request_Register(PyObject *self, PyObject *args) {
844 PyObject *resultobj;
845 short arg1 ;
846 short result;
847
848 if(!PyArg_ParseTuple(args,(char *)"h:V560_Read_Request_Register",&arg1)) goto fail;
849 result = (short)V560_Read_Request_Register(arg1);
850
851 resultobj = PyInt_FromLong((long)result);
852 return resultobj;
853 fail:
854 return NULL;
855}
856
857
858static PyObject *_wrap_V560_Write_Request_Register(PyObject *self, PyObject *args) {
859 PyObject *resultobj;
860 short arg1 ;
861 short arg2 ;
862 int result;
863
864 if(!PyArg_ParseTuple(args,(char *)"hh:V560_Write_Request_Register",&arg1,&arg2)) goto fail;
865 result = (int)V560_Write_Request_Register(arg1,arg2);
866
867 resultobj = PyInt_FromLong((long)result);
868 return resultobj;
869 fail:
870 return NULL;
871}
872
873
874static PyObject *_wrap_V560_Clear_VME_Interrupt(PyObject *self, PyObject *args) {
875 PyObject *resultobj;
876 short arg1 ;
877 int result;
878
879 if(!PyArg_ParseTuple(args,(char *)"h:V560_Clear_VME_Interrupt",&arg1)) goto fail;
880 result = (int)V560_Clear_VME_Interrupt(arg1);
881
882 resultobj = PyInt_FromLong((long)result);
883 return resultobj;
884 fail:
885 return NULL;
886}
887
888
889static PyObject *_wrap_V560_Read_Counter(PyObject *self, PyObject *args) {
890 PyObject *resultobj;
891 short arg1 ;
892 short arg2 ;
893 int result;
894
895 if(!PyArg_ParseTuple(args,(char *)"hh:V560_Read_Counter",&arg1,&arg2)) goto fail;
896 result = (int)V560_Read_Counter(arg1,arg2);
897
898 resultobj = PyInt_FromLong((long)result);
899 return resultobj;
900 fail:
901 return NULL;
902}
903
904
905static PyObject *_wrap_V560_Print_Info(PyObject *self, PyObject *args) {
906 PyObject *resultobj;
907 int result;
908
909 if(!PyArg_ParseTuple(args,(char *)":V560_Print_Info")) goto fail;
910 result = (int)V560_Print_Info();
911
912 resultobj = PyInt_FromLong((long)result);
913 return resultobj;
914 fail:
915 return NULL;
916}
917
918
919static PyObject *_wrap_V560_Close(PyObject *self, PyObject *args) {
920 PyObject *resultobj;
921 VME_ErrorCode_t result;
922
923 if(!PyArg_ParseTuple(args,(char *)":V560_Close")) goto fail;
924 result = V560_Close();
925
926 {
927 VME_ErrorCode_t * resultptr;
928 resultptr = (VME_ErrorCode_t *) malloc(sizeof(VME_ErrorCode_t));
929 memmove(resultptr, &result, sizeof(VME_ErrorCode_t));
930 resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_VME_ErrorCode_t, 1);
931 }
932 return resultobj;
933 fail:
934 return NULL;
935}
936
937
938static PyObject *_wrap_V812_Open(PyObject *self, PyObject *args) {
939 PyObject *resultobj;
940 VME_ErrorCode_t result;
941
942 if(!PyArg_ParseTuple(args,(char *)":V812_Open")) goto fail;
943 result = V812_Open();
944
945 {
946 VME_ErrorCode_t * resultptr;
947 resultptr = (VME_ErrorCode_t *) malloc(sizeof(VME_ErrorCode_t));
948 memmove(resultptr, &result, sizeof(VME_ErrorCode_t));
949 resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_VME_ErrorCode_t, 1);
950 }
951 return resultobj;
952 fail:
953 return NULL;
954}
955
956
957static PyObject *_wrap_V812_Set_Threshold(PyObject *self, PyObject *args) {
958 PyObject *resultobj;
959 short arg1 ;
960 short arg2 ;
961 short arg3 ;
962 int result;
963
964 if(!PyArg_ParseTuple(args,(char *)"hhh:V812_Set_Threshold",&arg1,&arg2,&arg3)) goto fail;
965 result = (int)V812_Set_Threshold(arg1,arg2,arg3);
966
967 resultobj = PyInt_FromLong((long)result);
968 return resultobj;
969 fail:
970 return NULL;
971}
972
973
974static PyObject *_wrap_V812_Set_Pattern_Inhibit(PyObject *self, PyObject *args) {
975 PyObject *resultobj;
976 short arg1 ;
977 char *arg2 ;
978 int result;
979
980 if(!PyArg_ParseTuple(args,(char *)"hs:V812_Set_Pattern_Inhibit",&arg1,&arg2)) goto fail;
981 result = (int)V812_Set_Pattern_Inhibit(arg1,arg2);
982
983 resultobj = PyInt_FromLong((long)result);
984 return resultobj;
985 fail:
986 return NULL;
987}
988
989
990static PyObject *_wrap_V812_Set_Pattern_Inhibit_Hex(PyObject *self, PyObject *args) {
991 PyObject *resultobj;
992 short arg1 ;
993 int arg2 ;
994 int result;
995
996 if(!PyArg_ParseTuple(args,(char *)"hi:V812_Set_Pattern_Inhibit_Hex",&arg1,&arg2)) goto fail;
997 result = (int)V812_Set_Pattern_Inhibit_Hex(arg1,arg2);
998
999 resultobj = PyInt_FromLong((long)result);
1000 return resultobj;
1001 fail:
1002 return NULL;
1003}
1004
1005
1006static PyObject *_wrap_V812_Set_Output_Width(PyObject *self, PyObject *args) {
1007 PyObject *resultobj;
1008 short arg1 ;
1009 short arg2 ;
1010 short arg3 ;
1011 int result;
1012
1013 if(!PyArg_ParseTuple(args,(char *)"hhh:V812_Set_Output_Width",&arg1,&arg2,&arg3)) goto fail;
1014 result = (int)V812_Set_Output_Width(arg1,arg2,arg3);
1015
1016 resultobj = PyInt_FromLong((long)result);
1017 return resultobj;
1018 fail:
1019 return NULL;
1020}
1021
1022
1023static PyObject *_wrap_V812_Set_Dead_Time(PyObject *self, PyObject *args) {
1024 PyObject *resultobj;
1025 short arg1 ;
1026 short arg2 ;
1027 short arg3 ;
1028 int result;
1029
1030 if(!PyArg_ParseTuple(args,(char *)"hhh:V812_Set_Dead_Time",&arg1,&arg2,&arg3)) goto fail;
1031 result = (int)V812_Set_Dead_Time(arg1,arg2,arg3);
1032
1033 resultobj = PyInt_FromLong((long)result);
1034 return resultobj;
1035 fail:
1036 return NULL;
1037}
1038
1039
1040static PyObject *_wrap_V812_Set_Majority_Level(PyObject *self, PyObject *args) {
1041 PyObject *resultobj;
1042 short arg1 ;
1043 short arg2 ;
1044 int result;
1045
1046 if(!PyArg_ParseTuple(args,(char *)"hh:V812_Set_Majority_Level",&arg1,&arg2)) goto fail;
1047 result = (int)V812_Set_Majority_Level(arg1,arg2);
1048
1049 resultobj = PyInt_FromLong((long)result);
1050 return resultobj;
1051 fail:
1052 return NULL;
1053}
1054
1055
1056static PyObject *_wrap_V812_Set_Majority_Threshold(PyObject *self, PyObject *args) {
1057 PyObject *resultobj;
1058 short arg1 ;
1059 short arg2 ;
1060 int result;
1061
1062 if(!PyArg_ParseTuple(args,(char *)"hh:V812_Set_Majority_Threshold",&arg1,&arg2)) goto fail;
1063 result = (int)V812_Set_Majority_Threshold(arg1,arg2);
1064
1065 resultobj = PyInt_FromLong((long)result);
1066 return resultobj;
1067 fail:
1068 return NULL;
1069}
1070
1071
1072static PyObject *_wrap_V812_Test_Pulse(PyObject *self, PyObject *args) {
1073 PyObject *resultobj;
1074 short arg1 ;
1075 int result;
1076
1077 if(!PyArg_ParseTuple(args,(char *)"h:V812_Test_Pulse",&arg1)) goto fail;
1078 result = (int)V812_Test_Pulse(arg1);
1079
1080 resultobj = PyInt_FromLong((long)result);
1081 return resultobj;
1082 fail:
1083 return NULL;
1084}
1085
1086
1087static PyObject *_wrap_V812_Print_Info(PyObject *self, PyObject *args) {
1088 PyObject *resultobj;
1089 int result;
1090
1091 if(!PyArg_ParseTuple(args,(char *)":V812_Print_Info")) goto fail;
1092 result = (int)V812_Print_Info();
1093
1094 resultobj = PyInt_FromLong((long)result);
1095 return resultobj;
1096 fail:
1097 return NULL;
1098}
1099
1100
1101static PyObject *_wrap_V812_Close(PyObject *self, PyObject *args) {
1102 PyObject *resultobj;
1103 VME_ErrorCode_t result;
1104
1105 if(!PyArg_ParseTuple(args,(char *)":V812_Close")) goto fail;
1106 result = V812_Close();
1107
1108 {
1109 VME_ErrorCode_t * resultptr;
1110 resultptr = (VME_ErrorCode_t *) malloc(sizeof(VME_ErrorCode_t));
1111 memmove(resultptr, &result, sizeof(VME_ErrorCode_t));
1112 resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_VME_ErrorCode_t, 1);
1113 }
1114 return resultobj;
1115 fail:
1116 return NULL;
1117}
1118
1119
1120static PyMethodDef SwigMethods[] = {
1121 { (char *)"VME_Open", _wrap_VME_Open, METH_VARARGS },
1122 { (char *)"VME_Close", _wrap_VME_Close, METH_VARARGS },
1123 { (char *)"VME_ErrorPrint", _wrap_VME_ErrorPrint, METH_VARARGS },
1124 { (char *)"V560_Open", _wrap_V560_Open, METH_VARARGS },
1125 { (char *)"V560_Send_Scale_Increment", _wrap_V560_Send_Scale_Increment, METH_VARARGS },
1126 { (char *)"V560_Set_Veto", _wrap_V560_Set_Veto, METH_VARARGS },
1127 { (char *)"V560_Reset_Veto", _wrap_V560_Reset_Veto, METH_VARARGS },
1128 { (char *)"V560_Clear_Scales", _wrap_V560_Clear_Scales, METH_VARARGS },
1129 { (char *)"V560_Read_Request_Register", _wrap_V560_Read_Request_Register, METH_VARARGS },
1130 { (char *)"V560_Write_Request_Register", _wrap_V560_Write_Request_Register, METH_VARARGS },
1131 { (char *)"V560_Clear_VME_Interrupt", _wrap_V560_Clear_VME_Interrupt, METH_VARARGS },
1132 { (char *)"V560_Read_Counter", _wrap_V560_Read_Counter, METH_VARARGS },
1133 { (char *)"V560_Print_Info", _wrap_V560_Print_Info, METH_VARARGS },
1134 { (char *)"V560_Close", _wrap_V560_Close, METH_VARARGS },
1135 { (char *)"V812_Open", _wrap_V812_Open, METH_VARARGS },
1136 { (char *)"V812_Set_Threshold", _wrap_V812_Set_Threshold, METH_VARARGS },
1137 { (char *)"V812_Set_Pattern_Inhibit", _wrap_V812_Set_Pattern_Inhibit, METH_VARARGS },
1138 { (char *)"V812_Set_Pattern_Inhibit_Hex", _wrap_V812_Set_Pattern_Inhibit_Hex, METH_VARARGS },
1139 { (char *)"V812_Set_Output_Width", _wrap_V812_Set_Output_Width, METH_VARARGS },
1140 { (char *)"V812_Set_Dead_Time", _wrap_V812_Set_Dead_Time, METH_VARARGS },
1141 { (char *)"V812_Set_Majority_Level", _wrap_V812_Set_Majority_Level, METH_VARARGS },
1142 { (char *)"V812_Set_Majority_Threshold", _wrap_V812_Set_Majority_Threshold, METH_VARARGS },
1143 { (char *)"V812_Test_Pulse", _wrap_V812_Test_Pulse, METH_VARARGS },
1144 { (char *)"V812_Print_Info", _wrap_V812_Print_Info, METH_VARARGS },
1145 { (char *)"V812_Close", _wrap_V812_Close, METH_VARARGS },
1146 { NULL, NULL }
1147};
1148
1149
1150/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
1151
1152static swig_type_info _swigt__p_VME_ErrorCode_t[] = {{"_p_VME_ErrorCode_t", 0, "VME_ErrorCode_t *", 0},{"_p_VME_ErrorCode_t"},{0}};
1153static swig_type_info _swigt__p_char[] = {{"_p_char", 0, "char *", 0},{"_p_char"},{0}};
1154
1155static swig_type_info *swig_types_initial[] = {
1156_swigt__p_VME_ErrorCode_t,
1157_swigt__p_char,
11580
1159};
1160
1161
1162/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
1163
1164static swig_const_info swig_const_table[] = {
1165{0}};
1166
1167#ifdef __cplusplus
1168}
1169#endif
1170
1171#ifdef __cplusplus
1172extern "C"
1173#endif
1174SWIGEXPORT(void) SWIG_init(void) {
1175 static PyObject *SWIG_globals = 0;
1176 static int typeinit = 0;
1177 PyObject *m, *d;
1178 int i;
1179 if (!SWIG_globals) SWIG_globals = SWIG_newvarlink();
1180 m = Py_InitModule((char *) SWIG_name, SwigMethods);
1181 d = PyModule_GetDict(m);
1182
1183 if (!typeinit) {
1184 for (i = 0; swig_types_initial[i]; i++) {
1185 swig_types[i] = SWIG_TypeRegister(swig_types_initial[i]);
1186 }
1187 typeinit = 1;
1188 }
1189 SWIG_InstallConstants(d,swig_const_table);
1190
1191}
1192
Note: See TracBrowser for help on using the repository browser.