21 #define SWIG_PYTHON_DIRECTOR_NO_VTABLE 29 #ifndef SWIGTEMPLATEDISAMBIGUATOR 30 # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) 31 # define SWIGTEMPLATEDISAMBIGUATOR template 32 # elif defined(__HP_aCC) 35 # define SWIGTEMPLATEDISAMBIGUATOR template 37 # define SWIGTEMPLATEDISAMBIGUATOR 43 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) 44 # define SWIGINLINE inline 52 # if defined(__GNUC__) 53 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) 54 # define SWIGUNUSED __attribute__ ((__unused__)) 59 # define SWIGUNUSED __attribute__ ((__unused__)) 65 #ifndef SWIG_MSC_UNSUPPRESS_4505 66 # if defined(_MSC_VER) 67 # pragma warning(disable : 4505) 71 #ifndef SWIGUNUSEDPARM 73 # define SWIGUNUSEDPARM(p) 75 # define SWIGUNUSEDPARM(p) p SWIGUNUSED 81 # define SWIGINTERN static SWIGUNUSED 85 #ifndef SWIGINTERNINLINE 86 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE 90 #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) 91 # ifndef GCC_HASCLASSVISIBILITY 92 # define GCC_HASCLASSVISIBILITY 97 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) 98 # if defined(STATIC_LINKED) 101 # define SWIGEXPORT __declspec(dllexport) 104 # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) 105 # define SWIGEXPORT __attribute__ ((visibility("default"))) 114 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) 115 # define SWIGSTDCALL __stdcall 122 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) 123 # define _CRT_SECURE_NO_DEPRECATE 127 #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) 128 # define _SCL_SECURE_NO_DEPRECATE 132 #if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES) 133 # define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0 141 #ifdef __INTEL_COMPILER 142 # pragma warning disable 592 146 #if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG) 164 #define SWIG_RUNTIME_VERSION "4" 167 #ifdef SWIG_TYPE_TABLE 168 # define SWIG_QUOTE_STRING(x) #x 169 # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) 170 # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) 172 # define SWIG_TYPE_TABLE_NAME 185 # define SWIGRUNTIME SWIGINTERN 188 #ifndef SWIGRUNTIMEINLINE 189 # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE 193 #ifndef SWIG_BUFFER_SIZE 194 # define SWIG_BUFFER_SIZE 1024 198 #define SWIG_POINTER_DISOWN 0x1 199 #define SWIG_CAST_NEW_MEMORY 0x2 202 #define SWIG_POINTER_OWN 0x1 285 #define SWIG_ERROR (-1) 286 #define SWIG_IsOK(r) (r >= 0) 287 #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) 290 #define SWIG_CASTRANKLIMIT (1 << 8) 292 #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) 294 #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) 296 #define SWIG_BADOBJ (SWIG_ERROR) 297 #define SWIG_OLDOBJ (SWIG_OK) 298 #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) 299 #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) 301 #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) 302 #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) 303 #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) 304 #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) 305 #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) 306 #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) 309 #if defined(SWIG_CASTRANK_MODE) 310 # ifndef SWIG_TypeRank 311 # define SWIG_TypeRank unsigned long 313 # ifndef SWIG_MAXCASTRANK 314 # define SWIG_MAXCASTRANK (2) 316 # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) 317 # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) 318 SWIGINTERNINLINE
int SWIG_AddCast(
int r) {
319 return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
321 SWIGINTERNINLINE
int SWIG_CheckState(
int r) {
322 return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
325 # define SWIG_AddCast(r) (r) 326 # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) 336 typedef void *(*swig_converter_func)(
void *,
int *);
343 swig_dycast_func dcast;
352 swig_converter_func converter;
377 SWIG_TypeNameComp(
const char *f1,
const char *l1,
378 const char *f2,
const char *l2) {
379 for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
380 while ((*f1 ==
' ') && (f1 != l1)) ++f1;
381 while ((*f2 ==
' ') && (f2 != l2)) ++f2;
382 if (*f1 != *f2)
return (*f1 > *f2) ? 1 : -1;
384 return (
int)((l1 - f1) - (l2 - f2));
392 SWIG_TypeCmp(
const char *nb,
const char *tb) {
394 const char* te = tb + strlen(tb);
396 while (equiv != 0 && *ne) {
397 for (nb = ne; *ne; ++ne) {
398 if (*ne ==
'|')
break;
400 equiv = SWIG_TypeNameComp(nb, ne, tb, te);
411 SWIG_TypeEquiv(
const char *nb,
const char *tb) {
412 return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
423 if (strcmp(iter->type->name, c) == 0) {
424 if (iter == ty->cast)
427 iter->prev->next = iter->next;
429 iter->next->prev = iter->prev;
430 iter->next = ty->cast;
432 if (ty->cast) ty->cast->prev = iter;
450 if (iter->type == from) {
451 if (iter == ty->cast)
454 iter->prev->next = iter->next;
456 iter->next->prev = iter->prev;
457 iter->next = ty->cast;
459 if (ty->cast) ty->cast->prev = iter;
472 SWIGRUNTIMEINLINE
void *
474 return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
483 if (!ty || !ty->dcast)
return ty;
484 while (ty && (ty->dcast)) {
485 ty = (*ty->dcast)(ptr);
494 SWIGRUNTIMEINLINE
const char *
503 SWIGRUNTIME
const char *
509 if (!type)
return NULL;
510 if (type->str != NULL) {
511 const char *last_name = type->str;
513 for (s = type->str; *s; s++)
514 if (*s ==
'|') last_name = s+1;
528 ti->clientdata = clientdata;
531 if (!cast->converter) {
533 if (!tc->clientdata) {
534 SWIG_TypeClientData(tc, clientdata);
542 SWIG_TypeClientData(ti, clientdata);
562 size_t r = iter->size - 1;
565 size_t i = (l + r) >> 1;
566 const char *iname = iter->types[i]->name;
568 int compare = strcmp(name, iname);
570 return iter->types[i];
571 }
else if (compare < 0) {
577 }
else if (compare > 0) {
586 }
while (iter != end);
604 swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
613 for (; i < iter->size; ++i) {
614 if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
615 return iter->types[i];
618 }
while (iter != end);
629 SWIG_PackData(
char *c,
void *ptr,
size_t sz) {
630 static const char hex[17] =
"0123456789abcdef";
631 const unsigned char *u = (
unsigned char *) ptr;
632 const unsigned char *eu = u + sz;
633 for (; u != eu; ++u) {
634 unsigned char uu = *u;
635 *(c++) = hex[(uu & 0xf0) >> 4];
636 *(c++) = hex[uu & 0xf];
644 SWIGRUNTIME
const char *
645 SWIG_UnpackData(
const char *c,
void *ptr,
size_t sz) {
646 unsigned char *u = (
unsigned char *) ptr;
647 const unsigned char *eu = u + sz;
648 for (; u != eu; ++u) {
651 if ((d >=
'0') && (d <=
'9'))
652 uu = ((d -
'0') << 4);
653 else if ((d >=
'a') && (d <=
'f'))
654 uu = ((d - (
'a'-10)) << 4);
658 if ((d >=
'0') && (d <=
'9'))
660 else if ((d >=
'a') && (d <=
'f'))
661 uu |= (d - (
'a'-10));
673 SWIG_PackVoidPtr(
char *buff,
void *ptr,
const char *name,
size_t bsz) {
675 if ((2*
sizeof(
void *) + 2) > bsz)
return 0;
677 r = SWIG_PackData(r,&ptr,
sizeof(
void *));
678 if (strlen(name) + 1 > (bsz - (r - buff)))
return 0;
683 SWIGRUNTIME
const char *
684 SWIG_UnpackVoidPtr(
const char *c,
void **ptr,
const char *name) {
686 if (strcmp(c,
"NULL") == 0) {
693 return SWIG_UnpackData(++c,ptr,
sizeof(
void *));
697 SWIG_PackDataName(
char *buff,
void *ptr,
size_t sz,
const char *name,
size_t bsz) {
699 size_t lname = (name ? strlen(name) : 0);
700 if ((2*sz + 2 + lname) > bsz)
return 0;
702 r = SWIG_PackData(r,ptr,sz);
704 strncpy(r,name,lname+1);
711 SWIGRUNTIME
const char *
712 SWIG_UnpackDataName(
const char *c,
void *ptr,
size_t sz,
const char *name) {
714 if (strcmp(c,
"NULL") == 0) {
721 return SWIG_UnpackData(++c,ptr,sz);
729 #define SWIG_UnknownError -1 730 #define SWIG_IOError -2 731 #define SWIG_RuntimeError -3 732 #define SWIG_IndexError -4 733 #define SWIG_TypeError -5 734 #define SWIG_DivisionByZero -6 735 #define SWIG_OverflowError -7 736 #define SWIG_SyntaxError -8 737 #define SWIG_ValueError -9 738 #define SWIG_SystemError -10 739 #define SWIG_AttributeError -11 740 #define SWIG_MemoryError -12 741 #define SWIG_NullReferenceError -13 746 #if PY_VERSION_HEX >= 0x03000000 748 #define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type) 749 #define PyInt_Check(x) PyLong_Check(x) 750 #define PyInt_AsLong(x) PyLong_AsLong(x) 751 #define PyInt_FromLong(x) PyLong_FromLong(x) 752 #define PyInt_FromSize_t(x) PyLong_FromSize_t(x) 753 #define PyString_Check(name) PyBytes_Check(name) 754 #define PyString_FromString(x) PyUnicode_FromString(x) 755 #define PyString_Format(fmt, args) PyUnicode_Format(fmt, args) 756 #define PyString_AsString(str) PyBytes_AsString(str) 757 #define PyString_Size(str) PyBytes_Size(str) 758 #define PyString_InternFromString(key) PyUnicode_InternFromString(key) 759 #define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE 760 #define PyString_AS_STRING(x) PyUnicode_AS_STRING(x) 761 #define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x) 766 # define Py_TYPE(op) ((op)->ob_type) 771 #if PY_VERSION_HEX >= 0x03000000 772 # define SWIG_Python_str_FromFormat PyUnicode_FromFormat 774 # define SWIG_Python_str_FromFormat PyString_FromFormat 782 SWIG_Python_str_AsChar(PyObject *str)
784 #if PY_VERSION_HEX >= 0x03000000 788 str = PyUnicode_AsUTF8String(str);
789 PyBytes_AsStringAndSize(str, &cstr, &len);
790 newstr = (
char *) malloc(len+1);
791 memcpy(newstr, cstr, len+1);
795 return PyString_AsString(str);
799 #if PY_VERSION_HEX >= 0x03000000 800 # define SWIG_Python_str_DelForPy3(x) free( (void*) (x) ) 802 # define SWIG_Python_str_DelForPy3(x) 807 SWIG_Python_str_FromChar(
const char *c)
809 #if PY_VERSION_HEX >= 0x03000000 810 return PyUnicode_FromString(c);
812 return PyString_FromString(c);
817 #if PY_VERSION_HEX < 0x02020000 818 # if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM) 819 # define PyOS_snprintf _snprintf 821 # define PyOS_snprintf snprintf 826 #if PY_VERSION_HEX < 0x02020000 828 #ifndef SWIG_PYBUFFER_SIZE 829 # define SWIG_PYBUFFER_SIZE 1024 833 PyString_FromFormat(
const char *fmt, ...) {
835 char buf[SWIG_PYBUFFER_SIZE * 2];
838 res = vsnprintf(buf,
sizeof(buf), fmt, ap);
840 return (res < 0 || res >= (
int)
sizeof(buf)) ? 0 : PyString_FromString(buf);
845 #if PY_VERSION_HEX < 0x01060000 846 # define PyObject_Del(op) PyMem_DEL((op)) 849 # define PyObject_DEL PyObject_Del 853 #if PY_VERSION_HEX < 0x02020000 854 # ifndef PyExc_StopIteration 855 # define PyExc_StopIteration PyExc_RuntimeError 857 # ifndef PyObject_GenericGetAttr 858 # define PyObject_GenericGetAttr 0 863 #if PY_VERSION_HEX < 0x02010000 864 # ifndef Py_NotImplemented 865 # define Py_NotImplemented PyExc_RuntimeError 870 #if PY_VERSION_HEX < 0x02010000 871 # ifndef PyString_AsStringAndSize 872 # define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;} 877 #if PY_VERSION_HEX < 0x02000000 878 # ifndef PySequence_Size 879 # define PySequence_Size PySequence_Length 884 #if PY_VERSION_HEX < 0x02030000 886 PyObject *PyBool_FromLong(
long ok)
888 PyObject *result = ok ? Py_True : Py_False;
897 #if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) 898 typedef int Py_ssize_t;
899 # define PY_SSIZE_T_MAX INT_MAX 900 # define PY_SSIZE_T_MIN INT_MIN 901 typedef inquiry lenfunc;
902 typedef intargfunc ssizeargfunc;
903 typedef intintargfunc ssizessizeargfunc;
904 typedef intobjargproc ssizeobjargproc;
905 typedef intintobjargproc ssizessizeobjargproc;
906 typedef getreadbufferproc readbufferproc;
907 typedef getwritebufferproc writebufferproc;
908 typedef getsegcountproc segcountproc;
909 typedef getcharbufferproc charbufferproc;
910 static long PyNumber_AsSsize_t (PyObject *x,
void *SWIGUNUSEDPARM(exc))
913 PyObject *i = PyNumber_Int(x);
915 result = PyInt_AsLong(i);
922 #if PY_VERSION_HEX < 0x02050000 923 #define PyInt_FromSize_t(x) PyInt_FromLong((long)x) 926 #if PY_VERSION_HEX < 0x02040000 927 #define Py_VISIT(op) \ 930 int vret = visit((op), arg); \ 937 #if PY_VERSION_HEX < 0x02030000 940 PyNumberMethods as_number;
941 PyMappingMethods as_mapping;
942 PySequenceMethods as_sequence;
943 PyBufferProcs as_buffer;
944 PyObject *name, *slots;
948 #if PY_VERSION_HEX < 0x02030000 949 typedef destructor freefunc;
952 #if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \ 953 (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \ 954 (PY_MAJOR_VERSION > 3)) 955 # define SWIGPY_USE_CAPSULE 956 # define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME) 959 #if PY_VERSION_HEX < 0x03020000 960 #define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type) 961 #define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name) 968 SWIGRUNTIME PyObject*
969 SWIG_Python_ErrorType(
int code) {
972 case SWIG_MemoryError:
973 type = PyExc_MemoryError;
976 type = PyExc_IOError;
978 case SWIG_RuntimeError:
979 type = PyExc_RuntimeError;
981 case SWIG_IndexError:
982 type = PyExc_IndexError;
985 type = PyExc_TypeError;
987 case SWIG_DivisionByZero:
988 type = PyExc_ZeroDivisionError;
990 case SWIG_OverflowError:
991 type = PyExc_OverflowError;
993 case SWIG_SyntaxError:
994 type = PyExc_SyntaxError;
996 case SWIG_ValueError:
997 type = PyExc_ValueError;
999 case SWIG_SystemError:
1000 type = PyExc_SystemError;
1002 case SWIG_AttributeError:
1003 type = PyExc_AttributeError;
1006 type = PyExc_RuntimeError;
1013 SWIG_Python_AddErrorMsg(
const char* mesg)
1016 PyObject *value = 0;
1017 PyObject *traceback = 0;
1019 if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback);
1022 PyObject *old_str = PyObject_Str(value);
1026 PyErr_Format(type,
"%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
1027 SWIG_Python_str_DelForPy3(tmp);
1031 PyErr_SetString(PyExc_RuntimeError, mesg);
1035 #if defined(SWIG_PYTHON_NO_THREADS) 1036 # if defined(SWIG_PYTHON_THREADS) 1037 # undef SWIG_PYTHON_THREADS 1040 #if defined(SWIG_PYTHON_THREADS) 1041 # if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL) 1042 # if (PY_VERSION_HEX >= 0x02030000) 1043 # define SWIG_PYTHON_USE_GIL 1046 # if defined(SWIG_PYTHON_USE_GIL) 1047 # ifndef SWIG_PYTHON_INITIALIZE_THREADS 1048 # define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads() 1051 class SWIG_Python_Thread_Block {
1053 PyGILState_STATE state;
1055 void end() {
if (status) { PyGILState_Release(state); status =
false;} }
1056 SWIG_Python_Thread_Block() : status(
true), state(PyGILState_Ensure()) {}
1057 ~SWIG_Python_Thread_Block() { end(); }
1059 class SWIG_Python_Thread_Allow {
1061 PyThreadState *save;
1063 void end() {
if (status) { PyEval_RestoreThread(save); status =
false; }}
1064 SWIG_Python_Thread_Allow() : status(
true), save(PyEval_SaveThread()) {}
1065 ~SWIG_Python_Thread_Allow() { end(); }
1067 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block 1068 # define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end() 1069 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow 1070 # define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end() 1072 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure() 1073 # define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block) 1074 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread() 1075 # define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow) 1078 # if !defined(SWIG_PYTHON_INITIALIZE_THREADS) 1079 # define SWIG_PYTHON_INITIALIZE_THREADS 1081 # if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK) 1082 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK 1084 # if !defined(SWIG_PYTHON_THREAD_END_BLOCK) 1085 # define SWIG_PYTHON_THREAD_END_BLOCK 1087 # if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW) 1088 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW 1090 # if !defined(SWIG_PYTHON_THREAD_END_ALLOW) 1091 # define SWIG_PYTHON_THREAD_END_ALLOW 1095 # define SWIG_PYTHON_INITIALIZE_THREADS 1096 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK 1097 # define SWIG_PYTHON_THREAD_END_BLOCK 1098 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW 1099 # define SWIG_PYTHON_THREAD_END_ALLOW 1115 #define SWIG_PY_POINTER 4 1116 #define SWIG_PY_BINARY 5 1133 #if PY_VERSION_HEX >= 0x03000000 1134 SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(
self), PyObject *func)
1136 return PyInstanceMethod_New(func);
1139 SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(
self), PyObject *SWIGUNUSEDPARM(func))
1162 #define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0) 1163 #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags) 1164 #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own) 1166 #ifdef SWIGPYTHON_BUILTIN 1167 #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags) 1169 #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags) 1172 #define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags) 1174 #define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty) 1175 #define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src) 1176 #define swig_owntype int 1179 #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) 1180 #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) 1183 #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags) 1184 #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags) 1187 #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type) 1188 #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0) 1191 #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) 1192 #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) 1197 #define SWIG_GetModule(clientdata) SWIG_Python_GetModule(clientdata) 1198 #define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer) 1199 #define SWIG_NewClientData(obj) SwigPyClientData_New(obj) 1201 #define SWIG_SetErrorObj SWIG_Python_SetErrorObj 1202 #define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg 1203 #define SWIG_ErrorType(code) SWIG_Python_ErrorType(code) 1204 #define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) 1205 #define SWIG_fail goto fail 1213 SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
1214 SWIG_PYTHON_THREAD_BEGIN_BLOCK;
1215 PyErr_SetObject(errtype, obj);
1217 SWIG_PYTHON_THREAD_END_BLOCK;
1221 SWIG_Python_SetErrorMsg(PyObject *errtype,
const char *msg) {
1222 SWIG_PYTHON_THREAD_BEGIN_BLOCK;
1223 PyErr_SetString(errtype, msg);
1224 SWIG_PYTHON_THREAD_END_BLOCK;
1227 #define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj) 1231 #if defined(SWIGPYTHON_BUILTIN) 1234 SwigPyBuiltin_AddPublicSymbol(PyObject *seq,
const char *key) {
1235 PyObject *s = PyString_InternFromString(key);
1236 PyList_Append(seq, s);
1241 SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface,
const char *name, PyObject *obj) {
1242 #if PY_VERSION_HEX < 0x02030000 1243 PyDict_SetItemString(d, (
char *)name, obj);
1245 PyDict_SetItemString(d, name, obj);
1248 if (public_interface)
1249 SwigPyBuiltin_AddPublicSymbol(public_interface, name);
1255 SWIG_Python_SetConstant(PyObject *d,
const char *name, PyObject *obj) {
1256 #if PY_VERSION_HEX < 0x02030000 1257 PyDict_SetItemString(d, (
char *)name, obj);
1259 PyDict_SetItemString(d, name, obj);
1268 SWIGINTERN PyObject*
1269 SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
1270 #if !defined(SWIG_PYTHON_OUTPUT_TUPLE) 1273 }
else if (result == Py_None) {
1277 if (!PyList_Check(result)) {
1278 PyObject *o2 = result;
1279 result = PyList_New(1);
1280 PyList_SetItem(result, 0, o2);
1282 PyList_Append(result,obj);
1291 }
else if (result == Py_None) {
1295 if (!PyTuple_Check(result)) {
1297 result = PyTuple_New(1);
1298 PyTuple_SET_ITEM(result, 0, o2);
1300 o3 = PyTuple_New(1);
1301 PyTuple_SET_ITEM(o3, 0, obj);
1303 result = PySequence_Concat(o2, o3);
1313 SWIGINTERN Py_ssize_t
1314 SWIG_Python_UnpackTuple(PyObject *args,
const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
1320 PyErr_Format(PyExc_TypeError,
"%s expected %s%d arguments, got none",
1321 name, (min == max ?
"" :
"at least "), (
int)min);
1325 if (!PyTuple_Check(args)) {
1326 if (min <= 1 && max >= 1) {
1329 for (i = 1; i < max; ++i) {
1334 PyErr_SetString(PyExc_SystemError,
"UnpackTuple() argument list is not a tuple");
1337 Py_ssize_t l = PyTuple_GET_SIZE(args);
1339 PyErr_Format(PyExc_TypeError,
"%s expected %s%d arguments, got %d",
1340 name, (min == max ?
"" :
"at least "), (
int)min, (
int)l);
1342 }
else if (l > max) {
1343 PyErr_Format(PyExc_TypeError,
"%s expected %s%d arguments, got %d",
1344 name, (min == max ?
"" :
"at most "), (
int)max, (
int)l);
1348 for (i = 0; i < l; ++i) {
1349 objs[i] = PyTuple_GET_ITEM(args, i);
1351 for (; l < max; ++l) {
1360 #if PY_VERSION_HEX >= 0x02020000 1361 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL); 1363 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj); 1371 #define SWIG_STATIC_POINTER(var) var 1373 #define SWIG_STATIC_POINTER(var) var = 0; if (!var) var 1381 #define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1) 1382 #define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN) 1384 #define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1) 1386 #define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2) 1387 #define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN) 1394 #if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) 1395 # ifndef SWIG_PYTHON_NO_BUILD_NONE 1396 # ifndef SWIG_PYTHON_BUILD_NONE 1397 # define SWIG_PYTHON_BUILD_NONE 1402 #ifdef SWIG_PYTHON_BUILD_NONE 1405 # define Py_None SWIG_Py_None() 1407 SWIGRUNTIMEINLINE PyObject *
1410 PyObject *none = Py_BuildValue((
char*)
"");
1414 SWIGRUNTIME PyObject *
1417 static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None();
1424 SWIGRUNTIMEINLINE PyObject *
1427 PyObject *none = Py_None;
1441 PyTypeObject *pytype;
1444 SWIGRUNTIMEINLINE
int 1448 return data ? data->implicitconv : 0;
1451 SWIGRUNTIMEINLINE PyObject *
1454 PyObject *klass = data ? data->klass : 0;
1455 return (klass ? klass : PyExc_RuntimeError);
1460 SwigPyClientData_New(PyObject* obj)
1468 Py_INCREF(data->klass);
1470 if (PyClass_Check(obj)) {
1472 data->newargs = obj;
1475 #if (PY_VERSION_HEX < 0x02020000) 1478 data->newraw = PyObject_GetAttrString(data->klass, (
char *)
"__new__");
1481 Py_INCREF(data->newraw);
1482 data->newargs = PyTuple_New(1);
1483 PyTuple_SetItem(data->newargs, 0, obj);
1485 data->newargs = obj;
1487 Py_INCREF(data->newargs);
1490 data->destroy = PyObject_GetAttrString(data->klass, (
char *)
"__swig_destroy__");
1491 if (PyErr_Occurred()) {
1495 if (data->destroy) {
1497 Py_INCREF(data->destroy);
1498 flags = PyCFunction_GET_FLAGS(data->destroy);
1500 data->delargs = !(flags & (METH_O));
1507 data->implicitconv = 0;
1515 Py_XDECREF(data->newraw);
1516 Py_XDECREF(data->newargs);
1517 Py_XDECREF(data->destroy);
1528 #ifdef SWIGPYTHON_BUILTIN 1534 #ifdef SWIGPYTHON_BUILTIN 1536 SWIGRUNTIME PyObject *
1537 SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
1542 sobj->dict = PyDict_New();
1544 Py_INCREF(sobj->dict);
1550 SWIGRUNTIME PyObject *
1553 return PyLong_FromVoidPtr(v->ptr);
1556 SWIGRUNTIME PyObject *
1559 PyObject *res = NULL;
1560 PyObject *args = PyTuple_New(1);
1562 if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) {
1563 PyObject *ofmt = SWIG_Python_str_FromChar(fmt);
1565 #if PY_VERSION_HEX >= 0x03000000 1566 res = PyUnicode_Format(ofmt,args);
1568 res = PyString_Format(ofmt,args);
1578 SWIGRUNTIME PyObject *
1581 return SwigPyObject_format(
"%o",v);
1584 SWIGRUNTIME PyObject *
1587 return SwigPyObject_format(
"%x",v);
1590 SWIGRUNTIME PyObject *
1597 const char *name = SWIG_TypePrettyName(v->ty);
1598 PyObject *repr = SWIG_Python_str_FromFormat(
"<Swig Object of type '%s' at %p>", (name ? name :
"unknown"), (
void *)v);
1601 PyObject *nrep = SwigPyObject_repr((
SwigPyObject *)v->next);
1603 PyObject *nrep = SwigPyObject_repr((
SwigPyObject *)v->next, args);
1605 # if PY_VERSION_HEX >= 0x03000000 1606 PyObject *joined = PyUnicode_Concat(repr, nrep);
1611 PyString_ConcatAndDel(&repr,nrep);
1622 return (i < j) ? -1 : ((i > j) ? 1 : 0);
1626 SWIGRUNTIME PyObject*
1630 if( op != Py_EQ && op != Py_NE ) {
1631 Py_INCREF(Py_NotImplemented);
1632 return Py_NotImplemented;
1634 res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0);
1639 SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(
void);
1641 #ifdef SWIGPYTHON_BUILTIN 1643 SWIGRUNTIME PyTypeObject*
1644 SwigPyObject_type(
void) {
1646 assert(SwigPyObject_stype);
1653 SWIGRUNTIME PyTypeObject*
1654 SwigPyObject_type(
void) {
1655 static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
1660 SWIGRUNTIMEINLINE
int 1661 SwigPyObject_Check(PyObject *op) {
1662 #ifdef SWIGPYTHON_BUILTIN 1663 PyTypeObject *target_tp = SwigPyObject_type();
1664 if (PyType_IsSubtype(op->ob_type, target_tp))
1666 return (strcmp(op->ob_type->tp_name,
"SwigPyObject") == 0);
1668 return (Py_TYPE(op) == SwigPyObject_type())
1669 || (strcmp(Py_TYPE(op)->tp_name,
"SwigPyObject") == 0);
1673 SWIGRUNTIME PyObject *
1677 SwigPyObject_dealloc(PyObject *v)
1680 PyObject *next = sobj->next;
1681 if (sobj->own == SWIG_POINTER_OWN) {
1684 PyObject *destroy = data ? data->destroy : 0;
1696 PyObject *val = NULL, *type = NULL, *tb = NULL;
1697 PyErr_Fetch(&val, &type, &tb);
1699 if (data->delargs) {
1701 PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
1702 res = SWIG_Python_CallFunctor(destroy, tmp);
1705 PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
1706 PyObject *mself = PyCFunction_GET_SELF(destroy);
1707 res = ((*meth)(mself, v));
1710 PyErr_WriteUnraisable(destroy);
1712 PyErr_Restore(val, type, tb);
1716 #if !defined(SWIG_PYTHON_SILENT_MEMLEAK) 1718 const char *name = SWIG_TypePrettyName(ty);
1719 printf(
"swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name :
"unknown"));
1727 SWIGRUNTIME PyObject*
1728 SwigPyObject_append(PyObject* v, PyObject* next)
1733 if (!PyArg_ParseTuple(next,(
char *)
"O:append", &tmp))
return NULL;
1736 if (!SwigPyObject_Check(next)) {
1737 PyErr_SetString(PyExc_TypeError,
"Attempt to append a non SwigPyObject");
1742 return SWIG_Py_Void();
1745 SWIGRUNTIME PyObject*
1747 SwigPyObject_next(PyObject* v)
1749 SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1754 Py_INCREF(sobj->next);
1757 return SWIG_Py_Void();
1761 SWIGINTERN PyObject*
1763 SwigPyObject_disown(PyObject *v)
1765 SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1770 return SWIG_Py_Void();
1773 SWIGINTERN PyObject*
1775 SwigPyObject_acquire(PyObject *v)
1777 SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1781 sobj->own = SWIG_POINTER_OWN;
1782 return SWIG_Py_Void();
1785 SWIGINTERN PyObject*
1786 SwigPyObject_own(PyObject *v, PyObject *args)
1789 #if (PY_VERSION_HEX < 0x02020000) 1790 if (!PyArg_ParseTuple(args,(
char *)
"|O:own",&val))
1791 #elif (PY_VERSION_HEX < 0x02050000) 1792 if (!PyArg_UnpackTuple(args, (
char *)
"own", 0, 1, &val))
1794 if (!PyArg_UnpackTuple(args,
"own", 0, 1, &val))
1802 PyObject *obj = PyBool_FromLong(sobj->own);
1805 if (PyObject_IsTrue(val)) {
1806 SwigPyObject_acquire(v);
1808 SwigPyObject_disown(v);
1811 if (PyObject_IsTrue(val)) {
1812 SwigPyObject_acquire(v,args);
1814 SwigPyObject_disown(v,args);
1824 swigobject_methods[] = {
1825 {(
char *)
"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (
char *)
"releases ownership of the pointer"},
1826 {(
char *)
"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (
char *)
"acquires ownership of the pointer"},
1827 {(
char *)
"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (
char *)
"returns/sets ownership of the pointer"},
1828 {(
char *)
"append", (PyCFunction)SwigPyObject_append, METH_O, (
char *)
"appends another 'this' object"},
1829 {(
char *)
"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (
char *)
"returns the next 'this' object"},
1830 {(
char *)
"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (
char *)
"returns object representation"},
1835 swigobject_methods[] = {
1836 {(
char *)
"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (
char *)
"releases ownership of the pointer"},
1837 {(
char *)
"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (
char *)
"acquires ownership of the pointer"},
1838 {(
char *)
"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (
char *)
"returns/sets ownership of the pointer"},
1839 {(
char *)
"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (
char *)
"appends another 'this' object"},
1840 {(
char *)
"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (
char *)
"returns the next 'this' object"},
1841 {(
char *)
"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (
char *)
"returns object representation"},
1846 #if PY_VERSION_HEX < 0x02020000 1847 SWIGINTERN PyObject *
1850 return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name);
1854 SWIGRUNTIME PyTypeObject*
1855 SwigPyObject_TypeOnce(
void) {
1856 static char swigobject_doc[] =
"Swig object carries a C/C++ instance pointer";
1858 static PyNumberMethods SwigPyObject_as_number = {
1863 #
if PY_VERSION_HEX < 0x03000000
1879 #
if PY_VERSION_HEX < 0x03000000
1882 (unaryfunc)SwigPyObject_long,
1883 #if PY_VERSION_HEX < 0x03000000 1884 (unaryfunc)SwigPyObject_long,
1889 #if PY_VERSION_HEX < 0x03000000 1890 (unaryfunc)SwigPyObject_oct,
1891 (unaryfunc)SwigPyObject_hex,
1893 #if PY_VERSION_HEX >= 0x03050000 1894 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
1895 #elif PY_VERSION_HEX >= 0x03000000 1896 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
1897 #elif PY_VERSION_HEX >= 0x02050000 1898 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
1899 #elif PY_VERSION_HEX >= 0x02020000 1900 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
1901 #elif PY_VERSION_HEX >= 0x02000000 1902 0,0,0,0,0,0,0,0,0,0,0
1906 static PyTypeObject swigpyobject_type;
1907 static int type_init = 0;
1909 const PyTypeObject tmp = {
1911 #if PY_VERSION_HEX >= 0x03000000 1912 PyVarObject_HEAD_INIT(NULL, 0)
1914 PyObject_HEAD_INIT(NULL)
1917 (
char *)
"SwigPyObject",
1920 (destructor)SwigPyObject_dealloc,
1922 #
if PY_VERSION_HEX < 0x02020000
1923 (getattrfunc)SwigPyObject_getattr,
1928 #if PY_VERSION_HEX >= 0x03000000 1931 (cmpfunc)SwigPyObject_compare,
1933 (reprfunc)SwigPyObject_repr,
1934 &SwigPyObject_as_number,
1940 PyObject_GenericGetAttr,
1947 (richcmpfunc)SwigPyObject_richcompare,
1949 #
if PY_VERSION_HEX >= 0x02020000
1971 #
if PY_VERSION_HEX >= 0x02030000
1974 #
if PY_VERSION_HEX >= 0x02060000
1977 #
if PY_VERSION_HEX >= 0x03040000
1984 #
if PY_VERSION_HEX >= 0x02050000
1990 swigpyobject_type = tmp;
1992 #if PY_VERSION_HEX < 0x02020000 1993 swigpyobject_type.ob_type = &PyType_Type;
1995 if (PyType_Ready(&swigpyobject_type) < 0)
1999 return &swigpyobject_type;
2002 SWIGRUNTIME PyObject *
2012 return (PyObject *)sobj;
2027 SwigPyPacked_print(
SwigPyPacked *v, FILE *fp,
int SWIGUNUSEDPARM(flags))
2029 char result[SWIG_BUFFER_SIZE];
2030 fputs(
"<Swig Packed ", fp);
2031 if (SWIG_PackDataName(result, v->pack, v->size, 0,
sizeof(result))) {
2035 fputs(v->ty->name,fp);
2040 SWIGRUNTIME PyObject *
2043 char result[SWIG_BUFFER_SIZE];
2044 if (SWIG_PackDataName(result, v->pack, v->size, 0,
sizeof(result))) {
2045 return SWIG_Python_str_FromFormat(
"<Swig Packed at %s%s>", result, v->ty->name);
2047 return SWIG_Python_str_FromFormat(
"<Swig Packed %s>", v->ty->name);
2051 SWIGRUNTIME PyObject *
2054 char result[SWIG_BUFFER_SIZE];
2055 if (SWIG_PackDataName(result, v->pack, v->size, 0,
sizeof(result))){
2056 return SWIG_Python_str_FromFormat(
"%s%s", result, v->ty->name);
2058 return SWIG_Python_str_FromChar(v->ty->name);
2067 int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
2068 return s ? s : strncmp((
char *)v->pack, (
char *)w->pack, 2*v->size);
2071 SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(
void);
2073 SWIGRUNTIME PyTypeObject*
2074 SwigPyPacked_type(
void) {
2075 static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
2079 SWIGRUNTIMEINLINE
int 2080 SwigPyPacked_Check(PyObject *op) {
2081 return ((op)->ob_type == SwigPyPacked_TypeOnce())
2082 || (strcmp((op)->ob_type->tp_name,
"SwigPyPacked") == 0);
2086 SwigPyPacked_dealloc(PyObject *v)
2088 if (SwigPyPacked_Check(v)) {
2095 SWIGRUNTIME PyTypeObject*
2096 SwigPyPacked_TypeOnce(
void) {
2097 static char swigpacked_doc[] =
"Swig object carries a C/C++ instance pointer";
2098 static PyTypeObject swigpypacked_type;
2099 static int type_init = 0;
2101 const PyTypeObject tmp = {
2103 #if PY_VERSION_HEX>=0x03000000 2104 PyVarObject_HEAD_INIT(NULL, 0)
2106 PyObject_HEAD_INIT(NULL)
2109 (
char *)
"SwigPyPacked",
2112 (destructor)SwigPyPacked_dealloc,
2113 (printfunc)SwigPyPacked_print,
2116 #if PY_VERSION_HEX>=0x03000000 2119 (cmpfunc)SwigPyPacked_compare,
2121 (reprfunc)SwigPyPacked_repr,
2127 (reprfunc)SwigPyPacked_str,
2128 PyObject_GenericGetAttr,
2137 #
if PY_VERSION_HEX >= 0x02020000
2159 #
if PY_VERSION_HEX >= 0x02030000
2162 #
if PY_VERSION_HEX >= 0x02060000
2165 #
if PY_VERSION_HEX >= 0x03040000
2172 #
if PY_VERSION_HEX >= 0x02050000
2178 swigpypacked_type = tmp;
2180 #if PY_VERSION_HEX < 0x02020000 2181 swigpypacked_type.ob_type = &PyType_Type;
2183 if (PyType_Ready(&swigpypacked_type) < 0)
2187 return &swigpypacked_type;
2190 SWIGRUNTIME PyObject *
2195 void *pack = malloc(size);
2197 memcpy(pack, ptr, size);
2202 PyObject_DEL((PyObject *) sobj);
2206 return (PyObject *) sobj;
2210 SwigPyPacked_UnpackData(PyObject *obj,
void *ptr,
size_t size)
2212 if (SwigPyPacked_Check(obj)) {
2214 if (sobj->size != size)
return 0;
2215 memcpy(ptr, sobj->pack, size);
2226 SWIGRUNTIMEINLINE PyObject *
2229 return SWIG_Python_str_FromChar(
"this");
2232 static PyObject *swig_this = NULL;
2234 SWIGRUNTIME PyObject *
2237 if (swig_this == NULL)
2238 swig_this = _SWIG_This();
2245 #if PY_VERSION_HEX>=0x03000000 2246 #define SWIG_PYTHON_SLOW_GETSET_THIS 2250 SWIG_Python_GetSwigThis(PyObject *pyobj)
2254 if (SwigPyObject_Check(pyobj))
2257 #ifdef SWIGPYTHON_BUILTIN 2259 # ifdef PyWeakref_CheckProxy 2260 if (PyWeakref_CheckProxy(pyobj)) {
2261 pyobj = PyWeakref_GET_OBJECT(pyobj);
2262 if (pyobj && SwigPyObject_Check(pyobj))
2271 #if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000)) 2272 if (PyInstance_Check(pyobj)) {
2273 obj = _PyInstance_Lookup(pyobj, SWIG_This());
2275 PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
2276 if (dictptr != NULL) {
2277 PyObject *dict = *dictptr;
2278 obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
2280 #ifdef PyWeakref_CheckProxy 2281 if (PyWeakref_CheckProxy(pyobj)) {
2282 PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
2283 return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
2286 obj = PyObject_GetAttr(pyobj,SWIG_This());
2290 if (PyErr_Occurred()) PyErr_Clear();
2296 obj = PyObject_GetAttr(pyobj,SWIG_This());
2300 if (PyErr_Occurred()) PyErr_Clear();
2304 if (obj && !SwigPyObject_Check(obj)) {
2307 return SWIG_Python_GetSwigThis(obj);
2316 SWIG_Python_AcquirePtr(PyObject *obj,
int own) {
2317 if (own == SWIG_POINTER_OWN) {
2320 int oldown = sobj->own;
2331 SWIG_Python_ConvertPtrAndOwn(PyObject *obj,
void **ptr,
swig_type_info *ty,
int flags,
int *own) {
2334 int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0;
2338 if (obj == Py_None && !implicit_conv) {
2346 sobj = SWIG_Python_GetSwigThis(obj);
2350 void *vptr = sobj->ptr;
2355 if (ptr) *ptr = vptr;
2364 *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
2365 if (newmemory == SWIG_CAST_NEW_MEMORY) {
2368 *own = *own | SWIG_CAST_NEW_MEMORY;
2375 if (ptr) *ptr = vptr;
2381 *own = *own | sobj->own;
2382 if (flags & SWIG_POINTER_DISOWN) {
2387 if (implicit_conv) {
2389 if (data && !data->implicitconv) {
2390 PyObject *klass = data->klass;
2393 data->implicitconv = 1;
2394 impconv = SWIG_Python_CallFunctor(klass, obj);
2395 data->implicitconv = 0;
2396 if (PyErr_Occurred()) {
2404 res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
2405 if (SWIG_IsOK(res)) {
2410 res = SWIG_AddCast(res);
2411 res = SWIG_AddNewMask(res);
2413 res = SWIG_AddCast(res);
2422 if (!SWIG_IsOK(res) && obj == Py_None) {
2425 if (PyErr_Occurred())
2436 SWIG_Python_ConvertFunctionPtr(PyObject *obj,
void **ptr,
swig_type_info *ty) {
2437 if (!PyCFunction_Check(obj)) {
2438 return SWIG_ConvertPtr(obj, ptr, ty, 0);
2443 const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
2444 const char *desc = doc ? strstr(doc,
"swig_ptr: ") : 0;
2446 desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
2453 *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
2468 SWIG_Python_ConvertPacked(PyObject *obj,
void *ptr,
size_t sz,
swig_type_info *ty) {
2470 if (!to)
return SWIG_ERROR;
2475 if (!tc)
return SWIG_ERROR;
2490 SWIGRUNTIME PyObject*
2493 #if (PY_VERSION_HEX >= 0x02020000) 2495 PyObject *newraw = data->newraw;
2497 inst = PyObject_Call(newraw, data->newargs, NULL);
2499 #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) 2500 PyObject **dictptr = _PyObject_GetDictPtr(inst);
2501 if (dictptr != NULL) {
2502 PyObject *dict = *dictptr;
2504 dict = PyDict_New();
2506 PyDict_SetItem(dict, SWIG_This(), swig_this);
2510 PyObject *key = SWIG_This();
2511 PyObject_SetAttr(inst, key, swig_this);
2515 #if PY_VERSION_HEX >= 0x03000000 2516 inst = ((PyTypeObject*) data->newargs)->tp_new((PyTypeObject*) data->newargs, Py_None, Py_None);
2518 PyObject_SetAttr(inst, SWIG_This(), swig_this);
2519 Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
2522 PyObject *dict = PyDict_New();
2524 PyDict_SetItem(dict, SWIG_This(), swig_this);
2525 inst = PyInstance_NewRaw(data->newargs, dict);
2532 #if (PY_VERSION_HEX >= 0x02010000) 2534 PyObject *dict = PyDict_New();
2536 PyDict_SetItem(dict, SWIG_This(), swig_this);
2537 inst = PyInstance_NewRaw(data->newargs, dict);
2540 return (PyObject *) inst;
2542 PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type);
2546 inst->in_class = (PyClassObject *)data->newargs;
2547 Py_INCREF(inst->in_class);
2548 inst->in_dict = PyDict_New();
2549 if (inst->in_dict == NULL) {
2553 #ifdef Py_TPFLAGS_HAVE_WEAKREFS 2554 inst->in_weakreflist = NULL;
2556 #ifdef Py_TPFLAGS_GC 2557 PyObject_GC_Init(inst);
2559 PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this);
2560 return (PyObject *) inst;
2566 SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
2569 #if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS) 2570 PyObject **dictptr = _PyObject_GetDictPtr(inst);
2571 if (dictptr != NULL) {
2574 dict = PyDict_New();
2577 PyDict_SetItem(dict, SWIG_This(), swig_this);
2581 dict = PyObject_GetAttrString(inst, (
char*)
"__dict__");
2582 PyDict_SetItem(dict, SWIG_This(), swig_this);
2587 SWIGINTERN PyObject *
2588 SWIG_Python_InitShadowInstance(PyObject *args) {
2590 if (!SWIG_Python_UnpackTuple(args,
"swiginit", 2, 2, obj)) {
2595 SwigPyObject_append((PyObject*) sthis, obj[1]);
2597 SWIG_Python_SetSwigThis(obj[0], obj[1]);
2599 return SWIG_Py_Void();
2605 SWIGRUNTIME PyObject *
2606 SWIG_Python_NewPointerObj(PyObject *
self,
void *ptr,
swig_type_info *type,
int flags) {
2612 return SWIG_Py_Void();
2615 own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
2616 if (clientdata && clientdata->pytype) {
2618 if (flags & SWIG_BUILTIN_TP_INIT) {
2621 PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0);
2622 while (newobj->next)
2624 newobj->next = next_self;
2626 #ifdef SWIGPYTHON_BUILTIN 2631 newobj = PyObject_New(
SwigPyObject, clientdata->pytype);
2632 #ifdef SWIGPYTHON_BUILTIN 2641 return (PyObject*) newobj;
2643 return SWIG_Py_Void();
2646 assert(!(flags & SWIG_BUILTIN_TP_INIT));
2648 robj = SwigPyObject_New(ptr, type, own);
2649 if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
2650 PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
2659 SWIGRUNTIMEINLINE PyObject *
2660 SWIG_Python_NewPackedObj(
void *ptr,
size_t sz,
swig_type_info *type) {
2661 return ptr ? SwigPyPacked_New((
void *) ptr, sz, type) : SWIG_Py_Void();
2668 #ifdef SWIG_LINK_RUNTIME 2669 void *SWIG_ReturnGlobalTypeList(
void *);
2673 SWIG_Python_GetModule(
void *SWIGUNUSEDPARM(clientdata)) {
2674 static void *type_pointer = (
void *)0;
2676 if (!type_pointer) {
2677 #ifdef SWIG_LINK_RUNTIME 2678 type_pointer = SWIG_ReturnGlobalTypeList((
void *)0);
2680 # ifdef SWIGPY_USE_CAPSULE 2681 type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
2683 type_pointer = PyCObject_Import((
char*)
"swig_runtime_data" SWIG_RUNTIME_VERSION,
2684 (
char*)
"type_pointer" SWIG_TYPE_TABLE_NAME);
2686 if (PyErr_Occurred()) {
2688 type_pointer = (
void *)0;
2695 #if PY_MAJOR_VERSION < 2 2699 PyModule_AddObject(PyObject *m,
char *name, PyObject *o)
2702 if (!PyModule_Check(m)) {
2703 PyErr_SetString(PyExc_TypeError,
"PyModule_AddObject() needs module as first arg");
2707 PyErr_SetString(PyExc_TypeError,
"PyModule_AddObject() needs non-NULL value");
2711 dict = PyModule_GetDict(m);
2714 PyErr_Format(PyExc_SystemError,
"module '%s' has no __dict__",
2715 PyModule_GetName(m));
2718 if (PyDict_SetItemString(dict, name, o))
2726 #ifdef SWIGPY_USE_CAPSULE 2727 SWIG_Python_DestroyModule(PyObject *obj)
2729 SWIG_Python_DestroyModule(
void *vptr)
2732 #ifdef SWIGPY_USE_CAPSULE 2739 for (i =0; i < swig_module->size; ++i) {
2743 if (data) SwigPyClientData_Del(data);
2746 Py_DECREF(SWIG_This());
2752 #if PY_VERSION_HEX >= 0x03000000 2754 PyObject *module = PyImport_AddModule((
char*)
"swig_runtime_data" SWIG_RUNTIME_VERSION);
2756 static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };
2757 PyObject *module = Py_InitModule((
char*)
"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
2759 #ifdef SWIGPY_USE_CAPSULE 2760 PyObject *pointer = PyCapsule_New((
void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
2761 if (pointer && module) {
2762 PyModule_AddObject(module, (
char*)
"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
2764 Py_XDECREF(pointer);
2767 PyObject *pointer = PyCObject_FromVoidPtr((
void *) swig_module, SWIG_Python_DestroyModule);
2768 if (pointer && module) {
2769 PyModule_AddObject(module, (
char*)
"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
2771 Py_XDECREF(pointer);
2777 SWIGRUNTIME PyObject *
2778 SWIG_Python_TypeCache(
void) {
2779 static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
2784 SWIG_Python_TypeQuery(
const char *type)
2786 PyObject *cache = SWIG_Python_TypeCache();
2787 PyObject *key = SWIG_Python_str_FromChar(type);
2788 PyObject *obj = PyDict_GetItem(cache, key);
2791 #ifdef SWIGPY_USE_CAPSULE 2798 descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
2800 #ifdef SWIGPY_USE_CAPSULE 2801 obj = PyCapsule_New((
void*) descriptor, NULL, NULL);
2803 obj = PyCObject_FromVoidPtr(descriptor, NULL);
2805 PyDict_SetItem(cache, key, obj);
2816 #define SWIG_POINTER_EXCEPTION 0 2817 #define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg) 2818 #define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags) 2821 SWIG_Python_AddErrMesg(
const char* mesg,
int infront)
2823 if (PyErr_Occurred()) {
2825 PyObject *value = 0;
2826 PyObject *traceback = 0;
2827 PyErr_Fetch(&type, &value, &traceback);
2830 PyObject *old_str = PyObject_Str(value);
2834 PyErr_Format(type,
"%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str));
2836 PyErr_Format(type,
"%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
2838 SWIG_Python_str_DelForPy3(tmp);
2848 SWIG_Python_ArgFail(
int argnum)
2850 if (PyErr_Occurred()) {
2853 PyOS_snprintf(mesg,
sizeof(mesg),
"argument number %d:", argnum);
2854 return SWIG_Python_AddErrMesg(mesg, 1);
2860 SWIGRUNTIMEINLINE
const char *
2861 SwigPyObject_GetDesc(PyObject *
self)
2865 return ty ? ty->str :
"";
2869 SWIG_Python_TypeError(
const char *type, PyObject *obj)
2872 #if defined(SWIG_COBJECT_TYPES) 2873 if (obj && SwigPyObject_Check(obj)) {
2874 const char *otype = (
const char *) SwigPyObject_GetDesc(obj);
2876 PyErr_Format(PyExc_TypeError,
"a '%s' is expected, 'SwigPyObject(%s)' is received",
2883 const char *otype = (obj ? obj->ob_type->tp_name : 0);
2885 PyObject *str = PyObject_Str(obj);
2886 const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0;
2888 PyErr_Format(PyExc_TypeError,
"a '%s' is expected, '%s(%s)' is received",
2890 SWIG_Python_str_DelForPy3(cstr);
2892 PyErr_Format(PyExc_TypeError,
"a '%s' is expected, '%s' is received",
2899 PyErr_Format(PyExc_TypeError,
"a '%s' is expected", type);
2901 PyErr_Format(PyExc_TypeError,
"unexpected type is received");
2908 SWIG_Python_MustGetPtr(PyObject *obj,
swig_type_info *ty,
int SWIGUNUSEDPARM(argnum),
int flags) {
2910 if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
2912 #if SWIG_POINTER_EXCEPTION 2914 SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
2915 SWIG_Python_ArgFail(argnum);
2922 #ifdef SWIGPYTHON_BUILTIN 2924 SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
2925 PyTypeObject *tp = obj->ob_type;
2927 PyObject *encoded_name;
2931 # ifdef Py_USING_UNICODE 2932 if (PyString_Check(name)) {
2933 name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
2936 }
else if (!PyUnicode_Check(name))
2938 if (!PyString_Check(name))
2941 PyErr_Format(PyExc_TypeError,
"attribute name must be string, not '%.200s'", name->ob_type->tp_name);
2948 if (PyType_Ready(tp) < 0)
2952 descr = _PyType_Lookup(tp, name);
2955 f = descr->ob_type->tp_descr_set;
2957 if (PyString_Check(name)) {
2958 encoded_name = name;
2961 encoded_name = PyUnicode_AsUTF8String(name);
2963 PyErr_Format(PyExc_AttributeError,
"'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name));
2964 Py_DECREF(encoded_name);
2966 res = f(descr, obj, value);
2982 #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) 2984 #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else 2990 #define SWIGTYPE_p_MspIdent swig_types[0] 2991 #define SWIGTYPE_p_char swig_types[1] 2992 #define SWIGTYPE_p_int swig_types[2] 2993 #define SWIGTYPE_p_unsigned_char swig_types[3] 2994 #define SWIGTYPE_p_unsigned_int swig_types[4] 2995 #define SWIGTYPE_p_unsigned_long swig_types[5] 2996 #define SWIGTYPE_p_unsigned_short swig_types[6] 2999 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) 3000 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) 3004 #if (PY_VERSION_HEX <= 0x02000000) 3005 # if !defined(SWIG_PYTHON_CLASSIC) 3006 # error "This python version requires swig to be run with the '-classic' option" 3013 #if PY_VERSION_HEX >= 0x03000000 3014 # define SWIG_init PyInit__ImuMspMsgs 3017 # define SWIG_init init_ImuMspMsgs 3020 #define SWIG_name "_ImuMspMsgs" 3022 #define SWIGVERSION 0x030008 3023 #define SWIG_VERSION SWIGVERSION 3026 #define SWIG_as_voidptr(a) (void *)((const void *)(a)) 3027 #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a)) 3031 #include "rnr/rnrconfig.h" 3036 SWIGINTERNINLINE PyObject*
3037 SWIG_From_int (
int value)
3039 return PyInt_FromLong((
long) value);
3044 SWIG_pchar_descriptor(
void)
3046 static int init = 0;
3049 info = SWIG_TypeQuery(
"_p_char");
3056 SWIGINTERNINLINE PyObject *
3057 SWIG_FromCharPtrAndSize(
const char* carray,
size_t size)
3060 if (size > INT_MAX) {
3062 return pchar_descriptor ?
3063 SWIG_InternalNewPointerObj((
char *)(carray), pchar_descriptor, 0) : SWIG_Py_Void();
3065 #if PY_VERSION_HEX >= 0x03000000 3066 #if PY_VERSION_HEX >= 0x03010000 3067 return PyUnicode_DecodeUTF8(carray, (Py_ssize_t)(size),
"surrogateescape");
3069 return PyUnicode_FromStringAndSize(carray, (Py_ssize_t)(size));
3072 return PyString_FromStringAndSize(carray, (Py_ssize_t)(size));
3076 return SWIG_Py_Void();
3081 SWIGINTERNINLINE PyObject *
3082 SWIG_FromCharPtr(
const char *cptr)
3084 return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
3088 SWIGINTERNINLINE PyObject*
3089 SWIG_From_unsigned_SS_int (
unsigned int value)
3091 return PyInt_FromSize_t((
size_t) value);
3096 #if !defined(SWIG_NO_LLONG_MAX) 3097 # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) 3098 # define LLONG_MAX __LONG_LONG_MAX__ 3099 # define LLONG_MIN (-LLONG_MAX - 1LL) 3100 # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) 3106 SWIG_AsVal_double (PyObject *obj,
double *val)
3108 int res = SWIG_TypeError;
3109 if (PyFloat_Check(obj)) {
3110 if (val) *val = PyFloat_AsDouble(obj);
3112 #if PY_VERSION_HEX < 0x03000000 3113 }
else if (PyInt_Check(obj)) {
3114 if (val) *val = PyInt_AsLong(obj);
3117 }
else if (PyLong_Check(obj)) {
3118 double v = PyLong_AsDouble(obj);
3119 if (!PyErr_Occurred()) {
3126 #ifdef SWIG_PYTHON_CAST_MODE 3129 double d = PyFloat_AsDouble(obj);
3130 if (!PyErr_Occurred()) {
3132 return SWIG_AddCast(SWIG_OK);
3137 long v = PyLong_AsLong(obj);
3138 if (!PyErr_Occurred()) {
3140 return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
3157 SWIGINTERNINLINE
int 3158 SWIG_CanCastAsInteger(
double *d,
double min,
double max) {
3160 if ((min <= x && x <= max)) {
3161 double fx = floor(x);
3162 double cx = ceil(x);
3163 double rd = ((x - fx) < 0.5) ? fx : cx;
3164 if ((errno == EDOM) || (errno == ERANGE)) {
3167 double summ, reps, diff;
3170 }
else if (rd > x) {
3177 if (reps < 8*DBL_EPSILON) {
3188 SWIG_AsVal_unsigned_SS_long (PyObject *obj,
unsigned long *val)
3190 #if PY_VERSION_HEX < 0x03000000 3191 if (PyInt_Check(obj)) {
3192 long v = PyInt_AsLong(obj);
3197 return SWIG_OverflowError;
3201 if (PyLong_Check(obj)) {
3202 unsigned long v = PyLong_AsUnsignedLong(obj);
3203 if (!PyErr_Occurred()) {
3208 return SWIG_OverflowError;
3211 #ifdef SWIG_PYTHON_CAST_MODE 3214 unsigned long v = PyLong_AsUnsignedLong(obj);
3215 if (!PyErr_Occurred()) {
3217 return SWIG_AddCast(SWIG_OK);
3223 int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
3224 if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) {
3225 if (val) *val = (
unsigned long)(d);
3231 return SWIG_TypeError;
3236 SWIG_AsVal_unsigned_SS_int (PyObject * obj,
unsigned int *val)
3239 int res = SWIG_AsVal_unsigned_SS_long (obj, &v);
3240 if (SWIG_IsOK(res)) {
3241 if ((v > UINT_MAX)) {
3242 return SWIG_OverflowError;
3244 if (val) *val = (
unsigned int)(v);
3251 #define SWIG_From_double PyFloat_FromDouble 3258 SWIGINTERN PyObject *X_swigconstant(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
3261 if (!PyArg_ParseTuple(args,(
char*)
"O:swigconstant", &module))
return NULL;
3262 d = PyModule_GetDict(module);
3263 if (!d)
return NULL;
3264 SWIG_Python_SetConstant(d,
"X",SWIG_From_int((
int)(X)));
3265 return SWIG_Py_Void();
3269 SWIGINTERN PyObject *Y_swigconstant(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
3272 if (!PyArg_ParseTuple(args,(
char*)
"O:swigconstant", &module))
return NULL;
3273 d = PyModule_GetDict(module);
3274 if (!d)
return NULL;
3275 SWIG_Python_SetConstant(d,
"Y",SWIG_From_int((
int)(Y)));
3276 return SWIG_Py_Void();
3280 SWIGINTERN PyObject *Z_swigconstant(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
3283 if (!PyArg_ParseTuple(args,(
char*)
"O:swigconstant", &module))
return NULL;
3284 d = PyModule_GetDict(module);
3285 if (!d)
return NULL;
3286 SWIG_Python_SetConstant(d,
"Z",SWIG_From_int((
int)(Z)));
3287 return SWIG_Py_Void();
3291 SWIGINTERN PyObject *NumOfAxes_swigconstant(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
3294 if (!PyArg_ParseTuple(args,(
char*)
"O:swigconstant", &module))
return NULL;
3295 d = PyModule_GetDict(module);
3296 if (!d)
return NULL;
3297 SWIG_Python_SetConstant(d,
"NumOfAxes",SWIG_From_int((
int)(3)));
3298 return SWIG_Py_Void();
3302 SWIGINTERN PyObject *ROLL_swigconstant(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
3305 if (!PyArg_ParseTuple(args,(
char*)
"O:swigconstant", &module))
return NULL;
3306 d = PyModule_GetDict(module);
3307 if (!d)
return NULL;
3308 SWIG_Python_SetConstant(d,
"ROLL",SWIG_From_int((
int)(ROLL)));
3309 return SWIG_Py_Void();
3313 SWIGINTERN PyObject *PITCH_swigconstant(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
3316 if (!PyArg_ParseTuple(args,(
char*)
"O:swigconstant", &module))
return NULL;
3317 d = PyModule_GetDict(module);
3318 if (!d)
return NULL;
3319 SWIG_Python_SetConstant(d,
"PITCH",SWIG_From_int((
int)(PITCH)));
3320 return SWIG_Py_Void();
3324 SWIGINTERN PyObject *YAW_swigconstant(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
3327 if (!PyArg_ParseTuple(args,(
char*)
"O:swigconstant", &module))
return NULL;
3328 d = PyModule_GetDict(module);
3329 if (!d)
return NULL;
3330 SWIG_Python_SetConstant(d,
"YAW",SWIG_From_int((
int)(YAW)));
3331 return SWIG_Py_Void();
3335 SWIGINTERN PyObject *MspPreamble_swigconstant(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
3338 if (!PyArg_ParseTuple(args,(
char*)
"O:swigconstant", &module))
return NULL;
3339 d = PyModule_GetDict(module);
3340 if (!d)
return NULL;
3341 SWIG_Python_SetConstant(d,
"MspPreamble",SWIG_FromCharPtr(
"$M"));
3342 return SWIG_Py_Void();
3346 SWIGINTERN PyObject *MspDirTo_swigconstant(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
3349 if (!PyArg_ParseTuple(args,(
char*)
"O:swigconstant", &module))
return NULL;
3350 d = PyModule_GetDict(module);
3351 if (!d)
return NULL;
3352 SWIG_Python_SetConstant(d,
"MspDirTo",SWIG_FromCharPtr(
"<"));
3353 return SWIG_Py_Void();
3357 SWIGINTERN PyObject *MspDirFrom_swigconstant(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
3360 if (!PyArg_ParseTuple(args,(
char*)
"O:swigconstant", &module))
return NULL;
3361 d = PyModule_GetDict(module);
3362 if (!d)
return NULL;
3363 SWIG_Python_SetConstant(d,
"MspDirFrom",SWIG_FromCharPtr(
">"));
3364 return SWIG_Py_Void();
3368 SWIGINTERN PyObject *MspCmdPreamble_swigconstant(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
3371 if (!PyArg_ParseTuple(args,(
char*)
"O:swigconstant", &module))
return NULL;
3372 d = PyModule_GetDict(module);
3373 if (!d)
return NULL;
3374 SWIG_Python_SetConstant(d,
"MspCmdPreamble",SWIG_FromCharPtr(
"$M<"));
3375 return SWIG_Py_Void();
3379 SWIGINTERN PyObject *MspRspPreamble_swigconstant(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
3382 if (!PyArg_ParseTuple(args,(
char*)
"O:swigconstant", &module))
return NULL;
3383 d = PyModule_GetDict(module);
3384 if (!d)
return NULL;
3385 SWIG_Python_SetConstant(d,
"MspRspPreamble",SWIG_FromCharPtr(
"$M>"));
3386 return SWIG_Py_Void();
3390 SWIGINTERN PyObject *MspFieldPosDir_swigconstant(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
3393 if (!PyArg_ParseTuple(args,(
char*)
"O:swigconstant", &module))
return NULL;
3394 d = PyModule_GetDict(module);
3395 if (!d)
return NULL;
3396 SWIG_Python_SetConstant(d,
"MspFieldPosDir",SWIG_From_int((
int)(3)));
3397 return SWIG_Py_Void();
3401 SWIGINTERN PyObject *MspFieldPosSize_swigconstant(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
3404 if (!PyArg_ParseTuple(args,(
char*)
"O:swigconstant", &module))
return NULL;
3405 d = PyModule_GetDict(module);
3406 if (!d)
return NULL;
3407 SWIG_Python_SetConstant(d,
"MspFieldPosSize",SWIG_From_int((
int)(3)));
3408 return SWIG_Py_Void();
3412 SWIGINTERN PyObject *MspFieldPosCmdId_swigconstant(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
3415 if (!PyArg_ParseTuple(args,(
char*)
"O:swigconstant", &module))
return NULL;
3416 d = PyModule_GetDict(module);
3417 if (!d)
return NULL;
3418 SWIG_Python_SetConstant(d,
"MspFieldPosCmdId",SWIG_From_int((
int)(4)));
3419 return SWIG_Py_Void();
3423 SWIGINTERN PyObject *MspFieldPosDataStart_swigconstant(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
3426 if (!PyArg_ParseTuple(args,(
char*)
"O:swigconstant", &module))
return NULL;
3427 d = PyModule_GetDict(module);
3428 if (!d)
return NULL;
3429 SWIG_Python_SetConstant(d,
"MspFieldPosDataStart",SWIG_From_int((
int)(5)));
3430 return SWIG_Py_Void();
3434 SWIGINTERN PyObject *MspCmdHdrLen_swigconstant(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
3437 if (!PyArg_ParseTuple(args,(
char*)
"O:swigconstant", &module))
return NULL;
3438 d = PyModule_GetDict(module);
3439 if (!d)
return NULL;
3440 SWIG_Python_SetConstant(d,
"MspCmdHdrLen",SWIG_From_int((
int)(5)));
3441 return SWIG_Py_Void();
3445 SWIGINTERN PyObject *MspCmdMinLen_swigconstant(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
3448 if (!PyArg_ParseTuple(args,(
char*)
"O:swigconstant", &module))
return NULL;
3449 d = PyModule_GetDict(module);
3450 if (!d)
return NULL;
3451 SWIG_Python_SetConstant(d,
"MspCmdMinLen",SWIG_From_int((
int)(6)));
3452 return SWIG_Py_Void();
3456 SWIGINTERN PyObject *MspCmdMaxLen_swigconstant(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
3459 if (!PyArg_ParseTuple(args,(
char*)
"O:swigconstant", &module))
return NULL;
3460 d = PyModule_GetDict(module);
3461 if (!d)
return NULL;
3462 SWIG_Python_SetConstant(d,
"MspCmdMaxLen",SWIG_From_int((
int)(32)));
3463 return SWIG_Py_Void();
3467 SWIGINTERN PyObject *MspRspHdrLen_swigconstant(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
3470 if (!PyArg_ParseTuple(args,(
char*)
"O:swigconstant", &module))
return NULL;
3471 d = PyModule_GetDict(module);
3472 if (!d)
return NULL;
3473 SWIG_Python_SetConstant(d,
"MspRspHdrLen",SWIG_From_int((
int)(5)));
3474 return SWIG_Py_Void();
3478 SWIGINTERN PyObject *MspRspMinLen_swigconstant(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
3481 if (!PyArg_ParseTuple(args,(
char*)
"O:swigconstant", &module))
return NULL;
3482 d = PyModule_GetDict(module);
3483 if (!d)
return NULL;
3484 SWIG_Python_SetConstant(d,
"MspRspMinLen",SWIG_From_int((
int)(6)));
3485 return SWIG_Py_Void();
3489 SWIGINTERN PyObject *MspRspMaxLen_swigconstant(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
3492 if (!PyArg_ParseTuple(args,(
char*)
"O:swigconstant", &module))
return NULL;
3493 d = PyModule_GetDict(module);
3494 if (!d)
return NULL;
3495 SWIG_Python_SetConstant(d,
"MspRspMaxLen",SWIG_From_int((
int)(32)));
3496 return SWIG_Py_Void();
3500 SWIGINTERN PyObject *MspCmdIdIdent_swigconstant(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
3503 if (!PyArg_ParseTuple(args,(
char*)
"O:swigconstant", &module))
return NULL;
3504 d = PyModule_GetDict(module);
3505 if (!d)
return NULL;
3506 SWIG_Python_SetConstant(d,
"MspCmdIdIdent",SWIG_From_unsigned_SS_int((
unsigned int)(100)));
3507 return SWIG_Py_Void();
3511 SWIGINTERN PyObject *MspCmdIdRawImu_swigconstant(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
3514 if (!PyArg_ParseTuple(args,(
char*)
"O:swigconstant", &module))
return NULL;
3515 d = PyModule_GetDict(module);
3516 if (!d)
return NULL;
3517 SWIG_Python_SetConstant(d,
"MspCmdIdRawImu",SWIG_From_unsigned_SS_int((
unsigned int)(102)));
3518 return SWIG_Py_Void();
3522 SWIGINTERN PyObject *MspCmdIdAttitude_swigconstant(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
3525 if (!PyArg_ParseTuple(args,(
char*)
"O:swigconstant", &module))
return NULL;
3526 d = PyModule_GetDict(module);
3527 if (!d)
return NULL;
3528 SWIG_Python_SetConstant(d,
"MspCmdIdAttitude",SWIG_From_unsigned_SS_int((
unsigned int)(108)));
3529 return SWIG_Py_Void();
3533 SWIGINTERN PyObject *_wrap_MspIdent_m_uFwVersion_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
3534 PyObject *resultobj = 0;
3535 struct MspIdent *arg1 = (
struct MspIdent *) 0 ;
3541 PyObject * obj0 = 0 ;
3542 PyObject * obj1 = 0 ;
3544 if (!PyArg_ParseTuple(args,(
char *)
"OO:MspIdent_m_uFwVersion_set",&obj0,&obj1)) SWIG_fail;
3545 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MspIdent, 0 | 0 );
3546 if (!SWIG_IsOK(res1)) {
3547 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "MspIdent_m_uFwVersion_set" "', argument " "1"" of type '" "struct MspIdent *""'");
3549 arg1 = (
struct MspIdent *)(argp1);
3550 ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
3551 if (!SWIG_IsOK(ecode2)) {
3552 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "MspIdent_m_uFwVersion_set" "', argument " "2"" of type '" "uint_t""'");
3554 arg2 = (uint_t)(val2);
3555 if (arg1) (arg1)->m_uFwVersion = arg2;
3556 resultobj = SWIG_Py_Void();
3563 SWIGINTERN PyObject *_wrap_MspIdent_m_uFwVersion_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
3564 PyObject *resultobj = 0;
3565 struct MspIdent *arg1 = (
struct MspIdent *) 0 ;
3568 PyObject * obj0 = 0 ;
3571 if (!PyArg_ParseTuple(args,(
char *)
"O:MspIdent_m_uFwVersion_get",&obj0)) SWIG_fail;
3572 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MspIdent, 0 | 0 );
3573 if (!SWIG_IsOK(res1)) {
3574 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "MspIdent_m_uFwVersion_get" "', argument " "1"" of type '" "struct MspIdent *""'");
3576 arg1 = (
struct MspIdent *)(argp1);
3577 result = (uint_t) ((arg1)->m_uFwVersion);
3578 resultobj = SWIG_From_unsigned_SS_int((
unsigned int)(result));
3585 SWIGINTERN PyObject *_wrap_MspIdent_m_uMultiType_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
3586 PyObject *resultobj = 0;
3587 struct MspIdent *arg1 = (
struct MspIdent *) 0 ;
3593 PyObject * obj0 = 0 ;
3594 PyObject * obj1 = 0 ;
3596 if (!PyArg_ParseTuple(args,(
char *)
"OO:MspIdent_m_uMultiType_set",&obj0,&obj1)) SWIG_fail;
3597 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MspIdent, 0 | 0 );
3598 if (!SWIG_IsOK(res1)) {
3599 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "MspIdent_m_uMultiType_set" "', argument " "1"" of type '" "struct MspIdent *""'");
3601 arg1 = (
struct MspIdent *)(argp1);
3602 ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
3603 if (!SWIG_IsOK(ecode2)) {
3604 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "MspIdent_m_uMultiType_set" "', argument " "2"" of type '" "uint_t""'");
3606 arg2 = (uint_t)(val2);
3607 if (arg1) (arg1)->m_uMultiType = arg2;
3608 resultobj = SWIG_Py_Void();
3615 SWIGINTERN PyObject *_wrap_MspIdent_m_uMultiType_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
3616 PyObject *resultobj = 0;
3617 struct MspIdent *arg1 = (
struct MspIdent *) 0 ;
3620 PyObject * obj0 = 0 ;
3623 if (!PyArg_ParseTuple(args,(
char *)
"O:MspIdent_m_uMultiType_get",&obj0)) SWIG_fail;
3624 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MspIdent, 0 | 0 );
3625 if (!SWIG_IsOK(res1)) {
3626 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "MspIdent_m_uMultiType_get" "', argument " "1"" of type '" "struct MspIdent *""'");
3628 arg1 = (
struct MspIdent *)(argp1);
3629 result = (uint_t) ((arg1)->m_uMultiType);
3630 resultobj = SWIG_From_unsigned_SS_int((
unsigned int)(result));
3637 SWIGINTERN PyObject *_wrap_MspIdent_m_uMspVersion_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
3638 PyObject *resultobj = 0;
3639 struct MspIdent *arg1 = (
struct MspIdent *) 0 ;
3645 PyObject * obj0 = 0 ;
3646 PyObject * obj1 = 0 ;
3648 if (!PyArg_ParseTuple(args,(
char *)
"OO:MspIdent_m_uMspVersion_set",&obj0,&obj1)) SWIG_fail;
3649 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MspIdent, 0 | 0 );
3650 if (!SWIG_IsOK(res1)) {
3651 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "MspIdent_m_uMspVersion_set" "', argument " "1"" of type '" "struct MspIdent *""'");
3653 arg1 = (
struct MspIdent *)(argp1);
3654 ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
3655 if (!SWIG_IsOK(ecode2)) {
3656 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "MspIdent_m_uMspVersion_set" "', argument " "2"" of type '" "uint_t""'");
3658 arg2 = (uint_t)(val2);
3659 if (arg1) (arg1)->m_uMspVersion = arg2;
3660 resultobj = SWIG_Py_Void();
3667 SWIGINTERN PyObject *_wrap_MspIdent_m_uMspVersion_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
3668 PyObject *resultobj = 0;
3669 struct MspIdent *arg1 = (
struct MspIdent *) 0 ;
3672 PyObject * obj0 = 0 ;
3675 if (!PyArg_ParseTuple(args,(
char *)
"O:MspIdent_m_uMspVersion_get",&obj0)) SWIG_fail;
3676 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MspIdent, 0 | 0 );
3677 if (!SWIG_IsOK(res1)) {
3678 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "MspIdent_m_uMspVersion_get" "', argument " "1"" of type '" "struct MspIdent *""'");
3680 arg1 = (
struct MspIdent *)(argp1);
3681 result = (uint_t) ((arg1)->m_uMspVersion);
3682 resultobj = SWIG_From_unsigned_SS_int((
unsigned int)(result));
3689 SWIGINTERN PyObject *_wrap_MspIdent_m_uCaps_set(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
3690 PyObject *resultobj = 0;
3691 struct MspIdent *arg1 = (
struct MspIdent *) 0 ;
3697 PyObject * obj0 = 0 ;
3698 PyObject * obj1 = 0 ;
3700 if (!PyArg_ParseTuple(args,(
char *)
"OO:MspIdent_m_uCaps_set",&obj0,&obj1)) SWIG_fail;
3701 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MspIdent, 0 | 0 );
3702 if (!SWIG_IsOK(res1)) {
3703 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "MspIdent_m_uCaps_set" "', argument " "1"" of type '" "struct MspIdent *""'");
3705 arg1 = (
struct MspIdent *)(argp1);
3706 ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
3707 if (!SWIG_IsOK(ecode2)) {
3708 SWIG_exception_fail(SWIG_ArgError(ecode2),
"in method '" "MspIdent_m_uCaps_set" "', argument " "2"" of type '" "uint_t""'");
3710 arg2 = (uint_t)(val2);
3711 if (arg1) (arg1)->m_uCaps = arg2;
3712 resultobj = SWIG_Py_Void();
3719 SWIGINTERN PyObject *_wrap_MspIdent_m_uCaps_get(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
3720 PyObject *resultobj = 0;
3721 struct MspIdent *arg1 = (
struct MspIdent *) 0 ;
3724 PyObject * obj0 = 0 ;
3727 if (!PyArg_ParseTuple(args,(
char *)
"O:MspIdent_m_uCaps_get",&obj0)) SWIG_fail;
3728 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MspIdent, 0 | 0 );
3729 if (!SWIG_IsOK(res1)) {
3730 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "MspIdent_m_uCaps_get" "', argument " "1"" of type '" "struct MspIdent *""'");
3732 arg1 = (
struct MspIdent *)(argp1);
3733 result = (uint_t) ((arg1)->m_uCaps);
3734 resultobj = SWIG_From_unsigned_SS_int((
unsigned int)(result));
3741 SWIGINTERN PyObject *_wrap_new_MspIdent(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
3742 PyObject *resultobj = 0;
3743 struct MspIdent *result = 0 ;
3745 if (!PyArg_ParseTuple(args,(
char *)
":new_MspIdent")) SWIG_fail;
3746 result = (
struct MspIdent *)calloc(1,
sizeof(
struct MspIdent));
3747 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MspIdent, SWIG_POINTER_NEW | 0 );
3754 SWIGINTERN PyObject *_wrap_delete_MspIdent(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
3755 PyObject *resultobj = 0;
3756 struct MspIdent *arg1 = (
struct MspIdent *) 0 ;
3759 PyObject * obj0 = 0 ;
3761 if (!PyArg_ParseTuple(args,(
char *)
"O:delete_MspIdent",&obj0)) SWIG_fail;
3762 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MspIdent, SWIG_POINTER_DISOWN | 0 );
3763 if (!SWIG_IsOK(res1)) {
3764 SWIG_exception_fail(SWIG_ArgError(res1),
"in method '" "delete_MspIdent" "', argument " "1"" of type '" "struct MspIdent *""'");
3766 arg1 = (
struct MspIdent *)(argp1);
3767 free((
char *) arg1);
3768 resultobj = SWIG_Py_Void();
3775 SWIGINTERN PyObject *MspIdent_swigregister(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
3777 if (!PyArg_ParseTuple(args,(
char*)
"O:swigregister", &obj))
return NULL;
3778 SWIG_TypeNewClientData(SWIGTYPE_p_MspIdent, SWIG_NewClientData(obj));
3779 return SWIG_Py_Void();
3782 SWIGINTERN PyObject *MspGToMPerSec2_swigconstant(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
3785 if (!PyArg_ParseTuple(args,(
char*)
"O:swigconstant", &module))
return NULL;
3786 d = PyModule_GetDict(module);
3787 if (!d)
return NULL;
3788 SWIG_Python_SetConstant(d,
"MspGToMPerSec2",SWIG_From_double((
double)(9.80665)));
3789 return SWIG_Py_Void();
3793 SWIGINTERN PyObject *MspMpu6050RawToG_swigconstant(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
3796 if (!PyArg_ParseTuple(args,(
char*)
"O:swigconstant", &module))
return NULL;
3797 d = PyModule_GetDict(module);
3798 if (!d)
return NULL;
3799 SWIG_Python_SetConstant(d,
"MspMpu6050RawToG",SWIG_From_double((
double)(1.0/512.0)));
3800 return SWIG_Py_Void();
3804 SWIGINTERN PyObject *MspMpu6050RawToDegPerSec_swigconstant(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
3807 if (!PyArg_ParseTuple(args,(
char*)
"O:swigconstant", &module))
return NULL;
3808 d = PyModule_GetDict(module);
3809 if (!d)
return NULL;
3810 SWIG_Python_SetConstant(d,
"MspMpu6050RawToDegPerSec",SWIG_From_double((
double)(1.0/4.096)));
3811 return SWIG_Py_Void();
3815 SWIGINTERN PyObject *MspAttitudeRawToDeg_swigconstant(PyObject *SWIGUNUSEDPARM(
self), PyObject *args) {
3818 if (!PyArg_ParseTuple(args,(
char*)
"O:swigconstant", &module))
return NULL;
3819 d = PyModule_GetDict(module);
3820 if (!d)
return NULL;
3821 SWIG_Python_SetConstant(d,
"MspAttitudeRawToDeg",SWIG_From_double((
double)(0.1)));
3822 return SWIG_Py_Void();
3826 static PyMethodDef SwigMethods[] = {
3827 { (
char *)
"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL},
3828 { (
char *)
"X_swigconstant", X_swigconstant, METH_VARARGS, NULL},
3829 { (
char *)
"Y_swigconstant", Y_swigconstant, METH_VARARGS, NULL},
3830 { (
char *)
"Z_swigconstant", Z_swigconstant, METH_VARARGS, NULL},
3831 { (
char *)
"NumOfAxes_swigconstant", NumOfAxes_swigconstant, METH_VARARGS, NULL},
3832 { (
char *)
"ROLL_swigconstant", ROLL_swigconstant, METH_VARARGS, NULL},
3833 { (
char *)
"PITCH_swigconstant", PITCH_swigconstant, METH_VARARGS, NULL},
3834 { (
char *)
"YAW_swigconstant", YAW_swigconstant, METH_VARARGS, NULL},
3835 { (
char *)
"MspPreamble_swigconstant", MspPreamble_swigconstant, METH_VARARGS, NULL},
3836 { (
char *)
"MspDirTo_swigconstant", MspDirTo_swigconstant, METH_VARARGS, NULL},
3837 { (
char *)
"MspDirFrom_swigconstant", MspDirFrom_swigconstant, METH_VARARGS, NULL},
3838 { (
char *)
"MspCmdPreamble_swigconstant", MspCmdPreamble_swigconstant, METH_VARARGS, NULL},
3839 { (
char *)
"MspRspPreamble_swigconstant", MspRspPreamble_swigconstant, METH_VARARGS, NULL},
3840 { (
char *)
"MspFieldPosDir_swigconstant", MspFieldPosDir_swigconstant, METH_VARARGS, NULL},
3841 { (
char *)
"MspFieldPosSize_swigconstant", MspFieldPosSize_swigconstant, METH_VARARGS, NULL},
3842 { (
char *)
"MspFieldPosCmdId_swigconstant", MspFieldPosCmdId_swigconstant, METH_VARARGS, NULL},
3843 { (
char *)
"MspFieldPosDataStart_swigconstant", MspFieldPosDataStart_swigconstant, METH_VARARGS, NULL},
3844 { (
char *)
"MspCmdHdrLen_swigconstant", MspCmdHdrLen_swigconstant, METH_VARARGS, NULL},
3845 { (
char *)
"MspCmdMinLen_swigconstant", MspCmdMinLen_swigconstant, METH_VARARGS, NULL},
3846 { (
char *)
"MspCmdMaxLen_swigconstant", MspCmdMaxLen_swigconstant, METH_VARARGS, NULL},
3847 { (
char *)
"MspRspHdrLen_swigconstant", MspRspHdrLen_swigconstant, METH_VARARGS, NULL},
3848 { (
char *)
"MspRspMinLen_swigconstant", MspRspMinLen_swigconstant, METH_VARARGS, NULL},
3849 { (
char *)
"MspRspMaxLen_swigconstant", MspRspMaxLen_swigconstant, METH_VARARGS, NULL},
3850 { (
char *)
"MspCmdIdIdent_swigconstant", MspCmdIdIdent_swigconstant, METH_VARARGS, NULL},
3851 { (
char *)
"MspCmdIdRawImu_swigconstant", MspCmdIdRawImu_swigconstant, METH_VARARGS, NULL},
3852 { (
char *)
"MspCmdIdAttitude_swigconstant", MspCmdIdAttitude_swigconstant, METH_VARARGS, NULL},
3853 { (
char *)
"MspIdent_m_uFwVersion_set", _wrap_MspIdent_m_uFwVersion_set, METH_VARARGS, NULL},
3854 { (
char *)
"MspIdent_m_uFwVersion_get", _wrap_MspIdent_m_uFwVersion_get, METH_VARARGS, NULL},
3855 { (
char *)
"MspIdent_m_uMultiType_set", _wrap_MspIdent_m_uMultiType_set, METH_VARARGS, NULL},
3856 { (
char *)
"MspIdent_m_uMultiType_get", _wrap_MspIdent_m_uMultiType_get, METH_VARARGS, NULL},
3857 { (
char *)
"MspIdent_m_uMspVersion_set", _wrap_MspIdent_m_uMspVersion_set, METH_VARARGS, NULL},
3858 { (
char *)
"MspIdent_m_uMspVersion_get", _wrap_MspIdent_m_uMspVersion_get, METH_VARARGS, NULL},
3859 { (
char *)
"MspIdent_m_uCaps_set", _wrap_MspIdent_m_uCaps_set, METH_VARARGS, NULL},
3860 { (
char *)
"MspIdent_m_uCaps_get", _wrap_MspIdent_m_uCaps_get, METH_VARARGS, NULL},
3861 { (
char *)
"new_MspIdent", _wrap_new_MspIdent, METH_VARARGS, NULL},
3862 { (
char *)
"delete_MspIdent", _wrap_delete_MspIdent, METH_VARARGS, NULL},
3863 { (
char *)
"MspIdent_swigregister", MspIdent_swigregister, METH_VARARGS, NULL},
3864 { (
char *)
"MspGToMPerSec2_swigconstant", MspGToMPerSec2_swigconstant, METH_VARARGS, NULL},
3865 { (
char *)
"MspMpu6050RawToG_swigconstant", MspMpu6050RawToG_swigconstant, METH_VARARGS, NULL},
3866 { (
char *)
"MspMpu6050RawToDegPerSec_swigconstant", MspMpu6050RawToDegPerSec_swigconstant, METH_VARARGS, NULL},
3867 { (
char *)
"MspAttitudeRawToDeg_swigconstant", MspAttitudeRawToDeg_swigconstant, METH_VARARGS, NULL},
3868 { NULL, NULL, 0, NULL }
3874 static swig_type_info _swigt__p_MspIdent = {
"_p_MspIdent",
"struct MspIdent *|MspIdent *", 0, 0, (
void*)0, 0};
3875 static swig_type_info _swigt__p_char = {
"_p_char",
"char *", 0, 0, (
void*)0, 0};
3876 static swig_type_info _swigt__p_int = {
"_p_int",
"bool_t *|int *", 0, 0, (
void*)0, 0};
3877 static swig_type_info _swigt__p_unsigned_char = {
"_p_unsigned_char",
"unsigned char *|byte_t *", 0, 0, (
void*)0, 0};
3878 static swig_type_info _swigt__p_unsigned_int = {
"_p_unsigned_int",
"unsigned int *|uint_t *", 0, 0, (
void*)0, 0};
3879 static swig_type_info _swigt__p_unsigned_long = {
"_p_unsigned_long",
"unsigned long *|ulong_t *", 0, 0, (
void*)0, 0};
3880 static swig_type_info _swigt__p_unsigned_short = {
"_p_unsigned_short",
"unsigned short *|ushort_t *", 0, 0, (
void*)0, 0};
3883 &_swigt__p_MspIdent,
3886 &_swigt__p_unsigned_char,
3887 &_swigt__p_unsigned_int,
3888 &_swigt__p_unsigned_long,
3889 &_swigt__p_unsigned_short,
3892 static swig_cast_info _swigc__p_MspIdent[] = { {&_swigt__p_MspIdent, 0, 0, 0},{0, 0, 0, 0}};
3893 static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
3894 static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
3895 static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}};
3896 static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}};
3897 static swig_cast_info _swigc__p_unsigned_long[] = { {&_swigt__p_unsigned_long, 0, 0, 0},{0, 0, 0, 0}};
3898 static swig_cast_info _swigc__p_unsigned_short[] = { {&_swigt__p_unsigned_short, 0, 0, 0},{0, 0, 0, 0}};
3904 _swigc__p_unsigned_char,
3905 _swigc__p_unsigned_int,
3906 _swigc__p_unsigned_long,
3907 _swigc__p_unsigned_short,
3914 {0, 0, 0, 0.0, 0, 0}};
3968 #define SWIGRUNTIME_DEBUG 3973 SWIG_InitializeModule(
void *clientdata) {
3979 if (swig_module.next==0) {
3981 swig_module.type_initial = swig_type_initial;
3982 swig_module.cast_initial = swig_cast_initial;
3983 swig_module.next = &swig_module;
3990 module_head = SWIG_GetModule(clientdata);
3994 SWIG_SetModule(clientdata, &swig_module);
3999 if (iter==&swig_module) {
4004 }
while (iter!= module_head);
4007 swig_module.next = module_head->next;
4008 module_head->next = &swig_module;
4015 if (init == 0)
return;
4018 #ifdef SWIGRUNTIME_DEBUG 4019 printf(
"SWIG_InitializeModule: size %d\n", swig_module.size);
4021 for (i = 0; i < swig_module.size; ++i) {
4026 #ifdef SWIGRUNTIME_DEBUG 4027 printf(
"SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
4031 if (swig_module.next != &swig_module) {
4032 type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
4036 #ifdef SWIGRUNTIME_DEBUG 4037 printf(
"SWIG_InitializeModule: found type %s\n", type->name);
4039 if (swig_module.type_initial[i]->clientdata) {
4040 type->clientdata = swig_module.type_initial[i]->clientdata;
4041 #ifdef SWIGRUNTIME_DEBUG 4042 printf(
"SWIG_InitializeModule: found and overwrite type %s \n", type->name);
4046 type = swig_module.type_initial[i];
4050 cast = swig_module.cast_initial[i];
4051 while (cast->type) {
4054 #ifdef SWIGRUNTIME_DEBUG 4055 printf(
"SWIG_InitializeModule: look cast %s\n", cast->type->name);
4057 if (swig_module.next != &swig_module) {
4058 ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
4059 #ifdef SWIGRUNTIME_DEBUG 4060 if (ret) printf(
"SWIG_InitializeModule: found cast %s\n", ret->name);
4064 if (type == swig_module.type_initial[i]) {
4065 #ifdef SWIGRUNTIME_DEBUG 4066 printf(
"SWIG_InitializeModule: skip old type %s\n", ret->name);
4073 #ifdef SWIGRUNTIME_DEBUG 4074 if (ocast) printf(
"SWIG_InitializeModule: skip old cast %s\n", ret->name);
4076 if (!ocast) ret = 0;
4081 #ifdef SWIGRUNTIME_DEBUG 4082 printf(
"SWIG_InitializeModule: adding cast %s\n", cast->type->name);
4085 type->cast->prev = cast;
4086 cast->next = type->cast;
4093 swig_module.types[i] = type;
4095 swig_module.types[i] = 0;
4097 #ifdef SWIGRUNTIME_DEBUG 4098 printf(
"**** SWIG_InitializeModule: Cast List ******\n");
4099 for (i = 0; i < swig_module.size; ++i) {
4102 printf(
"SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
4103 while (cast->type) {
4104 printf(
"SWIG_InitializeModule: cast type %s\n", cast->type->name);
4108 printf(
"---- Total casts: %d\n",j);
4110 printf(
"**** SWIG_InitializeModule: Cast List ******\n");
4120 SWIG_PropagateClientData(
void) {
4123 static int init_run = 0;
4125 if (init_run)
return;
4128 for (i = 0; i < swig_module.size; i++) {
4129 if (swig_module.types[i]->clientdata) {
4130 equiv = swig_module.types[i]->cast;
4132 if (!equiv->converter) {
4133 if (equiv->type && !equiv->type->clientdata)
4134 SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
4136 equiv = equiv->next;
4157 #define SWIG_newvarlink() SWIG_Python_newvarlink() 4158 #define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr) 4159 #define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants) 4167 PyObject *(*get_attr)(void);
4168 int (*set_attr)(PyObject *);
4177 SWIGINTERN PyObject *
4179 #if PY_VERSION_HEX >= 0x03000000 4180 return PyUnicode_InternFromString(
"<Swig global variables>");
4182 return PyString_FromString(
"<Swig global variables>");
4186 SWIGINTERN PyObject *
4188 #if PY_VERSION_HEX >= 0x03000000 4189 PyObject *str = PyUnicode_InternFromString(
"(");
4193 for (var = v->vars; var; var=var->next) {
4194 tail = PyUnicode_FromString(var->name);
4195 joined = PyUnicode_Concat(str, tail);
4200 tail = PyUnicode_InternFromString(
", ");
4201 joined = PyUnicode_Concat(str, tail);
4207 tail = PyUnicode_InternFromString(
")");
4208 joined = PyUnicode_Concat(str, tail);
4213 PyObject *str = PyString_FromString(
"(");
4215 for (var = v->vars; var; var=var->next) {
4216 PyString_ConcatAndDel(&str,PyString_FromString(var->name));
4217 if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(
", "));
4219 PyString_ConcatAndDel(&str,PyString_FromString(
")"));
4227 PyObject *str = swig_varlink_str(v);
4228 fprintf(fp,
"Swig global variables ");
4229 fprintf(fp,
"%s\n", tmp = SWIG_Python_str_AsChar(str));
4230 SWIG_Python_str_DelForPy3(tmp);
4246 SWIGINTERN PyObject *
4248 PyObject *res = NULL;
4251 if (strcmp(var->name,n) == 0) {
4252 res = (*var->get_attr)();
4257 if (res == NULL && !PyErr_Occurred()) {
4258 PyErr_Format(PyExc_AttributeError,
"Unknown C global variable '%s'", n);
4268 if (strcmp(var->name,n) == 0) {
4269 res = (*var->set_attr)(p);
4274 if (res == 1 && !PyErr_Occurred()) {
4275 PyErr_Format(PyExc_AttributeError,
"Unknown C global variable '%s'", n);
4280 SWIGINTERN PyTypeObject*
4281 swig_varlink_type(
void) {
4282 static char varlink__doc__[] =
"Swig var link object";
4283 static PyTypeObject varlink_type;
4284 static int type_init = 0;
4286 const PyTypeObject tmp = {
4288 #if PY_VERSION_HEX >= 0x03000000 4289 PyVarObject_HEAD_INIT(NULL, 0)
4291 PyObject_HEAD_INIT(NULL)
4294 (
char *)
"swigvarlink",
4297 (destructor) swig_varlink_dealloc,
4298 (printfunc) swig_varlink_print,
4299 (getattrfunc) swig_varlink_getattr,
4300 (setattrfunc) swig_varlink_setattr,
4302 (reprfunc) swig_varlink_repr,
4308 (reprfunc) swig_varlink_str,
4318 #if PY_VERSION_HEX >= 0x02020000 4319 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
4321 #if PY_VERSION_HEX >= 0x02030000 4324 #if PY_VERSION_HEX >= 0x02060000 4327 #if PY_VERSION_HEX >= 0x03040000 4334 #if PY_VERSION_HEX >= 0x02050000 4342 #if PY_VERSION_HEX < 0x02020000 4343 varlink_type.ob_type = &PyType_Type;
4345 if (PyType_Ready(&varlink_type) < 0)
4349 return &varlink_type;
4353 SWIGINTERN PyObject *
4354 SWIG_Python_newvarlink(
void) {
4359 return ((PyObject*) result);
4363 SWIG_Python_addvarlink(PyObject *p,
char *name, PyObject *(*get_attr)(
void),
int (*set_attr)(PyObject *p)) {
4367 size_t size = strlen(name)+1;
4368 gv->name = (
char *)malloc(size);
4370 strncpy(gv->name,name,size);
4371 gv->get_attr = get_attr;
4372 gv->set_attr = set_attr;
4379 SWIGINTERN PyObject *
4380 SWIG_globals(
void) {
4381 static PyObject *_SWIG_globals = 0;
4382 if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink();
4383 return _SWIG_globals;
4392 SWIG_Python_InstallConstants(PyObject *d,
swig_const_info constants[]) {
4395 for (i = 0; constants[i].type; ++i) {
4396 switch(constants[i].type) {
4397 case SWIG_PY_POINTER:
4398 obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
4400 case SWIG_PY_BINARY:
4401 obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
4408 PyDict_SetItemString(d, constants[i].name, obj);
4419 SWIG_Python_FixMethods(PyMethodDef *methods,
4424 for (i = 0; methods[i].ml_name; ++i) {
4425 const char *c = methods[i].ml_doc;
4427 c = strstr(c,
"swig_ptr: ");
4431 const char *name = c + 10;
4432 for (j = 0; const_table[j].type; ++j) {
4433 if (strncmp(const_table[j].name, name,
4434 strlen(const_table[j].name)) == 0) {
4435 ci = &(const_table[j]);
4440 void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
4442 size_t shift = (ci->ptype) - types;
4444 size_t ldoc = (c - methods[i].ml_doc);
4445 size_t lptr = strlen(ty->name)+2*
sizeof(
void*)+2;
4446 char *ndoc = (
char*)malloc(ldoc + lptr + 10);
4449 strncpy(buff, methods[i].ml_doc, ldoc);
4451 strncpy(buff,
"swig_ptr: ", 10);
4453 SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
4454 methods[i].ml_doc = ndoc;
4475 #if PY_VERSION_HEX >= 0x03000000 4481 PyObject *m, *d, *md;
4482 #if PY_VERSION_HEX >= 0x03000000 4483 static struct PyModuleDef SWIG_module = {
4484 # if PY_VERSION_HEX >= 0x03020000 4485 PyModuleDef_HEAD_INIT,
4488 PyObject_HEAD_INIT(NULL)
4505 #if defined(SWIGPYTHON_BUILTIN) 4509 static PyGetSetDef this_getset_def = {
4510 (
char *)
"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
4512 static SwigPyGetSet thisown_getset_closure = {
4513 (PyCFunction) SwigPyObject_own,
4514 (PyCFunction) SwigPyObject_own
4516 static PyGetSetDef thisown_getset_def = {
4517 (
char *)
"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
4519 PyObject *metatype_args;
4520 PyTypeObject *builtin_pytype;
4521 int builtin_base_count;
4524 PyGetSetDescrObject *static_getset;
4525 PyTypeObject *metatype;
4527 PyObject *public_interface, *public_symbol;
4528 PyObject *this_descr;
4529 PyObject *thisown_descr;
4533 (void)builtin_pytype;
4534 (void)builtin_base_count;
4535 (void)builtin_basetype;
4537 (void)static_getset;
4541 metatype_args = Py_BuildValue(
"(s(O){})",
"SwigPyObjectType", &PyType_Type);
4542 assert(metatype_args);
4543 metatype = (PyTypeObject *) PyType_Type.tp_call((PyObject *) &PyType_Type, metatype_args, NULL);
4545 Py_DECREF(metatype_args);
4546 metatype->tp_setattro = (setattrofunc) &SwigPyObjectType_setattro;
4547 assert(PyType_Ready(metatype) >= 0);
4551 SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
4553 #if PY_VERSION_HEX >= 0x03000000 4554 m = PyModule_Create(&SWIG_module);
4556 m = Py_InitModule((
char *) SWIG_name, SwigMethods);
4559 md = d = PyModule_GetDict(m);
4562 SWIG_InitializeModule(0);
4564 #ifdef SWIGPYTHON_BUILTIN 4565 SwigPyObject_stype = SWIG_MangledTypeQuery(
"_p_SwigPyObject");
4566 assert(SwigPyObject_stype);
4569 SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
4570 SwigPyObject_clientdata.pytype = SwigPyObject_TypeOnce();
4571 }
else if (SwigPyObject_TypeOnce()->tp_basicsize != cd->pytype->tp_basicsize) {
4572 PyErr_SetString(PyExc_RuntimeError,
"Import error: attempted to load two incompatible swig-generated modules.");
4573 # if PY_VERSION_HEX >= 0x03000000 4581 this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
4585 thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
4586 (void)thisown_descr;
4588 public_interface = PyList_New(0);
4590 (void)public_symbol;
4592 PyDict_SetItemString(md,
"__all__", public_interface);
4593 Py_DECREF(public_interface);
4594 for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
4595 SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
4596 for (i = 0; swig_const_table[i].name != 0; ++i)
4597 SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
4600 SWIG_InstallConstants(d,swig_const_table);
4602 #if PY_VERSION_HEX >= 0x03000000
Laelaps built-in Inertial Measurement Unit class interface.