/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
- * Version 1.3.29
+ * Version 1.3.33
*
* 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
#define SWIG_PYTHON_DIRECTOR_NO_VTABLE
#ifdef __cplusplus
-template<class T> class SwigValueWrapper {
+template<typename T> class SwigValueWrapper {
T *tt;
public:
SwigValueWrapper() : tt(0) { }
private:
SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
};
+
+template <typename T> T SwigValueInit() {
+ return T();
+}
#endif
/* -----------------------------------------------------------------------------
/* template workaround for compilers that cannot correctly implement the C++ standard */
#ifndef SWIGTEMPLATEDISAMBIGUATOR
-# if defined(__SUNPRO_CC)
-# if (__SUNPRO_CC <= 0x560)
-# define SWIGTEMPLATEDISAMBIGUATOR template
-# else
-# define SWIGTEMPLATEDISAMBIGUATOR
-# endif
+# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
+# define SWIGTEMPLATEDISAMBIGUATOR template
+# elif defined(__HP_aCC)
+/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
+/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
+# define SWIGTEMPLATEDISAMBIGUATOR template
# else
-# define SWIGTEMPLATEDISAMBIGUATOR
+# define SWIGTEMPLATEDISAMBIGUATOR
# endif
#endif
#endif
/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
-#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER)
+#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
# define _CRT_SECURE_NO_DEPRECATE
#endif
+/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
+#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
+# define _SCL_SECURE_NO_DEPRECATE
+#endif
+
+
/* Python.h has to appear first */
#include <Python.h>
/* This should only be incremented when either the layout of swig_type_info changes,
or for whatever reason, the runtime changes incompatibly */
-#define SWIG_RUNTIME_VERSION "2"
+#define SWIG_RUNTIME_VERSION "3"
/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
#ifdef SWIG_TYPE_TABLE
while ((*f2 == ' ') && (f2 != l2)) ++f2;
if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
}
- return (l1 - f1) - (l2 - f2);
+ return (int)((l1 - f1) - (l2 - f2));
}
/*
-/* Python.h has to appear first */
-#include <Python.h>
/* Add PyOS_snprintf for old Pythons */
#if PY_VERSION_HEX < 0x02020000
}
#endif
+/* Py_ssize_t for old Pythons */
+/* This code is as recommended by: */
+/* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */
+#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
+typedef int Py_ssize_t;
+# define PY_SSIZE_T_MAX INT_MAX
+# define PY_SSIZE_T_MIN INT_MIN
+#endif
/* -----------------------------------------------------------------------------
* error manipulation
/* Unpack the argument tuple */
SWIGINTERN int
-SWIG_Python_UnpackTuple(PyObject *args, const char *name, int min, int max, PyObject **objs)
+SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
{
if (!args) {
if (!min && !max) {
return 1;
} else {
PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none",
- name, (min == max ? "" : "at least "), min);
+ name, (min == max ? "" : "at least "), (int)min);
return 0;
}
}
PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
return 0;
} else {
- register int l = PyTuple_GET_SIZE(args);
+ register Py_ssize_t l = PyTuple_GET_SIZE(args);
if (l < min) {
PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
- name, (min == max ? "" : "at least "), min, l);
+ name, (min == max ? "" : "at least "), (int)min, (int)l);
return 0;
} else if (l > max) {
PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
- name, (min == max ? "" : "at most "), max, l);
+ name, (min == max ? "" : "at most "), (int)max, (int)l);
return 0;
} else {
register int i;
SWIGRUNTIMEINLINE PyObject *
_SWIG_Py_None(void)
{
- PyObject *none = Py_BuildValue("");
+ PyObject *none = Py_BuildValue((char*)"");
Py_DECREF(none);
return none;
}
(unaryfunc)0, /*nb_float*/
(unaryfunc)PySwigObject_oct, /*nb_oct*/
(unaryfunc)PySwigObject_hex, /*nb_hex*/
-#if PY_VERSION_HEX >= 0x02020000
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
-#elif PY_VERSION_HEX >= 0x02000000
+#if 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 */
+#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
+#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */
0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */
#endif
};
void *vptr = 0;
/* here we get the method pointer for callbacks */
- char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
+ const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
if (desc) {
desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
return;
}
#endif
- dict = PyObject_GetAttrString(inst, "__dict__");
+ dict = PyObject_GetAttrString(inst, (char*)"__dict__");
PyDict_SetItem(dict, SWIG_This(), swig_this);
Py_DECREF(dict);
}
/* The python cached type query */
SWIGRUNTIME PyObject *
-SWIG_Python_TypeCache() {
+SWIG_Python_TypeCache(void) {
static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
return cache;
}
#if (PY_VERSION_HEX <= 0x02000000)
# if !defined(SWIG_PYTHON_CLASSIC)
-# error "This python version requires to use swig with the '-classic' option"
+# error "This python version requires swig to be run with the '-classic' option"
# endif
#endif
#define SWIG_name "_TOSSIM"
-#define SWIGVERSION 0x010329
+#define SWIGVERSION 0x010333
+#define SWIG_VERSION SWIGVERSION
#define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))
#include <limits.h>
-#ifndef LLONG_MIN
-# define LLONG_MIN LONG_LONG_MIN
-#endif
-#ifndef LLONG_MAX
-# define LLONG_MAX LONG_LONG_MAX
-#endif
-#ifndef ULLONG_MAX
-# define ULLONG_MAX ULONG_LONG_MAX
+#if !defined(SWIG_NO_LLONG_MAX)
+# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
+# define LLONG_MAX __LONG_LONG_MAX__
+# define LLONG_MIN (-LLONG_MAX - 1LL)
+# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
+# endif
#endif
SWIGINTERN swig_type_info*
-SWIG_pchar_descriptor()
+SWIG_pchar_descriptor(void)
{
static int init = 0;
static swig_type_info* info = 0;
SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
{
if (PyString_Check(obj)) {
- char *cstr; int len;
+ char *cstr; Py_ssize_t len;
PyString_AsStringAndSize(obj, &cstr, &len);
if (cptr) {
if (alloc) {
}
+SWIGINTERN PyObject *_wrap_Packet_setSource(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ Packet *arg1 = (Packet *) 0 ;
+ int arg2 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ int val2 ;
+ int ecode2 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OO:Packet_setSource",&obj0,&obj1)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Packet, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Packet_setSource" "', argument " "1"" of type '" "Packet *""'");
+ }
+ arg1 = reinterpret_cast< Packet * >(argp1);
+ ecode2 = SWIG_AsVal_int(obj1, &val2);
+ if (!SWIG_IsOK(ecode2)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Packet_setSource" "', argument " "2"" of type '" "int""'");
+ }
+ arg2 = static_cast< int >(val2);
+ (arg1)->setSource(arg2);
+ resultobj = SWIG_Py_Void();
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_Packet_source(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ Packet *arg1 = (Packet *) 0 ;
+ int result;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:Packet_source",&obj0)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Packet, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Packet_source" "', argument " "1"" of type '" "Packet *""'");
+ }
+ arg1 = reinterpret_cast< Packet * >(argp1);
+ result = (int)(arg1)->source();
+ resultobj = SWIG_From_int(static_cast< int >(result));
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
SWIGINTERN PyObject *_wrap_Packet_setDestination(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
Packet *arg1 = (Packet *) 0 ;
}
arg1 = reinterpret_cast< Packet * >(argp1);
result = (char *)(arg1)->data();
- resultobj = SWIG_FromCharPtr(result);
+ resultobj = SWIG_FromCharPtr((const char *)result);
return resultobj;
fail:
return NULL;
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Packet_setData" "', argument " "2"" of type '" "char *""'");
}
- arg2 = static_cast< char * >(buf2);
+ arg2 = reinterpret_cast< char * >(buf2);
arg3 = static_cast< int >(size2 - 1);
(arg1)->setData(arg2,arg3);
resultobj = SWIG_Py_Void();
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "variable_string_t_type_set" "', argument " "2"" of type '" "char *""'");
}
- arg2 = buf2;
+ arg2 = reinterpret_cast< char * >(buf2);
if (arg1->type) delete[] arg1->type;
if (arg2) {
- size_t size = strlen(arg2) + 1;
- arg1->type = reinterpret_cast< char* >(memcpy((new char[size]), arg2, sizeof(char)*(size)));
+ size_t size = strlen(reinterpret_cast< const char * >(arg2)) + 1;
+ arg1->type = (char *)reinterpret_cast< char* >(memcpy((new char[size]), reinterpret_cast< const char * >(arg2), sizeof(char)*(size)));
} else {
arg1->type = 0;
}
}
arg1 = reinterpret_cast< variable_string_t * >(argp1);
result = (char *) ((arg1)->type);
- resultobj = SWIG_FromCharPtr(result);
+ resultobj = SWIG_FromCharPtr((const char *)result);
return resultobj;
fail:
return NULL;
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "variable_string_t_ptr_set" "', argument " "2"" of type '" "char *""'");
}
- arg2 = buf2;
+ arg2 = reinterpret_cast< char * >(buf2);
if (arg1->ptr) delete[] arg1->ptr;
if (arg2) {
- size_t size = strlen(arg2) + 1;
- arg1->ptr = reinterpret_cast< char* >(memcpy((new char[size]), arg2, sizeof(char)*(size)));
+ size_t size = strlen(reinterpret_cast< const char * >(arg2)) + 1;
+ arg1->ptr = (char *)reinterpret_cast< char* >(memcpy((new char[size]), reinterpret_cast< const char * >(arg2), sizeof(char)*(size)));
} else {
arg1->ptr = 0;
}
}
arg1 = reinterpret_cast< variable_string_t * >(argp1);
result = (char *) ((arg1)->ptr);
- resultobj = SWIG_FromCharPtr(result);
+ resultobj = SWIG_FromCharPtr((const char *)result);
return resultobj;
fail:
return NULL;
}
}
else {
- app->variableNames[i] = "<bad string>";
- app->variableTypes[i] = "<bad string>";
+ app->variableNames[i] = (char*)"<bad string>";
+ app->variableTypes[i] = (char*)"<bad string>";
}
}
}
}
else {
- app->variableNames[i] = "<bad string>";
- app->variableTypes[i] = "<bad string>";
+ app->variableNames[i] = (char*)"<bad string>";
+ app->variableTypes[i] = (char*)"<bad string>";
}
}
}
}
else {
- app->variableNames[i] = "<bad string>";
- app->variableTypes[i] = "<bad string>";
+ app->variableNames[i] = (char*)"<bad string>";
+ app->variableTypes[i] = (char*)"<bad string>";
}
}
}
}
else {
- app->variableNames[i] = "<bad string>";
- app->variableTypes[i] = "<bad string>";
+ app->variableNames[i] = (char*)"<bad string>";
+ app->variableTypes[i] = (char*)"<bad string>";
}
}
}
}
else {
- app->variableNames[i] = "<bad string>";
- app->variableTypes[i] = "<bad string>";
+ app->variableNames[i] = (char*)"<bad string>";
+ app->variableTypes[i] = (char*)"<bad string>";
}
}
}
}
else {
- app->variableNames[i] = "<bad string>";
- app->variableTypes[i] = "<bad string>";
+ app->variableNames[i] = (char*)"<bad string>";
+ app->variableTypes[i] = (char*)"<bad string>";
}
}
}
}
else {
- app->variableNames[i] = "<bad string>";
- app->variableTypes[i] = "<bad string>";
+ app->variableNames[i] = (char*)"<bad string>";
+ app->variableTypes[i] = (char*)"<bad string>";
}
}
}
}
else {
- app->variableNames[i] = "<bad string>";
- app->variableTypes[i] = "<bad string>";
+ app->variableNames[i] = (char*)"<bad string>";
+ app->variableTypes[i] = (char*)"<bad string>";
}
}
}
}
else {
- app->variableNames[i] = "<bad string>";
- app->variableTypes[i] = "<bad string>";
+ app->variableNames[i] = (char*)"<bad string>";
+ app->variableTypes[i] = (char*)"<bad string>";
}
}
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Variable" "', argument " "1"" of type '" "char *""'");
}
- arg1 = buf1;
+ arg1 = reinterpret_cast< char * >(buf1);
res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Variable" "', argument " "2"" of type '" "char *""'");
}
- arg2 = buf2;
+ arg2 = reinterpret_cast< char * >(buf2);
ecode3 = SWIG_AsVal_int(obj2, &val3);
if (!SWIG_IsOK(ecode3)) {
SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Variable" "', argument " "3"" of type '" "int""'");
}
}
else {
- app->variableNames[i] = "<bad string>";
- app->variableTypes[i] = "<bad string>";
+ app->variableNames[i] = (char*)"<bad string>";
+ app->variableTypes[i] = (char*)"<bad string>";
}
}
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Mote_getVariable" "', argument " "2"" of type '" "char *""'");
}
- arg2 = buf2;
+ arg2 = reinterpret_cast< char * >(buf2);
result = (Variable *)(arg1)->getVariable(arg2);
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Variable, 0 | 0 );
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
}
+SWIGINTERN PyObject *_wrap_Mote_addNoiseTraceReading(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ Mote *arg1 = (Mote *) 0 ;
+ int arg2 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ int val2 ;
+ int ecode2 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OO:Mote_addNoiseTraceReading",&obj0,&obj1)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Mote, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Mote_addNoiseTraceReading" "', argument " "1"" of type '" "Mote *""'");
+ }
+ arg1 = reinterpret_cast< Mote * >(argp1);
+ ecode2 = SWIG_AsVal_int(obj1, &val2);
+ if (!SWIG_IsOK(ecode2)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Mote_addNoiseTraceReading" "', argument " "2"" of type '" "int""'");
+ }
+ arg2 = static_cast< int >(val2);
+ (arg1)->addNoiseTraceReading(arg2);
+ resultobj = SWIG_Py_Void();
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_Mote_createNoiseModel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ Mote *arg1 = (Mote *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:Mote_createNoiseModel",&obj0)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Mote, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Mote_createNoiseModel" "', argument " "1"" of type '" "Mote *""'");
+ }
+ arg1 = reinterpret_cast< Mote * >(argp1);
+ (arg1)->createNoiseModel();
+ resultobj = SWIG_Py_Void();
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_Mote_generateNoise(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ Mote *arg1 = (Mote *) 0 ;
+ int arg2 ;
+ int result;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ int val2 ;
+ int ecode2 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OO:Mote_generateNoise",&obj0,&obj1)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Mote, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Mote_generateNoise" "', argument " "1"" of type '" "Mote *""'");
+ }
+ arg1 = reinterpret_cast< Mote * >(argp1);
+ ecode2 = SWIG_AsVal_int(obj1, &val2);
+ if (!SWIG_IsOK(ecode2)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Mote_generateNoise" "', argument " "2"" of type '" "int""'");
+ }
+ arg2 = static_cast< int >(val2);
+ result = (int)(arg1)->generateNoise(arg2);
+ resultobj = SWIG_From_int(static_cast< int >(result));
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
SWIGINTERN PyObject *Mote_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj;
if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
}
}
else {
- app->variableNames[i] = "<bad string>";
- app->variableTypes[i] = "<bad string>";
+ app->variableNames[i] = (char*)"<bad string>";
+ app->variableTypes[i] = (char*)"<bad string>";
}
}
}
arg1 = reinterpret_cast< Tossim * >(argp1);
result = (char *)(arg1)->timeStr();
- resultobj = SWIG_FromCharPtr(result);
+ resultobj = SWIG_FromCharPtr((const char *)result);
return resultobj;
fail:
return NULL;
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Tossim_addChannel" "', argument " "2"" of type '" "char *""'");
}
- arg2 = buf2;
+ arg2 = reinterpret_cast< char * >(buf2);
{
if (!PyFile_Check(obj2)) {
PyErr_SetString(PyExc_TypeError, "Requires a file as a parameter.");
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Tossim_removeChannel" "', argument " "2"" of type '" "char *""'");
}
- arg2 = buf2;
+ arg2 = reinterpret_cast< char * >(buf2);
{
if (!PyFile_Check(obj2)) {
PyErr_SetString(PyExc_TypeError, "Requires a file as a parameter.");
{ (char *)"Radio_swigregister", Radio_swigregister, METH_VARARGS, NULL},
{ (char *)"new_Packet", _wrap_new_Packet, METH_VARARGS, NULL},
{ (char *)"delete_Packet", _wrap_delete_Packet, METH_VARARGS, NULL},
+ { (char *)"Packet_setSource", _wrap_Packet_setSource, METH_VARARGS, NULL},
+ { (char *)"Packet_source", _wrap_Packet_source, METH_VARARGS, NULL},
{ (char *)"Packet_setDestination", _wrap_Packet_setDestination, METH_VARARGS, NULL},
{ (char *)"Packet_destination", _wrap_Packet_destination, METH_VARARGS, NULL},
{ (char *)"Packet_setLength", _wrap_Packet_setLength, METH_VARARGS, NULL},
{ (char *)"Mote_turnOff", _wrap_Mote_turnOff, METH_VARARGS, NULL},
{ (char *)"Mote_turnOn", _wrap_Mote_turnOn, METH_VARARGS, NULL},
{ (char *)"Mote_getVariable", _wrap_Mote_getVariable, METH_VARARGS, NULL},
+ { (char *)"Mote_addNoiseTraceReading", _wrap_Mote_addNoiseTraceReading, METH_VARARGS, NULL},
+ { (char *)"Mote_createNoiseModel", _wrap_Mote_createNoiseModel, METH_VARARGS, NULL},
+ { (char *)"Mote_generateNoise", _wrap_Mote_generateNoise, METH_VARARGS, NULL},
{ (char *)"Mote_swigregister", Mote_swigregister, METH_VARARGS, NULL},
{ (char *)"new_Tossim", _wrap_new_Tossim, METH_VARARGS, NULL},
{ (char *)"delete_Tossim", _wrap_delete_Tossim, METH_VARARGS, NULL},
* structures together.
*
* The generated swig_type_info structures are assigned staticly to an initial
- * array. We just loop though that array, and handle each type individually.
+ * array. We just loop through that array, and handle each type individually.
* First we lookup if this type has been already loaded, and if so, use the
* loaded structure instead of the generated one. Then we have to fill in the
* cast linked list. The cast data is initially stored in something like a
#define SWIGRUNTIME_DEBUG
#endif
+
SWIGRUNTIME void
SWIG_InitializeModule(void *clientdata) {
size_t i;
- swig_module_info *module_head;
- static int init_run = 0;
+ swig_module_info *module_head, *iter;
+ int found;
clientdata = clientdata;
- if (init_run) return;
- init_run = 1;
-
- /* Initialize the swig_module */
- swig_module.type_initial = swig_type_initial;
- swig_module.cast_initial = swig_cast_initial;
+ /* check to see if the circular list has been setup, if not, set it up */
+ if (swig_module.next==0) {
+ /* Initialize the swig_module */
+ swig_module.type_initial = swig_type_initial;
+ swig_module.cast_initial = swig_cast_initial;
+ swig_module.next = &swig_module;
+ }
/* Try and load any already created modules */
module_head = SWIG_GetModule(clientdata);
- if (module_head) {
+ if (!module_head) {
+ /* This is the first module loaded for this interpreter */
+ /* so set the swig module into the interpreter */
+ SWIG_SetModule(clientdata, &swig_module);
+ module_head = &swig_module;
+ } else {
+ /* the interpreter has loaded a SWIG module, but has it loaded this one? */
+ found=0;
+ iter=module_head;
+ do {
+ if (iter==&swig_module) {
+ found=1;
+ break;
+ }
+ iter=iter->next;
+ } while (iter!= module_head);
+
+ /* if the is found in the list, then all is done and we may leave */
+ if (found) return;
+ /* otherwise we must add out module into the list */
swig_module.next = module_head->next;
module_head->next = &swig_module;
- } else {
- /* This is the first module loaded */
- swig_module.next = &swig_module;
- SWIG_SetModule(clientdata, &swig_module);
}
/* Now work on filling in swig_module.types */
}
SWIGINTERN PyObject *
- SWIG_globals() {
+ SWIG_globals(void) {
static PyObject *_SWIG_globals = 0;
if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink();
return _SWIG_globals;
swig_type_info **types_initial) {
size_t i;
for (i = 0; methods[i].ml_name; ++i) {
- char *c = methods[i].ml_doc;
+ const char *c = methods[i].ml_doc;
if (c && (c = strstr(c, "swig_ptr: "))) {
int j;
swig_const_info *ci = 0;
- char *name = c + 10;
+ const char *name = c + 10;
for (j = 0; const_table[j].type; ++j) {
if (strncmp(const_table[j].name, name,
strlen(const_table[j].name)) == 0) {