Commit d9275876 authored by Pavel Vainerman's avatar Pavel Vainerman

(python): добавил возможность в setValue() указать ID от имени

которого сохраняется датчик. По умолчанию UniSetTypes::AdminID. Перегенерировал cxx файлы (swig)
parent 229b2ff1
......@@ -14,7 +14,7 @@
Name: libuniset2
Version: 2.5
Release: alt3
Release: alt4
Summary: UniSet - library for building distributed industrial control systems
License: LGPL
......@@ -486,6 +486,9 @@ mv -f %buildroot%python_sitelibdir_noarch/* %buildroot%python_sitelibdir/%oname
# ..
%changelog
* Mon Aug 29 2016 Pavel Vainerman <pv@altlinux.ru> 2.5-alt4
- (python): add supplier ID for setValue function
* Fri Aug 26 2016 Pavel Vainerman <pv@altlinux.ru> 2.5-alt3
- update requires
......
......@@ -67,14 +67,14 @@ class UInterface():
raise UException("(getValue): Unknown interface %s"%self.utype)
def setValue(self, s_id, s_val):
def setValue(self, s_id, s_val, supplier = DefaultSupplerID ):
try:
if self.itype == "uniset":
s = to_sid(s_id,self.i)
if self.ignore_nodes == True:
s[1] = DefaultID
self.i.setValue(s[0],s_val,s[1])
self.i.setValue(s[0],s_val,s[1], supplier)
return
if self.itype == "modbus":
......
......@@ -92,7 +92,7 @@ long pyUInterface::getValue( long id )throw(UException)
}
}
//---------------------------------------------------------------------------
void pyUInterface::setValue( long id, long val )throw(UException)
void pyUInterface::setValue( long id, long val, long supplier )throw(UException)
{
auto conf = UniSetTypes::uniset_conf();
......@@ -109,7 +109,7 @@ void pyUInterface::setValue( long id, long val )throw(UException)
case UniversalIO::DO:
case UniversalIO::AI:
case UniversalIO::AO:
ui->setValue(id, val);
ui->setValue(id, val, supplier);
break;
default:
......
......@@ -28,7 +28,7 @@ namespace pyUInterface
//---------------------------------------------------------------------------
long getValue( long id )throw(UException);
void setValue( long id, long val )throw(UException);
void setValue( long id, long val, long supplier = UTypes::DefaultSupplerID )throw(UException);
long getSensorID( const std::string& name );
......@@ -37,7 +37,6 @@ namespace pyUInterface
std::string getTextName( long id );
std::string getConfFileName();
}
//---------------------------------------------------------------------------
#endif
......
......@@ -95,7 +95,7 @@ long UConnector::getValue( long id, long node )throw(UException)
}
}
//---------------------------------------------------------------------------
void UConnector::setValue( long id, long val, long node )throw(UException)
void UConnector::setValue( long id, long val, long node, long supplier )throw(UException)
{
if( !conf || !ui )
throw USysError();
......@@ -106,7 +106,7 @@ void UConnector::setValue( long id, long val, long node )throw(UException)
try
{
ui->setValue(id, val, node);
ui->setValue(id, val, node, supplier);
}
catch( UniSetTypes::Exception& ex )
{
......
......@@ -38,7 +38,7 @@ class UConnector
std::string getConfFileName();
long getValue( long id, long node )throw(UException);
void setValue( long id, long val, long node )throw(UException);
void setValue( long id, long val, long node, long supplier = UTypes::DefaultSupplerID )throw(UException);
long getSensorID( const std::string& name );
long getNodeID( const std::string& name );
......
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.7
* Version 3.0.8
*
* This file is not intended to be easily readable and contains a number of
* coding conventions designed to improve portability and efficiency. Do not make
......@@ -8,7 +8,11 @@
* interface file instead.
* ----------------------------------------------------------------------------- */
#ifndef SWIGPYTHON
#define SWIGPYTHON
#endif
#define SWIG_PYTHON_DIRECTOR_NO_VTABLE
#define SWIG_PYTHON_CLASSIC
......@@ -1326,7 +1330,7 @@ SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
/* Unpack the argument tuple */
SWIGINTERN int
SWIGINTERN Py_ssize_t
SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
{
if (!args) {
......@@ -1340,7 +1344,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi
}
if (!PyTuple_Check(args)) {
if (min <= 1 && max >= 1) {
int i;
Py_ssize_t i;
objs[0] = args;
for (i = 1; i < max; ++i) {
objs[i] = 0;
......@@ -1360,7 +1364,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi
name, (min == max ? "" : "at most "), (int)max, (int)l);
return 0;
} else {
int i;
Py_ssize_t i;
for (i = 0; i < l; ++i) {
objs[i] = PyTuple_GET_ITEM(args, i);
}
......@@ -1701,16 +1705,32 @@ SwigPyObject_dealloc(PyObject *v)
if (destroy) {
/* destroy is always a VARARGS method */
PyObject *res;
/* PyObject_CallFunction() has the potential to silently drop
the active active exception. In cases of unnamed temporary
variable or where we just finished iterating over a generator
StopIteration will be active right now, and this needs to
remain true upon return from SwigPyObject_dealloc. So save
and restore. */
PyObject *val = NULL, *type = NULL, *tb = NULL;
PyErr_Fetch(&val, &type, &tb);
if (data->delargs) {
/* we need to create a temporary object to carry the destroy operation */
PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
res = SWIG_Python_CallFunctor(destroy, tmp);
Py_DECREF(tmp);
/* we need to create a temporary object to carry the destroy operation */
PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
res = SWIG_Python_CallFunctor(destroy, tmp);
Py_DECREF(tmp);
} else {
PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
PyObject *mself = PyCFunction_GET_SELF(destroy);
res = ((*meth)(mself, v));
PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
PyObject *mself = PyCFunction_GET_SELF(destroy);
res = ((*meth)(mself, v));
}
if (!res)
PyErr_WriteUnraisable(destroy);
PyErr_Restore(val, type, tb);
Py_XDECREF(res);
}
#if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
......@@ -1734,6 +1754,7 @@ SwigPyObject_append(PyObject* v, PyObject* next)
next = tmp;
#endif
if (!SwigPyObject_Check(next)) {
PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject");
return NULL;
}
sobj->next = next;
......@@ -1889,7 +1910,9 @@ SwigPyObject_TypeOnce(void) {
(unaryfunc)SwigPyObject_oct, /*nb_oct*/
(unaryfunc)SwigPyObject_hex, /*nb_hex*/
#endif
#if PY_VERSION_HEX >= 0x03000000 /* 3.0 */
#if PY_VERSION_HEX >= 0x03050000 /* 3.5 */
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_matrix_multiply */
#elif PY_VERSION_HEX >= 0x03000000 /* 3.0 */
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
#elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
......@@ -1969,10 +1992,19 @@ SwigPyObject_TypeOnce(void) {
0, /* tp_del */
#endif
#if PY_VERSION_HEX >= 0x02060000
0, /* tp_version */
0, /* tp_version_tag */
#endif
#if PY_VERSION_HEX >= 0x03040000
0, /* tp_finalize */
#endif
#ifdef COUNT_ALLOCS
0,0,0,0 /* tp_alloc -> tp_next */
0, /* tp_allocs */
0, /* tp_frees */
0, /* tp_maxalloc */
#if PY_VERSION_HEX >= 0x02050000
0, /* tp_prev */
#endif
0 /* tp_next */
#endif
};
swigpyobject_type = tmp;
......@@ -2148,10 +2180,19 @@ SwigPyPacked_TypeOnce(void) {
0, /* tp_del */
#endif
#if PY_VERSION_HEX >= 0x02060000
0, /* tp_version */
0, /* tp_version_tag */
#endif
#if PY_VERSION_HEX >= 0x03040000
0, /* tp_finalize */
#endif
#ifdef COUNT_ALLOCS
0,0,0,0 /* tp_alloc -> tp_next */
0, /* tp_allocs */
0, /* tp_frees */
0, /* tp_maxalloc */
#if PY_VERSION_HEX >= 0x02050000
0, /* tp_prev */
#endif
0 /* tp_next */
#endif
};
swigpypacked_type = tmp;
......@@ -2679,13 +2720,11 @@ PyModule_AddObject(PyObject *m, char *name, PyObject *o)
{
PyObject *dict;
if (!PyModule_Check(m)) {
PyErr_SetString(PyExc_TypeError,
"PyModule_AddObject() needs module as first arg");
PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs module as first arg");
return SWIG_ERROR;
}
if (!o) {
PyErr_SetString(PyExc_TypeError,
"PyModule_AddObject() needs non-NULL value");
PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs non-NULL value");
return SWIG_ERROR;
}
......@@ -2998,7 +3037,7 @@ static swig_module_info swig_module = {swig_types, 5, 0, 0, 0, 0};
#endif
#define SWIG_name "_pyUConnector"
#define SWIGVERSION 0x030007
#define SWIGVERSION 0x030008
#define SWIG_VERSION SWIGVERSION
......@@ -3148,18 +3187,17 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
#else
if (*alloc == SWIG_NEWOBJ)
#endif
{
*cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1)));
*alloc = SWIG_NEWOBJ;
}
else {
{
*cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1)));
*alloc = SWIG_NEWOBJ;
} else {
*cptr = cstr;
*alloc = SWIG_OLDOBJ;
}
} else {
#if PY_VERSION_HEX>=0x03000000
assert(0); /* Should never reach here in Python 3 */
#endif
#if PY_VERSION_HEX>=0x03000000
assert(0); /* Should never reach here in Python 3 */
#endif
*cptr = SWIG_Python_str_AsChar(obj);
}
}
......@@ -3169,6 +3207,30 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
#endif
return SWIG_OK;
} else {
#if defined(SWIG_PYTHON_2_UNICODE)
#if PY_VERSION_HEX<0x03000000
if (PyUnicode_Check(obj)) {
char *cstr; Py_ssize_t len;
if (!alloc && cptr) {
return SWIG_RuntimeError;
}
obj = PyUnicode_AsUTF8String(obj);
if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) {
if (cptr) {
if (alloc) *alloc = SWIG_NEWOBJ;
*cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1)));
}
if (psize) *psize = len + 1;
Py_XDECREF(obj);
return SWIG_OK;
} else {
Py_XDECREF(obj);
}
}
#endif
#endif
swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
if (pchar_descriptor) {
void* vptr = 0;
......@@ -3211,9 +3273,11 @@ SWIG_AsVal_double (PyObject *obj, double *val)
if (PyFloat_Check(obj)) {
if (val) *val = PyFloat_AsDouble(obj);
return SWIG_OK;
#if PY_VERSION_HEX < 0x03000000
} else if (PyInt_Check(obj)) {
if (val) *val = PyInt_AsLong(obj);
return SWIG_OK;
#endif
} else if (PyLong_Check(obj)) {
double v = PyLong_AsDouble(obj);
if (!PyErr_Occurred()) {
......@@ -3287,16 +3351,20 @@ SWIG_CanCastAsInteger(double *d, double min, double max) {
SWIGINTERN int
SWIG_AsVal_long (PyObject *obj, long* val)
{
#if PY_VERSION_HEX < 0x03000000
if (PyInt_Check(obj)) {
if (val) *val = PyInt_AsLong(obj);
return SWIG_OK;
} else if (PyLong_Check(obj)) {
} else
#endif
if (PyLong_Check(obj)) {
long v = PyLong_AsLong(obj);
if (!PyErr_Occurred()) {
if (val) *val = v;
return SWIG_OK;
} else {
PyErr_Clear();
return SWIG_OverflowError;
}
}
#ifdef SWIG_PYTHON_CAST_MODE
......@@ -3381,12 +3449,12 @@ SWIG_FromCharPtrAndSize(const char* carray, size_t size)
} else {
#if PY_VERSION_HEX >= 0x03000000
#if PY_VERSION_HEX >= 0x03010000
return PyUnicode_DecodeUTF8(carray, static_cast< int >(size), "surrogateescape");
return PyUnicode_DecodeUTF8(carray, static_cast< Py_ssize_t >(size), "surrogateescape");
#else
return PyUnicode_FromStringAndSize(carray, static_cast< int >(size));
return PyUnicode_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
#endif
#else
return PyString_FromStringAndSize(carray, static_cast< int >(size));
return PyString_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
#endif
}
} else {
......@@ -3418,6 +3486,20 @@ SWIGINTERN PyObject *Swig_var_DefaultID_get(void) {
}
SWIGINTERN int Swig_var_DefaultSupplerID_set(PyObject *) {
SWIG_Error(SWIG_AttributeError,"Variable DefaultSupplerID is read-only.");
return 1;
}
SWIGINTERN PyObject *Swig_var_DefaultSupplerID_get(void) {
PyObject *pyobj = 0;
pyobj = SWIG_From_long(static_cast< long >(UTypes::DefaultSupplerID));
return pyobj;
}
SWIGINTERN PyObject *_wrap_new_Params(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
UTypes::Params *result = 0 ;
......@@ -3715,14 +3797,14 @@ fail:
SWIGINTERN PyObject *_wrap_new_UConnector(PyObject *self, PyObject *args) {
int argc;
Py_ssize_t argc;
PyObject *argv[4] = {
0
};
int ii;
Py_ssize_t ii;
if (!PyTuple_Check(args)) SWIG_fail;
argc = args ? (int)PyObject_Length(args) : 0;
argc = args ? PyObject_Length(args) : 0;
for (ii = 0; (ii < 3) && (ii < argc); ii++) {
argv[ii] = PyTuple_GET_ITEM(args,ii);
}
......@@ -3879,7 +3961,70 @@ fail:
}
SWIGINTERN PyObject *_wrap_UConnector_setValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
SWIGINTERN PyObject *_wrap_UConnector_setValue__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
UConnector *arg1 = (UConnector *) 0 ;
long arg2 ;
long arg3 ;
long arg4 ;
long arg5 ;
void *argp1 = 0 ;
int res1 = 0 ;
long val2 ;
int ecode2 = 0 ;
long val3 ;
int ecode3 = 0 ;
long val4 ;
int ecode4 = 0 ;
long val5 ;
int ecode5 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
PyObject * obj2 = 0 ;
PyObject * obj3 = 0 ;
PyObject * obj4 = 0 ;
if (!PyArg_ParseTuple(args,(char *)"OOOOO:UConnector_setValue",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UConnector, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UConnector_setValue" "', argument " "1"" of type '" "UConnector *""'");
}
arg1 = reinterpret_cast< UConnector * >(argp1);
ecode2 = SWIG_AsVal_long(obj1, &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "UConnector_setValue" "', argument " "2"" of type '" "long""'");
}
arg2 = static_cast< long >(val2);
ecode3 = SWIG_AsVal_long(obj2, &val3);
if (!SWIG_IsOK(ecode3)) {
SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "UConnector_setValue" "', argument " "3"" of type '" "long""'");
}
arg3 = static_cast< long >(val3);
ecode4 = SWIG_AsVal_long(obj3, &val4);
if (!SWIG_IsOK(ecode4)) {
SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "UConnector_setValue" "', argument " "4"" of type '" "long""'");
}
arg4 = static_cast< long >(val4);
ecode5 = SWIG_AsVal_long(obj4, &val5);
if (!SWIG_IsOK(ecode5)) {
SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "UConnector_setValue" "', argument " "5"" of type '" "long""'");
}
arg5 = static_cast< long >(val5);
try {
(arg1)->setValue(arg2,arg3,arg4,arg5);
}
catch(UException &_e) {
SWIG_Python_Raise(SWIG_NewPointerObj((new UException(static_cast< const UException& >(_e))),SWIGTYPE_p_UException,SWIG_POINTER_OWN), "UException", SWIGTYPE_p_UException); SWIG_fail;
}
resultobj = SWIG_Py_Void();
return resultobj;
fail:
return NULL;
}
SWIGINTERN PyObject *_wrap_UConnector_setValue__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
UConnector *arg1 = (UConnector *) 0 ;
long arg2 ;
......@@ -3933,6 +4078,88 @@ fail:
}
SWIGINTERN PyObject *_wrap_UConnector_setValue(PyObject *self, PyObject *args) {
Py_ssize_t argc;
PyObject *argv[6] = {
0
};
Py_ssize_t ii;
if (!PyTuple_Check(args)) SWIG_fail;
argc = args ? PyObject_Length(args) : 0;
for (ii = 0; (ii < 5) && (ii < argc); ii++) {
argv[ii] = PyTuple_GET_ITEM(args,ii);
}
if (argc == 4) {
int _v;
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UConnector, 0);
_v = SWIG_CheckState(res);
if (_v) {
{
int res = SWIG_AsVal_long(argv[1], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
{
int res = SWIG_AsVal_long(argv[2], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
{
int res = SWIG_AsVal_long(argv[3], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
return _wrap_UConnector_setValue__SWIG_1(self, args);
}
}
}
}
}
if (argc == 5) {
int _v;
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UConnector, 0);
_v = SWIG_CheckState(res);
if (_v) {
{
int res = SWIG_AsVal_long(argv[1], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
{
int res = SWIG_AsVal_long(argv[2], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
{
int res = SWIG_AsVal_long(argv[3], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
{
int res = SWIG_AsVal_long(argv[4], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
return _wrap_UConnector_setValue__SWIG_0(self, args);
}
}
}
}
}
}
fail:
SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'UConnector_setValue'.\n"
" Possible C/C++ prototypes are:\n"
" UConnector::setValue(long,long,long,long)\n"
" UConnector::setValue(long,long,long)\n");
return 0;
}
SWIGINTERN PyObject *_wrap_UConnector_getSensorID(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
UConnector *arg1 = (UConnector *) 0 ;
......@@ -4581,10 +4808,19 @@ extern "C" {
0, /* tp_del */
#endif
#if PY_VERSION_HEX >= 0x02060000
0, /* tp_version */
0, /* tp_version_tag */
#endif
#if PY_VERSION_HEX >= 0x03040000
0, /* tp_finalize */
#endif
#ifdef COUNT_ALLOCS
0,0,0,0 /* tp_alloc -> tp_next */
0, /* tp_allocs */
0, /* tp_frees */
0, /* tp_maxalloc */
#if PY_VERSION_HEX >= 0x02050000
0, /* tp_prev */
#endif
0 /* tp_next */
#endif
};
varlink_type = tmp;
......@@ -4851,6 +5087,7 @@ SWIG_init(void) {
PyDict_SetItemString(md,(char*)"cvar", SWIG_globals());
SWIG_addvarlink(SWIG_globals(),(char*)"DefaultID",Swig_var_DefaultID_get, Swig_var_DefaultID_set);
SWIG_addvarlink(SWIG_globals(),(char*)"DefaultSupplerID",Swig_var_DefaultSupplerID_get, Swig_var_DefaultSupplerID_set);
SWIG_Python_SetConstant(d, "Params_max",SWIG_From_int(static_cast< int >(UTypes::Params::max)));
#if PY_VERSION_HEX >= 0x03000000
return m;
......
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.7
* Version 3.0.8
*
* This file is not intended to be easily readable and contains a number of
* coding conventions designed to improve portability and efficiency. Do not make
......@@ -8,7 +8,11 @@
* interface file instead.
* ----------------------------------------------------------------------------- */
#ifndef SWIGPYTHON
#define SWIGPYTHON
#endif
#define SWIG_PYTHON_DIRECTOR_NO_VTABLE
#define SWIG_PYTHON_CLASSIC
......@@ -1326,7 +1330,7 @@ SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
/* Unpack the argument tuple */
SWIGINTERN int
SWIGINTERN Py_ssize_t
SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
{
if (!args) {
......@@ -1340,7 +1344,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi
}
if (!PyTuple_Check(args)) {
if (min <= 1 && max >= 1) {
int i;
Py_ssize_t i;
objs[0] = args;
for (i = 1; i < max; ++i) {
objs[i] = 0;
......@@ -1360,7 +1364,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi
name, (min == max ? "" : "at most "), (int)max, (int)l);
return 0;
} else {
int i;
Py_ssize_t i;
for (i = 0; i < l; ++i) {
objs[i] = PyTuple_GET_ITEM(args, i);
}
......@@ -1701,16 +1705,32 @@ SwigPyObject_dealloc(PyObject *v)
if (destroy) {
/* destroy is always a VARARGS method */
PyObject *res;
/* PyObject_CallFunction() has the potential to silently drop
the active active exception. In cases of unnamed temporary
variable or where we just finished iterating over a generator
StopIteration will be active right now, and this needs to
remain true upon return from SwigPyObject_dealloc. So save
and restore. */
PyObject *val = NULL, *type = NULL, *tb = NULL;
PyErr_Fetch(&val, &type, &tb);
if (data->delargs) {
/* we need to create a temporary object to carry the destroy operation */
PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
res = SWIG_Python_CallFunctor(destroy, tmp);
Py_DECREF(tmp);
/* we need to create a temporary object to carry the destroy operation */
PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
res = SWIG_Python_CallFunctor(destroy, tmp);
Py_DECREF(tmp);
} else {
PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
PyObject *mself = PyCFunction_GET_SELF(destroy);
res = ((*meth)(mself, v));
PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
PyObject *mself = PyCFunction_GET_SELF(destroy);
res = ((*meth)(mself, v));
}
if (!res)
PyErr_WriteUnraisable(destroy);
PyErr_Restore(val, type, tb);
Py_XDECREF(res);
}
#if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
......@@ -1734,6 +1754,7 @@ SwigPyObject_append(PyObject* v, PyObject* next)
next = tmp;
#endif
if (!SwigPyObject_Check(next)) {
PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject");
return NULL;
}
sobj->next = next;
......@@ -1889,7 +1910,9 @@ SwigPyObject_TypeOnce(void) {
(unaryfunc)SwigPyObject_oct, /*nb_oct*/
(unaryfunc)SwigPyObject_hex, /*nb_hex*/
#endif
#if PY_VERSION_HEX >= 0x03000000 /* 3.0 */
#if PY_VERSION_HEX >= 0x03050000 /* 3.5 */
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_matrix_multiply */
#elif PY_VERSION_HEX >= 0x03000000 /* 3.0 */
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
#elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
......@@ -1969,10 +1992,19 @@ SwigPyObject_TypeOnce(void) {
0, /* tp_del */
#endif
#if PY_VERSION_HEX >= 0x02060000
0, /* tp_version */
0, /* tp_version_tag */
#endif
#if PY_VERSION_HEX >= 0x03040000
0, /* tp_finalize */
#endif
#ifdef COUNT_ALLOCS
0,0,0,0 /* tp_alloc -> tp_next */
0, /* tp_allocs */
0, /* tp_frees */
0, /* tp_maxalloc */
#if PY_VERSION_HEX >= 0x02050000
0, /* tp_prev */
#endif
0 /* tp_next */
#endif
};
swigpyobject_type = tmp;
......@@ -2148,10 +2180,19 @@ SwigPyPacked_TypeOnce(void) {
0, /* tp_del */
#endif
#if PY_VERSION_HEX >= 0x02060000
0, /* tp_version */
0, /* tp_version_tag */
#endif
#if PY_VERSION_HEX >= 0x03040000
0, /* tp_finalize */
#endif
#ifdef COUNT_ALLOCS
0,0,0,0 /* tp_alloc -> tp_next */
0, /* tp_allocs */
0, /* tp_frees */
0, /* tp_maxalloc */
#if PY_VERSION_HEX >= 0x02050000
0, /* tp_prev */
#endif
0 /* tp_next */
#endif
};
swigpypacked_type = tmp;
......@@ -2679,13 +2720,11 @@ PyModule_AddObject(PyObject *m, char *name, PyObject *o)
{
PyObject *dict;
if (!PyModule_Check(m)) {
PyErr_SetString(PyExc_TypeError,
"PyModule_AddObject() needs module as first arg");
PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs module as first arg");
return SWIG_ERROR;
}
if (!o) {
PyErr_SetString(PyExc_TypeError,
"PyModule_AddObject() needs non-NULL value");
PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs non-NULL value");
return SWIG_ERROR;
}
......@@ -2997,7 +3036,7 @@ static swig_module_info swig_module = {swig_types, 4, 0, 0, 0, 0};
#endif
#define SWIG_name "_pyUExceptions"
#define SWIGVERSION 0x030007
#define SWIGVERSION 0x030008
#define SWIG_VERSION SWIGVERSION
......@@ -3137,18 +3176,17 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
#else
if (*alloc == SWIG_NEWOBJ)
#endif
{
*cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1)));
*alloc = SWIG_NEWOBJ;
}
else {
{
*cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1)));
*alloc = SWIG_NEWOBJ;
} else {
*cptr = cstr;
*alloc = SWIG_OLDOBJ;
}
} else {
#if PY_VERSION_HEX>=0x03000000
assert(0); /* Should never reach here in Python 3 */
#endif
#if PY_VERSION_HEX>=0x03000000
assert(0); /* Should never reach here in Python 3 */
#endif
*cptr = SWIG_Python_str_AsChar(obj);
}
}
......@@ -3158,6 +3196,30 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
#endif
return SWIG_OK;
} else {
#if defined(SWIG_PYTHON_2_UNICODE)
#if PY_VERSION_HEX<0x03000000
if (PyUnicode_Check(obj)) {
char *cstr; Py_ssize_t len;
if (!alloc && cptr) {
return SWIG_RuntimeError;
}
obj = PyUnicode_AsUTF8String(obj);
if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) {
if (cptr) {
if (alloc) *alloc = SWIG_NEWOBJ;
*cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1)));
}
if (psize) *psize = len + 1;
Py_XDECREF(obj);
return SWIG_OK;
} else {
Py_XDECREF(obj);
}
}
#endif
#endif
swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
if (pchar_descriptor) {
void* vptr = 0;
......@@ -3218,12 +3280,12 @@ SWIG_FromCharPtrAndSize(const char* carray, size_t size)
} else {
#if PY_VERSION_HEX >= 0x03000000
#if PY_VERSION_HEX >= 0x03010000
return PyUnicode_DecodeUTF8(carray, static_cast< int >(size), "surrogateescape");
return PyUnicode_DecodeUTF8(carray, static_cast< Py_ssize_t >(size), "surrogateescape");
#else
return PyUnicode_FromStringAndSize(carray, static_cast< int >(size));
return PyUnicode_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
#endif
#else
return PyString_FromStringAndSize(carray, static_cast< int >(size));
return PyString_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
#endif
}
} else {
......@@ -3309,14 +3371,14 @@ fail:
SWIGINTERN PyObject *_wrap_new_UException(PyObject *self, PyObject *args) {
int argc;
Py_ssize_t argc;
PyObject *argv[2] = {
0
};
int ii;
Py_ssize_t ii;
if (!PyTuple_Check(args)) SWIG_fail;
argc = args ? (int)PyObject_Length(args) : 0;
argc = args ? PyObject_Length(args) : 0;
for (ii = 0; (ii < 1) && (ii < argc); ii++) {
argv[ii] = PyTuple_GET_ITEM(args,ii);
}
......@@ -3502,14 +3564,14 @@ fail:
SWIGINTERN PyObject *_wrap_new_UTimeOut(PyObject *self, PyObject *args) {
int argc;
Py_ssize_t argc;
PyObject *argv[2] = {
0
};
int ii;
Py_ssize_t ii;
if (!PyTuple_Check(args)) SWIG_fail;
argc = args ? (int)PyObject_Length(args) : 0;
argc = args ? PyObject_Length(args) : 0;
for (ii = 0; (ii < 1) && (ii < argc); ii++) {
argv[ii] = PyTuple_GET_ITEM(args,ii);
}
......@@ -3605,14 +3667,14 @@ fail:
SWIGINTERN PyObject *_wrap_new_USysError(PyObject *self, PyObject *args) {
int argc;
Py_ssize_t argc;
PyObject *argv[2] = {
0
};
int ii;
Py_ssize_t ii;
if (!PyTuple_Check(args)) SWIG_fail;
argc = args ? (int)PyObject_Length(args) : 0;
argc = args ? PyObject_Length(args) : 0;
for (ii = 0; (ii < 1) && (ii < argc); ii++) {
argv[ii] = PyTuple_GET_ITEM(args,ii);
}
......@@ -4130,10 +4192,19 @@ extern "C" {
0, /* tp_del */
#endif
#if PY_VERSION_HEX >= 0x02060000
0, /* tp_version */
0, /* tp_version_tag */
#endif
#if PY_VERSION_HEX >= 0x03040000
0, /* tp_finalize */
#endif
#ifdef COUNT_ALLOCS
0,0,0,0 /* tp_alloc -> tp_next */
0, /* tp_allocs */
0, /* tp_frees */
0, /* tp_maxalloc */
#if PY_VERSION_HEX >= 0x02050000
0, /* tp_prev */
#endif
0 /* tp_next */
#endif
};
varlink_type = tmp;
......
......@@ -5,6 +5,9 @@
***********************************************************/
%module pyUniSet
%include "std_string.i"
%{
#include "PyUInterface.h"
%}
......
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.7
* Version 3.0.8
*
* This file is not intended to be easily readable and contains a number of
* coding conventions designed to improve portability and efficiency. Do not make
......@@ -8,7 +8,11 @@
* interface file instead.
* ----------------------------------------------------------------------------- */
#ifndef SWIGPYTHON
#define SWIGPYTHON
#endif
#define SWIG_PYTHON_DIRECTOR_NO_VTABLE
#define SWIG_PYTHON_CLASSIC
......@@ -1326,7 +1330,7 @@ SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
/* Unpack the argument tuple */
SWIGINTERN int
SWIGINTERN Py_ssize_t
SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
{
if (!args) {
......@@ -1340,7 +1344,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi
}
if (!PyTuple_Check(args)) {
if (min <= 1 && max >= 1) {
int i;
Py_ssize_t i;
objs[0] = args;
for (i = 1; i < max; ++i) {
objs[i] = 0;
......@@ -1360,7 +1364,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi
name, (min == max ? "" : "at most "), (int)max, (int)l);
return 0;
} else {
int i;
Py_ssize_t i;
for (i = 0; i < l; ++i) {
objs[i] = PyTuple_GET_ITEM(args, i);
}
......@@ -1701,16 +1705,32 @@ SwigPyObject_dealloc(PyObject *v)
if (destroy) {
/* destroy is always a VARARGS method */
PyObject *res;
/* PyObject_CallFunction() has the potential to silently drop
the active active exception. In cases of unnamed temporary
variable or where we just finished iterating over a generator
StopIteration will be active right now, and this needs to
remain true upon return from SwigPyObject_dealloc. So save
and restore. */
PyObject *val = NULL, *type = NULL, *tb = NULL;
PyErr_Fetch(&val, &type, &tb);
if (data->delargs) {
/* we need to create a temporary object to carry the destroy operation */
PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
res = SWIG_Python_CallFunctor(destroy, tmp);
Py_DECREF(tmp);
/* we need to create a temporary object to carry the destroy operation */
PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
res = SWIG_Python_CallFunctor(destroy, tmp);
Py_DECREF(tmp);
} else {
PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
PyObject *mself = PyCFunction_GET_SELF(destroy);
res = ((*meth)(mself, v));
PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
PyObject *mself = PyCFunction_GET_SELF(destroy);
res = ((*meth)(mself, v));
}
if (!res)
PyErr_WriteUnraisable(destroy);
PyErr_Restore(val, type, tb);
Py_XDECREF(res);
}
#if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
......@@ -1734,6 +1754,7 @@ SwigPyObject_append(PyObject* v, PyObject* next)
next = tmp;
#endif
if (!SwigPyObject_Check(next)) {
PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject");
return NULL;
}
sobj->next = next;
......@@ -1889,7 +1910,9 @@ SwigPyObject_TypeOnce(void) {
(unaryfunc)SwigPyObject_oct, /*nb_oct*/
(unaryfunc)SwigPyObject_hex, /*nb_hex*/
#endif
#if PY_VERSION_HEX >= 0x03000000 /* 3.0 */
#if PY_VERSION_HEX >= 0x03050000 /* 3.5 */
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_matrix_multiply */
#elif PY_VERSION_HEX >= 0x03000000 /* 3.0 */
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
#elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
......@@ -1969,10 +1992,19 @@ SwigPyObject_TypeOnce(void) {
0, /* tp_del */
#endif
#if PY_VERSION_HEX >= 0x02060000
0, /* tp_version */
0, /* tp_version_tag */
#endif
#if PY_VERSION_HEX >= 0x03040000
0, /* tp_finalize */
#endif
#ifdef COUNT_ALLOCS
0,0,0,0 /* tp_alloc -> tp_next */
0, /* tp_allocs */
0, /* tp_frees */
0, /* tp_maxalloc */
#if PY_VERSION_HEX >= 0x02050000
0, /* tp_prev */
#endif
0 /* tp_next */
#endif
};
swigpyobject_type = tmp;
......@@ -2148,10 +2180,19 @@ SwigPyPacked_TypeOnce(void) {
0, /* tp_del */
#endif
#if PY_VERSION_HEX >= 0x02060000
0, /* tp_version */
0, /* tp_version_tag */
#endif
#if PY_VERSION_HEX >= 0x03040000
0, /* tp_finalize */
#endif
#ifdef COUNT_ALLOCS
0,0,0,0 /* tp_alloc -> tp_next */
0, /* tp_allocs */
0, /* tp_frees */
0, /* tp_maxalloc */
#if PY_VERSION_HEX >= 0x02050000
0, /* tp_prev */
#endif
0 /* tp_next */
#endif
};
swigpypacked_type = tmp;
......@@ -2679,13 +2720,11 @@ PyModule_AddObject(PyObject *m, char *name, PyObject *o)
{
PyObject *dict;
if (!PyModule_Check(m)) {
PyErr_SetString(PyExc_TypeError,
"PyModule_AddObject() needs module as first arg");
PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs module as first arg");
return SWIG_ERROR;
}
if (!o) {
PyErr_SetString(PyExc_TypeError,
"PyModule_AddObject() needs non-NULL value");
PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs non-NULL value");
return SWIG_ERROR;
}
......@@ -2974,9 +3013,8 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
#define SWIGTYPE_p_UTypes__Params swig_types[3]
#define SWIGTYPE_p_char swig_types[4]
#define SWIGTYPE_p_p_char swig_types[5]
#define SWIGTYPE_p_std__string swig_types[6]
static swig_type_info *swig_types[8];
static swig_module_info swig_module = {swig_types, 7, 0, 0, 0, 0};
static swig_type_info *swig_types[7];
static swig_module_info swig_module = {swig_types, 6, 0, 0, 0, 0};
#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
......@@ -3000,7 +3038,7 @@ static swig_module_info swig_module = {swig_types, 7, 0, 0, 0, 0};
#endif
#define SWIG_name "_pyUniSet"
#define SWIGVERSION 0x030007
#define SWIGVERSION 0x030008
#define SWIG_VERSION SWIGVERSION
......@@ -3081,9 +3119,155 @@ namespace swig {
}
#include <string>
#include "PyUInterface.h"
SWIGINTERN swig_type_info*
SWIG_pchar_descriptor(void)
{
static int init = 0;
static swig_type_info* info = 0;
if (!init) {
info = SWIG_TypeQuery("_p_char");
init = 1;
}
return info;
}
SWIGINTERN int
SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
{
#if PY_VERSION_HEX>=0x03000000
if (PyUnicode_Check(obj))
#else
if (PyString_Check(obj))
#endif
{
char *cstr; Py_ssize_t len;
#if PY_VERSION_HEX>=0x03000000
if (!alloc && cptr) {
/* We can't allow converting without allocation, since the internal
representation of string in Python 3 is UCS-2/UCS-4 but we require
a UTF-8 representation.
TODO(bhy) More detailed explanation */
return SWIG_RuntimeError;
}
obj = PyUnicode_AsUTF8String(obj);
PyBytes_AsStringAndSize(obj, &cstr, &len);
if(alloc) *alloc = SWIG_NEWOBJ;
#else
PyString_AsStringAndSize(obj, &cstr, &len);
#endif
if (cptr) {
if (alloc) {
/*
In python the user should not be able to modify the inner
string representation. To warranty that, if you define
SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string
buffer is always returned.
The default behavior is just to return the pointer value,
so, be careful.
*/
#if defined(SWIG_PYTHON_SAFE_CSTRINGS)
if (*alloc != SWIG_OLDOBJ)
#else
if (*alloc == SWIG_NEWOBJ)
#endif
{
*cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1)));
*alloc = SWIG_NEWOBJ;
} else {
*cptr = cstr;
*alloc = SWIG_OLDOBJ;
}
} else {
#if PY_VERSION_HEX>=0x03000000
assert(0); /* Should never reach here in Python 3 */
#endif
*cptr = SWIG_Python_str_AsChar(obj);
}
}
if (psize) *psize = len + 1;
#if PY_VERSION_HEX>=0x03000000
Py_XDECREF(obj);
#endif
return SWIG_OK;
} else {
#if defined(SWIG_PYTHON_2_UNICODE)
#if PY_VERSION_HEX<0x03000000
if (PyUnicode_Check(obj)) {
char *cstr; Py_ssize_t len;
if (!alloc && cptr) {
return SWIG_RuntimeError;
}
obj = PyUnicode_AsUTF8String(obj);
if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) {
if (cptr) {
if (alloc) *alloc = SWIG_NEWOBJ;
*cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1)));
}
if (psize) *psize = len + 1;
Py_XDECREF(obj);
return SWIG_OK;
} else {
Py_XDECREF(obj);
}
}
#endif
#endif
swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
if (pchar_descriptor) {
void* vptr = 0;
if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
if (cptr) *cptr = (char *) vptr;
if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
if (alloc) *alloc = SWIG_OLDOBJ;
return SWIG_OK;
}
}
}
return SWIG_TypeError;
}
SWIGINTERN int
SWIG_AsPtr_std_string (PyObject * obj, std::string **val)
{
char* buf = 0 ; size_t size = 0; int alloc = SWIG_OLDOBJ;
if (SWIG_IsOK((SWIG_AsCharPtrAndSize(obj, &buf, &size, &alloc)))) {
if (buf) {
if (val) *val = new std::string(buf, size - 1);
if (alloc == SWIG_NEWOBJ) delete[] buf;
return SWIG_NEWOBJ;
} else {
if (val) *val = 0;
return SWIG_OLDOBJ;
}
} else {
static int init = 0;
static swig_type_info* descriptor = 0;
if (!init) {
descriptor = SWIG_TypeQuery("std::string" " *");
init = 1;
}
if (descriptor) {
std::string *vptr;
int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0);
if (SWIG_IsOK(res) && val) *val = vptr;
return res;
}
}
return SWIG_ERROR;
}
#include <limits.h>
#if !defined(SWIG_NO_LLONG_MAX)
# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
......@@ -3101,9 +3285,11 @@ SWIG_AsVal_double (PyObject *obj, double *val)
if (PyFloat_Check(obj)) {
if (val) *val = PyFloat_AsDouble(obj);
return SWIG_OK;
#if PY_VERSION_HEX < 0x03000000
} else if (PyInt_Check(obj)) {
if (val) *val = PyInt_AsLong(obj);
return SWIG_OK;
#endif
} else if (PyLong_Check(obj)) {
double v = PyLong_AsDouble(obj);
if (!PyErr_Occurred()) {
......@@ -3177,16 +3363,20 @@ SWIG_CanCastAsInteger(double *d, double min, double max) {
SWIGINTERN int
SWIG_AsVal_long (PyObject *obj, long* val)
{
#if PY_VERSION_HEX < 0x03000000
if (PyInt_Check(obj)) {
if (val) *val = PyInt_AsLong(obj);
return SWIG_OK;
} else if (PyLong_Check(obj)) {
} else
#endif
if (PyLong_Check(obj)) {
long v = PyLong_AsLong(obj);
if (!PyErr_Occurred()) {
if (val) *val = v;
return SWIG_OK;
} else {
PyErr_Clear();
return SWIG_OverflowError;
}
}
#ifdef SWIG_PYTHON_CAST_MODE
......@@ -3232,99 +3422,42 @@ SWIG_AsVal_int (PyObject * obj, int *val)
#define SWIG_From_long PyLong_FromLong
SWIGINTERNINLINE PyObject*
SWIG_From_int (int value)
SWIGINTERNINLINE PyObject *
SWIG_FromCharPtrAndSize(const char* carray, size_t size)
{
return PyInt_FromLong((long) value);
if (carray) {
if (size > INT_MAX) {
swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
return pchar_descriptor ?
SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void();
} else {
#if PY_VERSION_HEX >= 0x03000000
#if PY_VERSION_HEX >= 0x03010000
return PyUnicode_DecodeUTF8(carray, static_cast< Py_ssize_t >(size), "surrogateescape");
#else
return PyUnicode_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
#endif
#else
return PyString_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
#endif
}
} else {
return SWIG_Py_Void();
}
}
SWIGINTERN swig_type_info*
SWIG_pchar_descriptor(void)
SWIGINTERNINLINE PyObject *
SWIG_From_std_string (const std::string& s)
{
static int init = 0;
static swig_type_info* info = 0;
if (!init) {
info = SWIG_TypeQuery("_p_char");
init = 1;
}
return info;
return SWIG_FromCharPtrAndSize(s.data(), s.size());
}
SWIGINTERN int
SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
SWIGINTERNINLINE PyObject*
SWIG_From_int (int value)
{
#if PY_VERSION_HEX>=0x03000000
if (PyUnicode_Check(obj))
#else
if (PyString_Check(obj))
#endif
{
char *cstr; Py_ssize_t len;
#if PY_VERSION_HEX>=0x03000000
if (!alloc && cptr) {
/* We can't allow converting without allocation, since the internal
representation of string in Python 3 is UCS-2/UCS-4 but we require
a UTF-8 representation.
TODO(bhy) More detailed explanation */
return SWIG_RuntimeError;
}
obj = PyUnicode_AsUTF8String(obj);
PyBytes_AsStringAndSize(obj, &cstr, &len);
if(alloc) *alloc = SWIG_NEWOBJ;
#else
PyString_AsStringAndSize(obj, &cstr, &len);
#endif
if (cptr) {
if (alloc) {
/*
In python the user should not be able to modify the inner
string representation. To warranty that, if you define
SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string
buffer is always returned.
The default behavior is just to return the pointer value,
so, be careful.
*/
#if defined(SWIG_PYTHON_SAFE_CSTRINGS)
if (*alloc != SWIG_OLDOBJ)
#else
if (*alloc == SWIG_NEWOBJ)
#endif
{
*cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1)));
*alloc = SWIG_NEWOBJ;
}
else {
*cptr = cstr;
*alloc = SWIG_OLDOBJ;
}
} else {
#if PY_VERSION_HEX>=0x03000000
assert(0); /* Should never reach here in Python 3 */
#endif
*cptr = SWIG_Python_str_AsChar(obj);
}
}
if (psize) *psize = len + 1;
#if PY_VERSION_HEX>=0x03000000
Py_XDECREF(obj);
#endif
return SWIG_OK;
} else {
swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
if (pchar_descriptor) {
void* vptr = 0;
if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
if (cptr) *cptr = (char *) vptr;
if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
if (alloc) *alloc = SWIG_OLDOBJ;
return SWIG_OK;
}
}
}
return SWIG_TypeError;
return PyInt_FromLong((long) value);
}
......@@ -3346,8 +3479,7 @@ SWIGINTERN PyObject *_wrap_uniset_init_params(PyObject *SWIGUNUSEDPARM(self), Py
std::string *arg2 = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
void *argp2 = 0 ;
int res2 = 0 ;
int res2 = SWIG_OLDOBJ ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
......@@ -3357,14 +3489,17 @@ SWIGINTERN PyObject *_wrap_uniset_init_params(PyObject *SWIGUNUSEDPARM(self), Py
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "uniset_init_params" "', argument " "1"" of type '" "UTypes::Params *""'");
}
arg1 = reinterpret_cast< UTypes::Params * >(argp1);
res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__string, 0 | 0);
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "uniset_init_params" "', argument " "2"" of type '" "std::string const &""'");
}
if (!argp2) {
SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "uniset_init_params" "', argument " "2"" of type '" "std::string const &""'");
{
std::string *ptr = (std::string *)0;
res2 = SWIG_AsPtr_std_string(obj1, &ptr);
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "uniset_init_params" "', argument " "2"" of type '" "std::string const &""'");
}
if (!ptr) {
SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "uniset_init_params" "', argument " "2"" of type '" "std::string const &""'");
}
arg2 = ptr;
}
arg2 = reinterpret_cast< std::string * >(argp2);
try {
pyUInterface::uniset_init_params(arg1,(std::string const &)*arg2);
}
......@@ -3373,8 +3508,10 @@ SWIGINTERN PyObject *_wrap_uniset_init_params(PyObject *SWIGUNUSEDPARM(self), Py
}
resultobj = SWIG_Py_Void();
if (SWIG_IsNewObj(res2)) delete arg2;
return resultobj;
fail:
if (SWIG_IsNewObj(res2)) delete arg2;
return NULL;
}
......@@ -3388,8 +3525,7 @@ SWIGINTERN PyObject *_wrap_uniset_init(PyObject *SWIGUNUSEDPARM(self), PyObject
int ecode1 = 0 ;
void *argp2 = 0 ;
int res2 = 0 ;
void *argp3 = 0 ;
int res3 = 0 ;
int res3 = SWIG_OLDOBJ ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
PyObject * obj2 = 0 ;
......@@ -3405,14 +3541,17 @@ SWIGINTERN PyObject *_wrap_uniset_init(PyObject *SWIGUNUSEDPARM(self), PyObject
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "uniset_init" "', argument " "2"" of type '" "char **""'");
}
arg2 = reinterpret_cast< char ** >(argp2);
res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_std__string, 0 | 0);
if (!SWIG_IsOK(res3)) {
SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "uniset_init" "', argument " "3"" of type '" "std::string const &""'");
}
if (!argp3) {
SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "uniset_init" "', argument " "3"" of type '" "std::string const &""'");
{
std::string *ptr = (std::string *)0;
res3 = SWIG_AsPtr_std_string(obj2, &ptr);
if (!SWIG_IsOK(res3)) {
SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "uniset_init" "', argument " "3"" of type '" "std::string const &""'");
}
if (!ptr) {
SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "uniset_init" "', argument " "3"" of type '" "std::string const &""'");
}
arg3 = ptr;
}
arg3 = reinterpret_cast< std::string * >(argp3);
try {
pyUInterface::uniset_init(arg1,arg2,(std::string const &)*arg3);
}
......@@ -3421,8 +3560,10 @@ SWIGINTERN PyObject *_wrap_uniset_init(PyObject *SWIGUNUSEDPARM(self), PyObject
}
resultobj = SWIG_Py_Void();
if (SWIG_IsNewObj(res3)) delete arg3;
return resultobj;
fail:
if (SWIG_IsNewObj(res3)) delete arg3;
return NULL;
}
......@@ -3455,7 +3596,52 @@ fail:
}
SWIGINTERN PyObject *_wrap_setValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
SWIGINTERN PyObject *_wrap_setValue__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
long arg1 ;
long arg2 ;
long arg3 ;
long val1 ;
int ecode1 = 0 ;
long val2 ;
int ecode2 = 0 ;
long val3 ;
int ecode3 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
PyObject * obj2 = 0 ;
if (!PyArg_ParseTuple(args,(char *)"OOO:setValue",&obj0,&obj1,&obj2)) SWIG_fail;
ecode1 = SWIG_AsVal_long(obj0, &val1);
if (!SWIG_IsOK(ecode1)) {
SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "setValue" "', argument " "1"" of type '" "long""'");
}
arg1 = static_cast< long >(val1);
ecode2 = SWIG_AsVal_long(obj1, &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "setValue" "', argument " "2"" of type '" "long""'");
}
arg2 = static_cast< long >(val2);
ecode3 = SWIG_AsVal_long(obj2, &val3);
if (!SWIG_IsOK(ecode3)) {
SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "setValue" "', argument " "3"" of type '" "long""'");
}
arg3 = static_cast< long >(val3);
try {
pyUInterface::setValue(arg1,arg2,arg3);
}
catch(UException &_e) {
SWIG_Python_Raise(SWIG_NewPointerObj((new UException(static_cast< const UException& >(_e))),SWIGTYPE_p_UException,SWIG_POINTER_OWN), "UException", SWIGTYPE_p_UException); SWIG_fail;
}
resultobj = SWIG_Py_Void();
return resultobj;
fail:
return NULL;
}
SWIGINTERN PyObject *_wrap_setValue__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
long arg1 ;
long arg2 ;
......@@ -3491,27 +3677,91 @@ fail:
}
SWIGINTERN PyObject *_wrap_setValue(PyObject *self, PyObject *args) {
Py_ssize_t argc;
PyObject *argv[4] = {
0
};
Py_ssize_t ii;
if (!PyTuple_Check(args)) SWIG_fail;
argc = args ? PyObject_Length(args) : 0;
for (ii = 0; (ii < 3) && (ii < argc); ii++) {
argv[ii] = PyTuple_GET_ITEM(args,ii);
}
if (argc == 2) {
int _v;
{
int res = SWIG_AsVal_long(argv[0], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
{
int res = SWIG_AsVal_long(argv[1], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
return _wrap_setValue__SWIG_1(self, args);
}
}
}
if (argc == 3) {
int _v;
{
int res = SWIG_AsVal_long(argv[0], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
{
int res = SWIG_AsVal_long(argv[1], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
{
int res = SWIG_AsVal_long(argv[2], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
return _wrap_setValue__SWIG_0(self, args);
}
}
}
}
fail:
SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'setValue'.\n"
" Possible C/C++ prototypes are:\n"
" pyUInterface::setValue(long,long,long)\n"
" pyUInterface::setValue(long,long)\n");
return 0;
}
SWIGINTERN PyObject *_wrap_getSensorID(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
std::string *arg1 = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
int res1 = SWIG_OLDOBJ ;
PyObject * obj0 = 0 ;
long result;
if (!PyArg_ParseTuple(args,(char *)"O:getSensorID",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_std__string, 0 | 0);
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getSensorID" "', argument " "1"" of type '" "std::string const &""'");
}
if (!argp1) {
SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getSensorID" "', argument " "1"" of type '" "std::string const &""'");
{
std::string *ptr = (std::string *)0;
res1 = SWIG_AsPtr_std_string(obj0, &ptr);
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getSensorID" "', argument " "1"" of type '" "std::string const &""'");
}
if (!ptr) {
SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getSensorID" "', argument " "1"" of type '" "std::string const &""'");
}
arg1 = ptr;
}
arg1 = reinterpret_cast< std::string * >(argp1);
result = (long)pyUInterface::getSensorID((std::string const &)*arg1);
resultobj = SWIG_From_long(static_cast< long >(result));
if (SWIG_IsNewObj(res1)) delete arg1;
return resultobj;
fail:
if (SWIG_IsNewObj(res1)) delete arg1;
return NULL;
}
......@@ -3531,7 +3781,7 @@ SWIGINTERN PyObject *_wrap_getShortName(PyObject *SWIGUNUSEDPARM(self), PyObject
}
arg1 = static_cast< long >(val1);
result = pyUInterface::getShortName(arg1);
resultobj = SWIG_NewPointerObj((new std::string(static_cast< const std::string& >(result))), SWIGTYPE_p_std__string, SWIG_POINTER_OWN | 0 );
resultobj = SWIG_From_std_string(static_cast< std::string >(result));
return resultobj;
fail:
return NULL;
......@@ -3553,7 +3803,7 @@ SWIGINTERN PyObject *_wrap_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *arg
}
arg1 = static_cast< long >(val1);
result = pyUInterface::getName(arg1);
resultobj = SWIG_NewPointerObj((new std::string(static_cast< const std::string& >(result))), SWIGTYPE_p_std__string, SWIG_POINTER_OWN | 0 );
resultobj = SWIG_From_std_string(static_cast< std::string >(result));
return resultobj;
fail:
return NULL;
......@@ -3575,7 +3825,7 @@ SWIGINTERN PyObject *_wrap_getTextName(PyObject *SWIGUNUSEDPARM(self), PyObject
}
arg1 = static_cast< long >(val1);
result = pyUInterface::getTextName(arg1);
resultobj = SWIG_NewPointerObj((new std::string(static_cast< const std::string& >(result))), SWIGTYPE_p_std__string, SWIG_POINTER_OWN | 0 );
resultobj = SWIG_From_std_string(static_cast< std::string >(result));
return resultobj;
fail:
return NULL;
......@@ -3588,7 +3838,7 @@ SWIGINTERN PyObject *_wrap_getConfFileName(PyObject *SWIGUNUSEDPARM(self), PyObj
if (!PyArg_ParseTuple(args,(char *)":getConfFileName")) SWIG_fail;
result = pyUInterface::getConfFileName();
resultobj = SWIG_NewPointerObj((new std::string(static_cast< const std::string& >(result))), SWIGTYPE_p_std__string, SWIG_POINTER_OWN | 0 );
resultobj = SWIG_From_std_string(static_cast< std::string >(result));
return resultobj;
fail:
return NULL;
......@@ -3609,6 +3859,20 @@ SWIGINTERN PyObject *Swig_var_DefaultID_get(void) {
}
SWIGINTERN int Swig_var_DefaultSupplerID_set(PyObject *) {
SWIG_Error(SWIG_AttributeError,"Variable DefaultSupplerID is read-only.");
return 1;
}
SWIGINTERN PyObject *Swig_var_DefaultSupplerID_get(void) {
PyObject *pyobj = 0;
pyobj = SWIG_From_long(static_cast< long >(UTypes::DefaultSupplerID));
return pyobj;
}
SWIGINTERN PyObject *_wrap_new_Params(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
UTypes::Params *result = 0 ;
......@@ -3824,24 +4088,28 @@ fail:
SWIGINTERN PyObject *_wrap_new_UException__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
std::string *arg1 = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
int res1 = SWIG_OLDOBJ ;
PyObject * obj0 = 0 ;
UException *result = 0 ;
if (!PyArg_ParseTuple(args,(char *)"O:new_UException",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_std__string, 0 | 0);
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_UException" "', argument " "1"" of type '" "std::string const &""'");
}
if (!argp1) {
SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UException" "', argument " "1"" of type '" "std::string const &""'");
{
std::string *ptr = (std::string *)0;
res1 = SWIG_AsPtr_std_string(obj0, &ptr);
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_UException" "', argument " "1"" of type '" "std::string const &""'");
}
if (!ptr) {
SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UException" "', argument " "1"" of type '" "std::string const &""'");
}
arg1 = ptr;
}
arg1 = reinterpret_cast< std::string * >(argp1);
result = (UException *)new UException((std::string const &)*arg1);
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UException, SWIG_POINTER_NEW | 0 );
if (SWIG_IsNewObj(res1)) delete arg1;
return resultobj;
fail:
if (SWIG_IsNewObj(res1)) delete arg1;
return NULL;
}
......@@ -3872,14 +4140,14 @@ fail:
SWIGINTERN PyObject *_wrap_new_UException(PyObject *self, PyObject *args) {
int argc;
Py_ssize_t argc;
PyObject *argv[2] = {
0
};
int ii;
Py_ssize_t ii;
if (!PyTuple_Check(args)) SWIG_fail;
argc = args ? (int)PyObject_Length(args) : 0;
argc = args ? PyObject_Length(args) : 0;
for (ii = 0; (ii < 1) && (ii < argc); ii++) {
argv[ii] = PyTuple_GET_ITEM(args,ii);
}
......@@ -3888,7 +4156,7 @@ SWIGINTERN PyObject *_wrap_new_UException(PyObject *self, PyObject *args) {
}
if (argc == 1) {
int _v;
int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__string, 0);
int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0));
_v = SWIG_CheckState(res);
if (_v) {
return _wrap_new_UException__SWIG_1(self, args);
......@@ -3949,7 +4217,7 @@ SWIGINTERN PyObject *_wrap_UException_getError(PyObject *SWIGUNUSEDPARM(self), P
}
arg1 = reinterpret_cast< UException * >(argp1);
result = (arg1)->getError();
resultobj = SWIG_NewPointerObj((new std::string(static_cast< const std::string& >(result))), SWIGTYPE_p_std__string, SWIG_POINTER_OWN | 0 );
resultobj = SWIG_From_std_string(static_cast< std::string >(result));
return resultobj;
fail:
return NULL;
......@@ -3959,11 +4227,10 @@ fail:
SWIGINTERN PyObject *_wrap_UException_err_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
UException *arg1 = (UException *) 0 ;
std::string arg2 ;
std::string *arg2 = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
void *argp2 ;
int res2 = 0 ;
int res2 = SWIG_OLDOBJ ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
......@@ -3974,22 +4241,22 @@ SWIGINTERN PyObject *_wrap_UException_err_set(PyObject *SWIGUNUSEDPARM(self), Py
}
arg1 = reinterpret_cast< UException * >(argp1);
{
res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__string, 0 | 0);
std::string *ptr = (std::string *)0;
res2 = SWIG_AsPtr_std_string(obj1, &ptr);
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UException_err_set" "', argument " "2"" of type '" "std::string""'");
}
if (!argp2) {
SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "UException_err_set" "', argument " "2"" of type '" "std::string""'");
} else {
std::string * temp = reinterpret_cast< std::string * >(argp2);
arg2 = *temp;
if (SWIG_IsNewObj(res2)) delete temp;
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UException_err_set" "', argument " "2"" of type '" "std::string const &""'");
}
if (!ptr) {
SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "UException_err_set" "', argument " "2"" of type '" "std::string const &""'");
}
arg2 = ptr;
}
if (arg1) (arg1)->err = arg2;
if (arg1) (arg1)->err = *arg2;
resultobj = SWIG_Py_Void();
if (SWIG_IsNewObj(res2)) delete arg2;
return resultobj;
fail:
if (SWIG_IsNewObj(res2)) delete arg2;
return NULL;
}
......@@ -4000,7 +4267,7 @@ SWIGINTERN PyObject *_wrap_UException_err_get(PyObject *SWIGUNUSEDPARM(self), Py
void *argp1 = 0 ;
int res1 = 0 ;
PyObject * obj0 = 0 ;
std::string result;
std::string *result = 0 ;
if (!PyArg_ParseTuple(args,(char *)"O:UException_err_get",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UException, 0 | 0 );
......@@ -4008,8 +4275,8 @@ SWIGINTERN PyObject *_wrap_UException_err_get(PyObject *SWIGUNUSEDPARM(self), Py
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UException_err_get" "', argument " "1"" of type '" "UException *""'");
}
arg1 = reinterpret_cast< UException * >(argp1);
result = ((arg1)->err);
resultobj = SWIG_NewPointerObj((new std::string(static_cast< const std::string& >(result))), SWIGTYPE_p_std__string, SWIG_POINTER_OWN | 0 );
result = (std::string *) & ((arg1)->err);
resultobj = SWIG_From_std_string(static_cast< std::string >(*result));
return resultobj;
fail:
return NULL;
......@@ -4039,37 +4306,41 @@ fail:
SWIGINTERN PyObject *_wrap_new_UTimeOut__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
std::string *arg1 = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
int res1 = SWIG_OLDOBJ ;
PyObject * obj0 = 0 ;
UTimeOut *result = 0 ;
if (!PyArg_ParseTuple(args,(char *)"O:new_UTimeOut",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_std__string, 0 | 0);
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_UTimeOut" "', argument " "1"" of type '" "std::string const &""'");
}
if (!argp1) {
SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UTimeOut" "', argument " "1"" of type '" "std::string const &""'");
{
std::string *ptr = (std::string *)0;
res1 = SWIG_AsPtr_std_string(obj0, &ptr);
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_UTimeOut" "', argument " "1"" of type '" "std::string const &""'");
}
if (!ptr) {
SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UTimeOut" "', argument " "1"" of type '" "std::string const &""'");
}
arg1 = ptr;
}
arg1 = reinterpret_cast< std::string * >(argp1);
result = (UTimeOut *)new UTimeOut((std::string const &)*arg1);
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UTimeOut, SWIG_POINTER_NEW | 0 );
if (SWIG_IsNewObj(res1)) delete arg1;
return resultobj;
fail:
if (SWIG_IsNewObj(res1)) delete arg1;
return NULL;
}
SWIGINTERN PyObject *_wrap_new_UTimeOut(PyObject *self, PyObject *args) {
int argc;
Py_ssize_t argc;
PyObject *argv[2] = {
0
};
int ii;
Py_ssize_t ii;
if (!PyTuple_Check(args)) SWIG_fail;
argc = args ? (int)PyObject_Length(args) : 0;
argc = args ? PyObject_Length(args) : 0;
for (ii = 0; (ii < 1) && (ii < argc); ii++) {
argv[ii] = PyTuple_GET_ITEM(args,ii);
}
......@@ -4078,7 +4349,7 @@ SWIGINTERN PyObject *_wrap_new_UTimeOut(PyObject *self, PyObject *args) {
}
if (argc == 1) {
int _v;
int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__string, 0);
int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0));
_v = SWIG_CheckState(res);
if (_v) {
return _wrap_new_UTimeOut__SWIG_1(self, args);
......@@ -4138,37 +4409,41 @@ fail:
SWIGINTERN PyObject *_wrap_new_USysError__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
std::string *arg1 = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
int res1 = SWIG_OLDOBJ ;
PyObject * obj0 = 0 ;
USysError *result = 0 ;
if (!PyArg_ParseTuple(args,(char *)"O:new_USysError",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_std__string, 0 | 0);
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_USysError" "', argument " "1"" of type '" "std::string const &""'");
}
if (!argp1) {
SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_USysError" "', argument " "1"" of type '" "std::string const &""'");
{
std::string *ptr = (std::string *)0;
res1 = SWIG_AsPtr_std_string(obj0, &ptr);
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_USysError" "', argument " "1"" of type '" "std::string const &""'");
}
if (!ptr) {
SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_USysError" "', argument " "1"" of type '" "std::string const &""'");
}
arg1 = ptr;
}
arg1 = reinterpret_cast< std::string * >(argp1);
result = (USysError *)new USysError((std::string const &)*arg1);
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_USysError, SWIG_POINTER_NEW | 0 );
if (SWIG_IsNewObj(res1)) delete arg1;
return resultobj;
fail:
if (SWIG_IsNewObj(res1)) delete arg1;
return NULL;
}
SWIGINTERN PyObject *_wrap_new_USysError(PyObject *self, PyObject *args) {
int argc;
Py_ssize_t argc;
PyObject *argv[2] = {
0
};
int ii;
Py_ssize_t ii;
if (!PyTuple_Check(args)) SWIG_fail;
argc = args ? (int)PyObject_Length(args) : 0;
argc = args ? PyObject_Length(args) : 0;
for (ii = 0; (ii < 1) && (ii < argc); ii++) {
argv[ii] = PyTuple_GET_ITEM(args,ii);
}
......@@ -4177,7 +4452,7 @@ SWIGINTERN PyObject *_wrap_new_USysError(PyObject *self, PyObject *args) {
}
if (argc == 1) {
int _v;
int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__string, 0);
int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0));
_v = SWIG_CheckState(res);
if (_v) {
return _wrap_new_USysError__SWIG_1(self, args);
......@@ -4271,7 +4546,6 @@ static swig_type_info _swigt__p_UTimeOut = {"_p_UTimeOut", "UTimeOut *", 0, 0, (
static swig_type_info _swigt__p_UTypes__Params = {"_p_UTypes__Params", "UTypes::Params *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__string = {"_p_std__string", "std::string *", 0, 0, (void*)0, 0};
static swig_type_info *swig_type_initial[] = {
&_swigt__p_UException,
......@@ -4280,7 +4554,6 @@ static swig_type_info *swig_type_initial[] = {
&_swigt__p_UTypes__Params,
&_swigt__p_char,
&_swigt__p_p_char,
&_swigt__p_std__string,
};
static swig_cast_info _swigc__p_UException[] = { {&_swigt__p_UException, 0, 0, 0}, {&_swigt__p_UTimeOut, _p_UTimeOutTo_p_UException, 0, 0}, {&_swigt__p_USysError, _p_USysErrorTo_p_UException, 0, 0},{0, 0, 0, 0}};
......@@ -4289,7 +4562,6 @@ static swig_cast_info _swigc__p_UTimeOut[] = { {&_swigt__p_UTimeOut, 0, 0, 0},{
static swig_cast_info _swigc__p_UTypes__Params[] = { {&_swigt__p_UTypes__Params, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_char[] = { {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__string[] = { {&_swigt__p_std__string, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info *swig_cast_initial[] = {
_swigc__p_UException,
......@@ -4298,7 +4570,6 @@ static swig_cast_info *swig_cast_initial[] = {
_swigc__p_UTypes__Params,
_swigc__p_char,
_swigc__p_p_char,
_swigc__p_std__string,
};
......@@ -4716,10 +4987,19 @@ extern "C" {
0, /* tp_del */
#endif
#if PY_VERSION_HEX >= 0x02060000
0, /* tp_version */
0, /* tp_version_tag */
#endif
#if PY_VERSION_HEX >= 0x03040000
0, /* tp_finalize */
#endif
#ifdef COUNT_ALLOCS
0,0,0,0 /* tp_alloc -> tp_next */
0, /* tp_allocs */
0, /* tp_frees */
0, /* tp_maxalloc */
#if PY_VERSION_HEX >= 0x02050000
0, /* tp_prev */
#endif
0 /* tp_next */
#endif
};
varlink_type = tmp;
......@@ -4986,6 +5266,7 @@ SWIG_init(void) {
PyDict_SetItemString(md,(char*)"cvar", SWIG_globals());
SWIG_addvarlink(SWIG_globals(),(char*)"DefaultID",Swig_var_DefaultID_get, Swig_var_DefaultID_set);
SWIG_addvarlink(SWIG_globals(),(char*)"DefaultSupplerID",Swig_var_DefaultSupplerID_get, Swig_var_DefaultSupplerID_set);
SWIG_Python_SetConstant(d, "Params_max",SWIG_From_int(static_cast< int >(UTypes::Params::max)));
#if PY_VERSION_HEX >= 0x03000000
return m;
......
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.7
* Version 3.0.8
*
* This file is not intended to be easily readable and contains a number of
* coding conventions designed to improve portability and efficiency. Do not make
......@@ -8,7 +8,11 @@
* interface file instead.
* ----------------------------------------------------------------------------- */
#ifndef SWIGPYTHON
#define SWIGPYTHON
#endif
#define SWIG_PYTHON_DIRECTOR_NO_VTABLE
#define SWIG_PYTHON_CLASSIC
......@@ -1326,7 +1330,7 @@ SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
/* Unpack the argument tuple */
SWIGINTERN int
SWIGINTERN Py_ssize_t
SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
{
if (!args) {
......@@ -1340,7 +1344,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi
}
if (!PyTuple_Check(args)) {
if (min <= 1 && max >= 1) {
int i;
Py_ssize_t i;
objs[0] = args;
for (i = 1; i < max; ++i) {
objs[i] = 0;
......@@ -1360,7 +1364,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi
name, (min == max ? "" : "at most "), (int)max, (int)l);
return 0;
} else {
int i;
Py_ssize_t i;
for (i = 0; i < l; ++i) {
objs[i] = PyTuple_GET_ITEM(args, i);
}
......@@ -1701,16 +1705,32 @@ SwigPyObject_dealloc(PyObject *v)
if (destroy) {
/* destroy is always a VARARGS method */
PyObject *res;
/* PyObject_CallFunction() has the potential to silently drop
the active active exception. In cases of unnamed temporary
variable or where we just finished iterating over a generator
StopIteration will be active right now, and this needs to
remain true upon return from SwigPyObject_dealloc. So save
and restore. */
PyObject *val = NULL, *type = NULL, *tb = NULL;
PyErr_Fetch(&val, &type, &tb);
if (data->delargs) {
/* we need to create a temporary object to carry the destroy operation */
PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
res = SWIG_Python_CallFunctor(destroy, tmp);
Py_DECREF(tmp);
/* we need to create a temporary object to carry the destroy operation */
PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
res = SWIG_Python_CallFunctor(destroy, tmp);
Py_DECREF(tmp);
} else {
PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
PyObject *mself = PyCFunction_GET_SELF(destroy);
res = ((*meth)(mself, v));
PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
PyObject *mself = PyCFunction_GET_SELF(destroy);
res = ((*meth)(mself, v));
}
if (!res)
PyErr_WriteUnraisable(destroy);
PyErr_Restore(val, type, tb);
Py_XDECREF(res);
}
#if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
......@@ -1734,6 +1754,7 @@ SwigPyObject_append(PyObject* v, PyObject* next)
next = tmp;
#endif
if (!SwigPyObject_Check(next)) {
PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject");
return NULL;
}
sobj->next = next;
......@@ -1889,7 +1910,9 @@ SwigPyObject_TypeOnce(void) {
(unaryfunc)SwigPyObject_oct, /*nb_oct*/
(unaryfunc)SwigPyObject_hex, /*nb_hex*/
#endif
#if PY_VERSION_HEX >= 0x03000000 /* 3.0 */
#if PY_VERSION_HEX >= 0x03050000 /* 3.5 */
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_matrix_multiply */
#elif PY_VERSION_HEX >= 0x03000000 /* 3.0 */
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
#elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
......@@ -1969,10 +1992,19 @@ SwigPyObject_TypeOnce(void) {
0, /* tp_del */
#endif
#if PY_VERSION_HEX >= 0x02060000
0, /* tp_version */
0, /* tp_version_tag */
#endif
#if PY_VERSION_HEX >= 0x03040000
0, /* tp_finalize */
#endif
#ifdef COUNT_ALLOCS
0,0,0,0 /* tp_alloc -> tp_next */
0, /* tp_allocs */
0, /* tp_frees */
0, /* tp_maxalloc */
#if PY_VERSION_HEX >= 0x02050000
0, /* tp_prev */
#endif
0 /* tp_next */
#endif
};
swigpyobject_type = tmp;
......@@ -2148,10 +2180,19 @@ SwigPyPacked_TypeOnce(void) {
0, /* tp_del */
#endif
#if PY_VERSION_HEX >= 0x02060000
0, /* tp_version */
0, /* tp_version_tag */
#endif
#if PY_VERSION_HEX >= 0x03040000
0, /* tp_finalize */
#endif
#ifdef COUNT_ALLOCS
0,0,0,0 /* tp_alloc -> tp_next */
0, /* tp_allocs */
0, /* tp_frees */
0, /* tp_maxalloc */
#if PY_VERSION_HEX >= 0x02050000
0, /* tp_prev */
#endif
0 /* tp_next */
#endif
};
swigpypacked_type = tmp;
......@@ -2679,13 +2720,11 @@ PyModule_AddObject(PyObject *m, char *name, PyObject *o)
{
PyObject *dict;
if (!PyModule_Check(m)) {
PyErr_SetString(PyExc_TypeError,
"PyModule_AddObject() needs module as first arg");
PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs module as first arg");
return SWIG_ERROR;
}
if (!o) {
PyErr_SetString(PyExc_TypeError,
"PyModule_AddObject() needs non-NULL value");
PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs non-NULL value");
return SWIG_ERROR;
}
......@@ -3000,7 +3039,7 @@ static swig_module_info swig_module = {swig_types, 7, 0, 0, 0, 0};
#endif
#define SWIG_name "_pyUModbus"
#define SWIGVERSION 0x030007
#define SWIGVERSION 0x030008
#define SWIG_VERSION SWIGVERSION
......@@ -3111,12 +3150,12 @@ SWIG_FromCharPtrAndSize(const char* carray, size_t size)
} else {
#if PY_VERSION_HEX >= 0x03000000
#if PY_VERSION_HEX >= 0x03010000
return PyUnicode_DecodeUTF8(carray, static_cast< int >(size), "surrogateescape");
return PyUnicode_DecodeUTF8(carray, static_cast< Py_ssize_t >(size), "surrogateescape");
#else
return PyUnicode_FromStringAndSize(carray, static_cast< int >(size));
return PyUnicode_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
#endif
#else
return PyString_FromStringAndSize(carray, static_cast< int >(size));
return PyString_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
#endif
}
} else {
......@@ -3149,9 +3188,11 @@ SWIG_AsVal_double (PyObject *obj, double *val)
if (PyFloat_Check(obj)) {
if (val) *val = PyFloat_AsDouble(obj);
return SWIG_OK;
#if PY_VERSION_HEX < 0x03000000
} else if (PyInt_Check(obj)) {
if (val) *val = PyInt_AsLong(obj);
return SWIG_OK;
#endif
} else if (PyLong_Check(obj)) {
double v = PyLong_AsDouble(obj);
if (!PyErr_Occurred()) {
......@@ -3225,16 +3266,20 @@ SWIG_CanCastAsInteger(double *d, double min, double max) {
SWIGINTERN int
SWIG_AsVal_long (PyObject *obj, long* val)
{
#if PY_VERSION_HEX < 0x03000000
if (PyInt_Check(obj)) {
if (val) *val = PyInt_AsLong(obj);
return SWIG_OK;
} else if (PyLong_Check(obj)) {
} else
#endif
if (PyLong_Check(obj)) {
long v = PyLong_AsLong(obj);
if (!PyErr_Occurred()) {
if (val) *val = v;
return SWIG_OK;
} else {
PyErr_Clear();
return SWIG_OverflowError;
}
}
#ifdef SWIG_PYTHON_CAST_MODE
......@@ -3324,18 +3369,17 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
#else
if (*alloc == SWIG_NEWOBJ)
#endif
{
*cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1)));
*alloc = SWIG_NEWOBJ;
}
else {
{
*cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1)));
*alloc = SWIG_NEWOBJ;
} else {
*cptr = cstr;
*alloc = SWIG_OLDOBJ;
}
} else {
#if PY_VERSION_HEX>=0x03000000
assert(0); /* Should never reach here in Python 3 */
#endif
#if PY_VERSION_HEX>=0x03000000
assert(0); /* Should never reach here in Python 3 */
#endif
*cptr = SWIG_Python_str_AsChar(obj);
}
}
......@@ -3345,6 +3389,30 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
#endif
return SWIG_OK;
} else {
#if defined(SWIG_PYTHON_2_UNICODE)
#if PY_VERSION_HEX<0x03000000
if (PyUnicode_Check(obj)) {
char *cstr; Py_ssize_t len;
if (!alloc && cptr) {
return SWIG_RuntimeError;
}
obj = PyUnicode_AsUTF8String(obj);
if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) {
if (cptr) {
if (alloc) *alloc = SWIG_NEWOBJ;
*cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1)));
}
if (psize) *psize = len + 1;
Py_XDECREF(obj);
return SWIG_OK;
} else {
Py_XDECREF(obj);
}
}
#endif
#endif
swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
if (pchar_descriptor) {
void* vptr = 0;
......@@ -4046,14 +4114,14 @@ fail:
SWIGINTERN PyObject *_wrap_UModbus_mbread(PyObject *self, PyObject *args) {
int argc;
Py_ssize_t argc;
PyObject *argv[9] = {
0
};
int ii;
Py_ssize_t ii;
if (!PyTuple_Check(args)) SWIG_fail;
argc = args ? (int)PyObject_Length(args) : 0;
argc = args ? PyObject_Length(args) : 0;
for (ii = 0; (ii < 8) && (ii < argc); ii++) {
argv[ii] = PyTuple_GET_ITEM(args,ii);
}
......@@ -4327,14 +4395,14 @@ fail:
SWIGINTERN PyObject *_wrap_UModbus_getWord(PyObject *self, PyObject *args) {
int argc;
Py_ssize_t argc;
PyObject *argv[5] = {
0
};
int ii;
Py_ssize_t ii;
if (!PyTuple_Check(args)) SWIG_fail;
argc = args ? (int)PyObject_Length(args) : 0;
argc = args ? PyObject_Length(args) : 0;
for (ii = 0; (ii < 4) && (ii < argc); ii++) {
argv[ii] = PyTuple_GET_ITEM(args,ii);
}
......@@ -4498,14 +4566,14 @@ fail:
SWIGINTERN PyObject *_wrap_UModbus_getByte(PyObject *self, PyObject *args) {
int argc;
Py_ssize_t argc;
PyObject *argv[5] = {
0
};
int ii;
Py_ssize_t ii;
if (!PyTuple_Check(args)) SWIG_fail;
argc = args ? (int)PyObject_Length(args) : 0;
argc = args ? PyObject_Length(args) : 0;
for (ii = 0; (ii < 4) && (ii < argc); ii++) {
argv[ii] = PyTuple_GET_ITEM(args,ii);
}
......@@ -4669,14 +4737,14 @@ fail:
SWIGINTERN PyObject *_wrap_UModbus_getBit(PyObject *self, PyObject *args) {
int argc;
Py_ssize_t argc;
PyObject *argv[5] = {
0
};
int ii;
Py_ssize_t ii;
if (!PyTuple_Check(args)) SWIG_fail;
argc = args ? (int)PyObject_Length(args) : 0;
argc = args ? PyObject_Length(args) : 0;
for (ii = 0; (ii < 4) && (ii < argc); ii++) {
argv[ii] = PyTuple_GET_ITEM(args,ii);
}
......@@ -4969,14 +5037,14 @@ fail:
SWIGINTERN PyObject *_wrap_UModbus_mbwrite(PyObject *self, PyObject *args) {
int argc;
Py_ssize_t argc;
PyObject *argv[8] = {
0
};
int ii;
Py_ssize_t ii;
if (!PyTuple_Check(args)) SWIG_fail;
argc = args ? (int)PyObject_Length(args) : 0;
argc = args ? PyObject_Length(args) : 0;
for (ii = 0; (ii < 7) && (ii < argc); ii++) {
argv[ii] = PyTuple_GET_ITEM(args,ii);
}
......@@ -5125,6 +5193,20 @@ SWIGINTERN PyObject *Swig_var_DefaultID_get(void) {
}
SWIGINTERN int Swig_var_DefaultSupplerID_set(PyObject *) {
SWIG_Error(SWIG_AttributeError,"Variable DefaultSupplerID is read-only.");
return 1;
}
SWIGINTERN PyObject *Swig_var_DefaultSupplerID_get(void) {
PyObject *pyobj = 0;
pyobj = SWIG_From_long(static_cast< long >(UTypes::DefaultSupplerID));
return pyobj;
}
SWIGINTERN PyObject *_wrap_new_Params(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
UTypes::Params *result = 0 ;
......@@ -5392,14 +5474,14 @@ fail:
SWIGINTERN PyObject *_wrap_new_UException(PyObject *self, PyObject *args) {
int argc;
Py_ssize_t argc;
PyObject *argv[2] = {
0
};
int ii;
Py_ssize_t ii;
if (!PyTuple_Check(args)) SWIG_fail;
argc = args ? (int)PyObject_Length(args) : 0;
argc = args ? PyObject_Length(args) : 0;
for (ii = 0; (ii < 1) && (ii < argc); ii++) {
argv[ii] = PyTuple_GET_ITEM(args,ii);
}
......@@ -5585,14 +5667,14 @@ fail:
SWIGINTERN PyObject *_wrap_new_UTimeOut(PyObject *self, PyObject *args) {
int argc;
Py_ssize_t argc;
PyObject *argv[2] = {
0
};
int ii;
Py_ssize_t ii;
if (!PyTuple_Check(args)) SWIG_fail;
argc = args ? (int)PyObject_Length(args) : 0;
argc = args ? PyObject_Length(args) : 0;
for (ii = 0; (ii < 1) && (ii < argc); ii++) {
argv[ii] = PyTuple_GET_ITEM(args,ii);
}
......@@ -5688,14 +5770,14 @@ fail:
SWIGINTERN PyObject *_wrap_new_USysError(PyObject *self, PyObject *args) {
int argc;
Py_ssize_t argc;
PyObject *argv[2] = {
0
};
int ii;
Py_ssize_t ii;
if (!PyTuple_Check(args)) SWIG_fail;
argc = args ? (int)PyObject_Length(args) : 0;
argc = args ? PyObject_Length(args) : 0;
for (ii = 0; (ii < 1) && (ii < argc); ii++) {
argv[ii] = PyTuple_GET_ITEM(args,ii);
}
......@@ -6250,10 +6332,19 @@ extern "C" {
0, /* tp_del */
#endif
#if PY_VERSION_HEX >= 0x02060000
0, /* tp_version */
0, /* tp_version_tag */
#endif
#if PY_VERSION_HEX >= 0x03040000
0, /* tp_finalize */
#endif
#ifdef COUNT_ALLOCS
0,0,0,0 /* tp_alloc -> tp_next */
0, /* tp_allocs */
0, /* tp_frees */
0, /* tp_maxalloc */
#if PY_VERSION_HEX >= 0x02050000
0, /* tp_prev */
#endif
0 /* tp_next */
#endif
};
varlink_type = tmp;
......@@ -6520,6 +6611,7 @@ SWIG_init(void) {
PyDict_SetItemString(md,(char*)"cvar", SWIG_globals());
SWIG_addvarlink(SWIG_globals(),(char*)"DefaultID",Swig_var_DefaultID_get, Swig_var_DefaultID_set);
SWIG_addvarlink(SWIG_globals(),(char*)"DefaultSupplerID",Swig_var_DefaultSupplerID_get, Swig_var_DefaultSupplerID_set);
SWIG_Python_SetConstant(d, "Params_max",SWIG_From_int(static_cast< int >(UTypes::Params::max)));
#if PY_VERSION_HEX >= 0x03000000
return m;
......
......@@ -22,6 +22,7 @@
namespace UTypes
{
const long DefaultID = UniSetTypes::DefaultObjectId;
const long DefaultSupplerID = UniSetTypes::AdminID;
struct Params
{
......
# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.7
# Version 3.0.8
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
......@@ -69,7 +69,7 @@ def _swig_getattr(self, class_type, name):
def _swig_repr(self):
try:
strthis = "proxy of " + self.this.__repr__()
except:
except Exception:
strthis = ""
return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
......@@ -85,7 +85,7 @@ class Params:
this = _pyUConnector.new_Params()
try:
self.this.append(this)
except:
except Exception:
self.this = this
def add(self, s):
......@@ -101,6 +101,7 @@ Params_swigregister = _pyUConnector.Params_swigregister
Params_swigregister(Params)
cvar = _pyUConnector.cvar
DefaultID = cvar.DefaultID
DefaultSupplerID = cvar.DefaultSupplerID
def Params_inst():
return _pyUConnector.Params_inst()
......@@ -117,7 +118,7 @@ class UConnector:
this = _pyUConnector.new_UConnector(*args)
try:
self.this.append(this)
except:
except Exception:
self.this = this
__swig_destroy__ = _pyUConnector.delete_UConnector
__del__ = lambda self: None
......@@ -131,8 +132,8 @@ class UConnector:
def getValue(self, id, node):
return _pyUConnector.UConnector_getValue(self, id, node)
def setValue(self, id, val, node):
return _pyUConnector.UConnector_setValue(self, id, val, node)
def setValue(self, *args):
return _pyUConnector.UConnector_setValue(self, *args)
def getSensorID(self, name):
return _pyUConnector.UConnector_getSensorID(self, name)
......
# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.7
# Version 3.0.8
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
......@@ -69,7 +69,7 @@ def _swig_getattr(self, class_type, name):
def _swig_repr(self):
try:
strthis = "proxy of " + self.this.__repr__()
except:
except Exception:
strthis = ""
return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
......@@ -84,7 +84,7 @@ class UException:
this = _pyUExceptions.new_UException(*args)
try:
self.this.append(this)
except:
except Exception:
self.this = this
__swig_destroy__ = _pyUExceptions.delete_UException
__del__ = lambda self: None
......@@ -111,7 +111,7 @@ class UTimeOut(UException):
this = _pyUExceptions.new_UTimeOut(*args)
try:
self.this.append(this)
except:
except Exception:
self.this = this
__swig_destroy__ = _pyUExceptions.delete_UTimeOut
__del__ = lambda self: None
......@@ -133,7 +133,7 @@ class USysError(UException):
this = _pyUExceptions.new_USysError(*args)
try:
self.this.append(this)
except:
except Exception:
self.this = this
__swig_destroy__ = _pyUExceptions.delete_USysError
__del__ = lambda self: None
......
# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.7
# Version 3.0.8
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
......@@ -69,7 +69,7 @@ def _swig_getattr(self, class_type, name):
def _swig_repr(self):
try:
strthis = "proxy of " + self.this.__repr__()
except:
except Exception:
strthis = ""
return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
......@@ -84,7 +84,7 @@ class UModbus:
this = _pyUModbus.new_UModbus()
try:
self.this.append(this)
except:
except Exception:
self.this = this
__swig_destroy__ = _pyUModbus.delete_UModbus
__del__ = lambda self: None
......@@ -142,7 +142,7 @@ class Params:
this = _pyUModbus.new_Params()
try:
self.this.append(this)
except:
except Exception:
self.this = this
def add(self, s):
......@@ -158,6 +158,7 @@ Params_swigregister = _pyUModbus.Params_swigregister
Params_swigregister(Params)
cvar = _pyUModbus.cvar
DefaultID = cvar.DefaultID
DefaultSupplerID = cvar.DefaultSupplerID
def Params_inst():
return _pyUModbus.Params_inst()
......@@ -174,7 +175,7 @@ class UException(Exception):
this = _pyUModbus.new_UException(*args)
try:
self.this.append(this)
except:
except Exception:
self.this = this
__swig_destroy__ = _pyUModbus.delete_UException
__del__ = lambda self: None
......@@ -201,7 +202,7 @@ class UTimeOut(UException):
this = _pyUModbus.new_UTimeOut(*args)
try:
self.this.append(this)
except:
except Exception:
self.this = this
__swig_destroy__ = _pyUModbus.delete_UTimeOut
__del__ = lambda self: None
......@@ -223,7 +224,7 @@ class USysError(UException):
this = _pyUModbus.new_USysError(*args)
try:
self.this.append(this)
except:
except Exception:
self.this = this
__swig_destroy__ = _pyUModbus.delete_USysError
__del__ = lambda self: None
......
# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.7
# Version 3.0.8
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
......@@ -69,7 +69,7 @@ def _swig_getattr(self, class_type, name):
def _swig_repr(self):
try:
strthis = "proxy of " + self.this.__repr__()
except:
except Exception:
strthis = ""
return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
......@@ -86,8 +86,8 @@ def getValue(id):
return _pyUniSet.getValue(id)
getValue = _pyUniSet.getValue
def setValue(id, val):
return _pyUniSet.setValue(id, val)
def setValue(*args):
return _pyUniSet.setValue(*args)
setValue = _pyUniSet.setValue
def getSensorID(name):
......@@ -121,7 +121,7 @@ class Params:
this = _pyUniSet.new_Params()
try:
self.this.append(this)
except:
except Exception:
self.this = this
def add(self, s):
......@@ -137,6 +137,7 @@ Params_swigregister = _pyUniSet.Params_swigregister
Params_swigregister(Params)
cvar = _pyUniSet.cvar
DefaultID = cvar.DefaultID
DefaultSupplerID = cvar.DefaultSupplerID
def Params_inst():
return _pyUniSet.Params_inst()
......@@ -153,7 +154,7 @@ class UException(Exception):
this = _pyUniSet.new_UException(*args)
try:
self.this.append(this)
except:
except Exception:
self.this = this
__swig_destroy__ = _pyUniSet.delete_UException
__del__ = lambda self: None
......@@ -180,7 +181,7 @@ class UTimeOut(UException):
this = _pyUniSet.new_UTimeOut(*args)
try:
self.this.append(this)
except:
except Exception:
self.this = this
__swig_destroy__ = _pyUniSet.delete_UTimeOut
__del__ = lambda self: None
......@@ -202,7 +203,7 @@ class USysError(UException):
this = _pyUniSet.new_USysError(*args)
try:
self.this.append(this)
except:
except Exception:
self.this = this
__swig_destroy__ = _pyUniSet.delete_USysError
__del__ = lambda self: None
......
......@@ -20,7 +20,7 @@ if __name__ == "__main__":
lst.add( sys.argv[i] )
try:
uniset_init_params( lst, str("test.xml") )
uniset_init_params( lst, "test.xml");
print "getShortName: id=%d name=%s" % (1, getShortName(1))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment