]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/lib/tossim/tossim_wrap.cxx
Merge TinyOS 2.1.1 into master.
[tinyos-2.x.git] / tos / lib / tossim / tossim_wrap.cxx
index 1e19f64e1014458a9b4c743ea81d6b2a9e8dfd8d..88071362ac24fd03feff6028a674226a604b731b 100644 (file)
@@ -1,6 +1,6 @@
 /* ----------------------------------------------------------------------------
  * 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
@@ -12,7 +12,7 @@
 #define SWIG_PYTHON_DIRECTOR_NO_VTABLE
 
 #ifdef __cplusplus
-template<class T> class SwigValueWrapper {
+template<typename T> class SwigValueWrapper {
     T *tt;
 public:
     SwigValueWrapper() : tt(0) { }
@@ -25,6 +25,10 @@ public:
 private:
     SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
 };
+
+template <typename T> T SwigValueInit() {
+  return T();
+}
 #endif
 
 /* -----------------------------------------------------------------------------
@@ -34,14 +38,14 @@ private:
 
 /* 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
 
@@ -120,10 +124,16 @@ private:
 #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>
@@ -137,7 +147,7 @@ private:
 
 /* 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
@@ -360,7 +370,7 @@ SWIG_TypeNameComp(const char *f1, const char *l1,
     while ((*f2 == ' ') && (f2 != l2)) ++f2;
     if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
   }
-  return (l1 - f1) - (l2 - f2);
+  return (int)((l1 - f1) - (l2 - f2));
 }
 
 /*
@@ -714,8 +724,6 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
 
 
 
-/* Python.h has to appear first */
-#include <Python.h>
 
 /* Add PyOS_snprintf for old Pythons */
 #if PY_VERSION_HEX < 0x02020000
@@ -796,6 +804,14 @@ PyObject *PyBool_FromLong(long ok)
 }
 #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
@@ -1101,14 +1117,14 @@ SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
 /* 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;
     }
   }  
@@ -1116,14 +1132,14 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, int min, int max, PyOb
     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;
@@ -1189,7 +1205,7 @@ extern "C" {
 SWIGRUNTIMEINLINE PyObject * 
 _SWIG_Py_None(void)
 {
-  PyObject *none = Py_BuildValue("");
+  PyObject *none = Py_BuildValue((char*)"");
   Py_DECREF(none);
   return none;
 }
@@ -1602,9 +1618,11 @@ _PySwigObject_type(void) {
     (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
   };
@@ -2048,7 +2066,7 @@ SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
     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;
@@ -2169,7 +2187,7 @@ SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
    return;
  }
 #endif
- dict = PyObject_GetAttrString(inst, "__dict__");
+ dict = PyObject_GetAttrString(inst, (char*)"__dict__");
  PyDict_SetItem(dict, SWIG_This(), swig_this);
  Py_DECREF(dict);
 } 
@@ -2310,7 +2328,7 @@ SWIG_Python_SetModule(swig_module_info *swig_module) {
 
 /* The python cached type query */
 SWIGRUNTIME PyObject *
-SWIG_Python_TypeCache() {
+SWIG_Python_TypeCache(void) {
   static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
   return cache;
 }
@@ -2480,7 +2498,7 @@ static swig_module_info swig_module = {swig_types, 12, 0, 0, 0, 0};
 
 #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
 
@@ -2491,7 +2509,8 @@ static swig_module_info swig_module = {swig_types, 12, 0, 0, 0, 0};
 
 #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)) 
@@ -2768,14 +2787,12 @@ SWIG_From_int  (int value)
 
 
 #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
 
 
@@ -2931,7 +2948,7 @@ SWIGINTERNINLINE PyObject*
 
 
 SWIGINTERN swig_type_info*
-SWIG_pchar_descriptor()
+SWIG_pchar_descriptor(void)
 {
   static int init = 0;
   static swig_type_info* info = 0;
@@ -2971,7 +2988,7 @@ SWIGINTERN int
 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) {
@@ -4109,6 +4126,58 @@ fail:
 }
 
 
+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 ;
@@ -4280,7 +4349,7 @@ SWIGINTERN PyObject *_wrap_Packet_data(PyObject *SWIGUNUSEDPARM(self), PyObject
   }
   arg1 = reinterpret_cast< Packet * >(argp1);
   result = (char *)(arg1)->data();
-  resultobj = SWIG_FromCharPtr(result);
+  resultobj = SWIG_FromCharPtr((const char *)result);
   return resultobj;
 fail:
   return NULL;
@@ -4311,7 +4380,7 @@ SWIGINTERN PyObject *_wrap_Packet_setData(PyObject *SWIGUNUSEDPARM(self), PyObje
   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();
@@ -4473,11 +4542,11 @@ SWIGINTERN PyObject *_wrap_variable_string_t_type_set(PyObject *SWIGUNUSEDPARM(s
   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;
   }
@@ -4505,7 +4574,7 @@ SWIGINTERN PyObject *_wrap_variable_string_t_type_get(PyObject *SWIGUNUSEDPARM(s
   }
   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;
@@ -4534,11 +4603,11 @@ SWIGINTERN PyObject *_wrap_variable_string_t_ptr_set(PyObject *SWIGUNUSEDPARM(se
   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;
   }
@@ -4566,7 +4635,7 @@ SWIGINTERN PyObject *_wrap_variable_string_t_ptr_get(PyObject *SWIGUNUSEDPARM(se
   }
   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;
@@ -4774,8 +4843,8 @@ SWIGINTERN PyObject *_wrap_nesc_app_t_numVariables_set(PyObject *SWIGUNUSEDPARM(
           }
         }
         else {
-          app->variableNames[i] = "<bad string>";
-          app->variableTypes[i] = "<bad string>";
+          app->variableNames[i] = (char*)"<bad string>";
+          app->variableTypes[i] = (char*)"<bad string>";
         }
       }
       
@@ -4846,8 +4915,8 @@ SWIGINTERN PyObject *_wrap_nesc_app_t_numVariables_get(PyObject *SWIGUNUSEDPARM(
           }
         }
         else {
-          app->variableNames[i] = "<bad string>";
-          app->variableTypes[i] = "<bad string>";
+          app->variableNames[i] = (char*)"<bad string>";
+          app->variableTypes[i] = (char*)"<bad string>";
         }
       }
       
@@ -4915,8 +4984,8 @@ SWIGINTERN PyObject *_wrap_nesc_app_t_variableNames_set(PyObject *SWIGUNUSEDPARM
           }
         }
         else {
-          app->variableNames[i] = "<bad string>";
-          app->variableTypes[i] = "<bad string>";
+          app->variableNames[i] = (char*)"<bad string>";
+          app->variableTypes[i] = (char*)"<bad string>";
         }
       }
       
@@ -4987,8 +5056,8 @@ SWIGINTERN PyObject *_wrap_nesc_app_t_variableNames_get(PyObject *SWIGUNUSEDPARM
           }
         }
         else {
-          app->variableNames[i] = "<bad string>";
-          app->variableTypes[i] = "<bad string>";
+          app->variableNames[i] = (char*)"<bad string>";
+          app->variableTypes[i] = (char*)"<bad string>";
         }
       }
       
@@ -5056,8 +5125,8 @@ SWIGINTERN PyObject *_wrap_nesc_app_t_variableTypes_set(PyObject *SWIGUNUSEDPARM
           }
         }
         else {
-          app->variableNames[i] = "<bad string>";
-          app->variableTypes[i] = "<bad string>";
+          app->variableNames[i] = (char*)"<bad string>";
+          app->variableTypes[i] = (char*)"<bad string>";
         }
       }
       
@@ -5128,8 +5197,8 @@ SWIGINTERN PyObject *_wrap_nesc_app_t_variableTypes_get(PyObject *SWIGUNUSEDPARM
           }
         }
         else {
-          app->variableNames[i] = "<bad string>";
-          app->variableTypes[i] = "<bad string>";
+          app->variableNames[i] = (char*)"<bad string>";
+          app->variableTypes[i] = (char*)"<bad string>";
         }
       }
       
@@ -5197,8 +5266,8 @@ SWIGINTERN PyObject *_wrap_nesc_app_t_variableArray_set(PyObject *SWIGUNUSEDPARM
           }
         }
         else {
-          app->variableNames[i] = "<bad string>";
-          app->variableTypes[i] = "<bad string>";
+          app->variableNames[i] = (char*)"<bad string>";
+          app->variableTypes[i] = (char*)"<bad string>";
         }
       }
       
@@ -5269,8 +5338,8 @@ SWIGINTERN PyObject *_wrap_nesc_app_t_variableArray_get(PyObject *SWIGUNUSEDPARM
           }
         }
         else {
-          app->variableNames[i] = "<bad string>";
-          app->variableTypes[i] = "<bad string>";
+          app->variableNames[i] = (char*)"<bad string>";
+          app->variableTypes[i] = (char*)"<bad string>";
         }
       }
       
@@ -5347,8 +5416,8 @@ SWIGINTERN PyObject *_wrap_delete_nesc_app_t(PyObject *SWIGUNUSEDPARM(self), PyO
           }
         }
         else {
-          app->variableNames[i] = "<bad string>";
-          app->variableTypes[i] = "<bad string>";
+          app->variableNames[i] = (char*)"<bad string>";
+          app->variableTypes[i] = (char*)"<bad string>";
         }
       }
       
@@ -5398,12 +5467,12 @@ SWIGINTERN PyObject *_wrap_new_Variable(PyObject *SWIGUNUSEDPARM(self), PyObject
   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""'");
@@ -5539,8 +5608,8 @@ SWIGINTERN PyObject *_wrap_new_Mote(PyObject *SWIGUNUSEDPARM(self), PyObject *ar
           }
         }
         else {
-          app->variableNames[i] = "<bad string>";
-          app->variableTypes[i] = "<bad string>";
+          app->variableNames[i] = (char*)"<bad string>";
+          app->variableTypes[i] = (char*)"<bad string>";
         }
       }
       
@@ -5790,7 +5859,7 @@ SWIGINTERN PyObject *_wrap_Mote_getVariable(PyObject *SWIGUNUSEDPARM(self), PyOb
   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;
@@ -5801,6 +5870,88 @@ fail:
 }
 
 
+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;
@@ -5858,8 +6009,8 @@ SWIGINTERN PyObject *_wrap_new_Tossim(PyObject *SWIGUNUSEDPARM(self), PyObject *
           }
         }
         else {
-          app->variableNames[i] = "<bad string>";
-          app->variableTypes[i] = "<bad string>";
+          app->variableNames[i] = (char*)"<bad string>";
+          app->variableTypes[i] = (char*)"<bad string>";
         }
       }
       
@@ -6006,7 +6157,7 @@ SWIGINTERN PyObject *_wrap_Tossim_timeStr(PyObject *SWIGUNUSEDPARM(self), PyObje
   }
   arg1 = reinterpret_cast< Tossim * >(argp1);
   result = (char *)(arg1)->timeStr();
-  resultobj = SWIG_FromCharPtr(result);
+  resultobj = SWIG_FromCharPtr((const char *)result);
   return resultobj;
 fail:
   return NULL;
@@ -6120,7 +6271,7 @@ SWIGINTERN PyObject *_wrap_Tossim_addChannel(PyObject *SWIGUNUSEDPARM(self), PyO
   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.");
@@ -6163,7 +6314,7 @@ SWIGINTERN PyObject *_wrap_Tossim_removeChannel(PyObject *SWIGUNUSEDPARM(self),
   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.");
@@ -6345,6 +6496,8 @@ static PyMethodDef SwigMethods[] = {
         { (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},
@@ -6395,6 +6548,9 @@ static PyMethodDef SwigMethods[] = {
         { (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},
@@ -6499,7 +6655,7 @@ static swig_const_info swig_const_table[] = {
  * 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
@@ -6537,30 +6693,47 @@ extern "C" {
 #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 */
@@ -6873,7 +7046,7 @@ extern "C" {
   }
   
   SWIGINTERN PyObject *
-  SWIG_globals() {
+  SWIG_globals(void) {
     static PyObject *_SWIG_globals = 0; 
     if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink();  
     return _SWIG_globals;
@@ -6918,11 +7091,11 @@ extern "C" {
     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) {