[Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/tossim TOSSIM.py, 1.5, 1.6 tossim.c, 1.5, 1.6 tossim.i, 1.4, 1.5 tossim_wrap.cxx, 1.5, 1.6
Phil Levis
scipio at users.sourceforge.net
Fri Aug 15 11:34:39 PDT 2008
Update of /cvsroot/tinyos/tinyos-2.x/tos/lib/tossim
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv15124
Modified Files:
TOSSIM.py tossim.c tossim.i tossim_wrap.cxx
Log Message:
Cast away const to get rid of warnings.
Index: TOSSIM.py
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/tossim/TOSSIM.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** TOSSIM.py 4 Jul 2007 16:15:11 -0000 1.5
--- TOSSIM.py 15 Aug 2008 18:34:36 -0000 1.6
***************
*** 1,22 ****
! # This file was created automatically by SWIG.
# Don't modify this file, modify the SWIG interface instead.
# This file is compatible with both classic and new-style classes.
import _TOSSIM
! def _swig_setattr(self,class_type,name,value):
if (name == "this"):
! if isinstance(value, class_type):
! self.__dict__[name] = value.this
! if hasattr(value,"thisown"): self.__dict__["thisown"] = value.thisown
! del value.thisown
return
method = class_type.__swig_setmethods__.get(name,None)
if method: return method(self,value)
! self.__dict__[name] = value
def _swig_getattr(self,class_type,name):
method = class_type.__swig_getmethods__.get(name,None)
if method: return method(self)
raise AttributeError,name
import types
try:
--- 1,42 ----
! # This file was automatically generated by SWIG (http://www.swig.org).
! # Version 1.3.33
! #
# Don't modify this file, modify the SWIG interface instead.
# This file is compatible with both classic and new-style classes.
+
import _TOSSIM
! import new
! new_instancemethod = new.instancemethod
! try:
! _swig_property = property
! except NameError:
! pass # Python < 2.2 doesn't have 'property'.
! def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
! if (name == "thisown"): return self.this.own(value)
if (name == "this"):
! if type(value).__name__ == 'PySwigObject':
! self.__dict__[name] = value
return
method = class_type.__swig_setmethods__.get(name,None)
if method: return method(self,value)
! if (not static) or hasattr(self,name):
! self.__dict__[name] = value
! else:
! raise AttributeError("You cannot add attributes to %s" % self)
!
! def _swig_setattr(self,class_type,name,value):
! return _swig_setattr_nondynamic(self,class_type,name,value,0)
def _swig_getattr(self,class_type,name):
+ if (name == "thisown"): return self.this.own()
method = class_type.__swig_getmethods__.get(name,None)
if method: return method(self)
raise AttributeError,name
+ def _swig_repr(self):
+ try: strthis = "proxy of " + self.this.__repr__()
+ except: strthis = ""
+ return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
+
import types
try:
***************
*** 26,29 ****
--- 46,50 ----
class _object : pass
_newclass = 0
+ del types
***************
*** 33,76 ****
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, MAC, name)
! def __init__(self,*args):
! _swig_setattr(self, MAC, 'this', apply(_TOSSIM.new_MAC,args))
! _swig_setattr(self, MAC, 'thisown', 1)
! def __del__(self, destroy= _TOSSIM.delete_MAC):
! try:
! if self.thisown: destroy(self)
! except: pass
! def initHigh(*args): return apply(_TOSSIM.MAC_initHigh,args)
! def initLow(*args): return apply(_TOSSIM.MAC_initLow,args)
! def high(*args): return apply(_TOSSIM.MAC_high,args)
! def low(*args): return apply(_TOSSIM.MAC_low,args)
! def symbolsPerSec(*args): return apply(_TOSSIM.MAC_symbolsPerSec,args)
! def bitsPerSymbol(*args): return apply(_TOSSIM.MAC_bitsPerSymbol,args)
! def preambleLength(*args): return apply(_TOSSIM.MAC_preambleLength,args)
! def exponentBase(*args): return apply(_TOSSIM.MAC_exponentBase,args)
! def maxIterations(*args): return apply(_TOSSIM.MAC_maxIterations,args)
! def minFreeSamples(*args): return apply(_TOSSIM.MAC_minFreeSamples,args)
! def rxtxDelay(*args): return apply(_TOSSIM.MAC_rxtxDelay,args)
! def ackTime(*args): return apply(_TOSSIM.MAC_ackTime,args)
! def setInitHigh(*args): return apply(_TOSSIM.MAC_setInitHigh,args)
! def setInitLow(*args): return apply(_TOSSIM.MAC_setInitLow,args)
! def setHigh(*args): return apply(_TOSSIM.MAC_setHigh,args)
! def setLow(*args): return apply(_TOSSIM.MAC_setLow,args)
! def setSymbolsPerSec(*args): return apply(_TOSSIM.MAC_setSymbolsPerSec,args)
! def setBitsBerSymbol(*args): return apply(_TOSSIM.MAC_setBitsBerSymbol,args)
! def setPreambleLength(*args): return apply(_TOSSIM.MAC_setPreambleLength,args)
! def setExponentBase(*args): return apply(_TOSSIM.MAC_setExponentBase,args)
! def setMaxIterations(*args): return apply(_TOSSIM.MAC_setMaxIterations,args)
! def setMinFreeSamples(*args): return apply(_TOSSIM.MAC_setMinFreeSamples,args)
! def setRxtxDelay(*args): return apply(_TOSSIM.MAC_setRxtxDelay,args)
! def setAckTime(*args): return apply(_TOSSIM.MAC_setAckTime,args)
! def __repr__(self):
! return "<C MAC instance at %s>" % (self.this,)
!
! class MACPtr(MAC):
! def __init__(self,this):
! _swig_setattr(self, MAC, 'this', this)
! if not hasattr(self,"thisown"): _swig_setattr(self, MAC, 'thisown', 0)
! _swig_setattr(self, MAC,self.__class__,MAC)
! _TOSSIM.MAC_swigregister(MACPtr)
class Radio(_object):
--- 54,90 ----
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, MAC, name)
! __repr__ = _swig_repr
! def __init__(self, *args):
! this = _TOSSIM.new_MAC(*args)
! try: self.this.append(this)
! except: self.this = this
! __swig_destroy__ = _TOSSIM.delete_MAC
! __del__ = lambda self : None;
! def initHigh(*args): return _TOSSIM.MAC_initHigh(*args)
! def initLow(*args): return _TOSSIM.MAC_initLow(*args)
! def high(*args): return _TOSSIM.MAC_high(*args)
! def low(*args): return _TOSSIM.MAC_low(*args)
! def symbolsPerSec(*args): return _TOSSIM.MAC_symbolsPerSec(*args)
! def bitsPerSymbol(*args): return _TOSSIM.MAC_bitsPerSymbol(*args)
! def preambleLength(*args): return _TOSSIM.MAC_preambleLength(*args)
! def exponentBase(*args): return _TOSSIM.MAC_exponentBase(*args)
! def maxIterations(*args): return _TOSSIM.MAC_maxIterations(*args)
! def minFreeSamples(*args): return _TOSSIM.MAC_minFreeSamples(*args)
! def rxtxDelay(*args): return _TOSSIM.MAC_rxtxDelay(*args)
! def ackTime(*args): return _TOSSIM.MAC_ackTime(*args)
! def setInitHigh(*args): return _TOSSIM.MAC_setInitHigh(*args)
! def setInitLow(*args): return _TOSSIM.MAC_setInitLow(*args)
! def setHigh(*args): return _TOSSIM.MAC_setHigh(*args)
! def setLow(*args): return _TOSSIM.MAC_setLow(*args)
! def setSymbolsPerSec(*args): return _TOSSIM.MAC_setSymbolsPerSec(*args)
! def setBitsBerSymbol(*args): return _TOSSIM.MAC_setBitsBerSymbol(*args)
! def setPreambleLength(*args): return _TOSSIM.MAC_setPreambleLength(*args)
! def setExponentBase(*args): return _TOSSIM.MAC_setExponentBase(*args)
! def setMaxIterations(*args): return _TOSSIM.MAC_setMaxIterations(*args)
! def setMinFreeSamples(*args): return _TOSSIM.MAC_setMinFreeSamples(*args)
! def setRxtxDelay(*args): return _TOSSIM.MAC_setRxtxDelay(*args)
! def setAckTime(*args): return _TOSSIM.MAC_setAckTime(*args)
! MAC_swigregister = _TOSSIM.MAC_swigregister
! MAC_swigregister(MAC)
class Radio(_object):
***************
*** 79,104 ****
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, Radio, name)
! def __init__(self,*args):
! _swig_setattr(self, Radio, 'this', apply(_TOSSIM.new_Radio,args))
! _swig_setattr(self, Radio, 'thisown', 1)
! def __del__(self, destroy= _TOSSIM.delete_Radio):
! try:
! if self.thisown: destroy(self)
! except: pass
! def add(*args): return apply(_TOSSIM.Radio_add,args)
! def gain(*args): return apply(_TOSSIM.Radio_gain,args)
! def connected(*args): return apply(_TOSSIM.Radio_connected,args)
! def remove(*args): return apply(_TOSSIM.Radio_remove,args)
! def setNoise(*args): return apply(_TOSSIM.Radio_setNoise,args)
! def setSensitivity(*args): return apply(_TOSSIM.Radio_setSensitivity,args)
! def __repr__(self):
! return "<C Radio instance at %s>" % (self.this,)
!
! class RadioPtr(Radio):
! def __init__(self,this):
! _swig_setattr(self, Radio, 'this', this)
! if not hasattr(self,"thisown"): _swig_setattr(self, Radio, 'thisown', 0)
! _swig_setattr(self, Radio,self.__class__,Radio)
! _TOSSIM.Radio_swigregister(RadioPtr)
class Packet(_object):
--- 93,111 ----
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, Radio, name)
! __repr__ = _swig_repr
! def __init__(self, *args):
! this = _TOSSIM.new_Radio(*args)
! try: self.this.append(this)
! except: self.this = this
! __swig_destroy__ = _TOSSIM.delete_Radio
! __del__ = lambda self : None;
! def add(*args): return _TOSSIM.Radio_add(*args)
! def gain(*args): return _TOSSIM.Radio_gain(*args)
! def connected(*args): return _TOSSIM.Radio_connected(*args)
! def remove(*args): return _TOSSIM.Radio_remove(*args)
! def setNoise(*args): return _TOSSIM.Radio_setNoise(*args)
! def setSensitivity(*args): return _TOSSIM.Radio_setSensitivity(*args)
! Radio_swigregister = _TOSSIM.Radio_swigregister
! Radio_swigregister(Radio)
class Packet(_object):
***************
*** 107,140 ****
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, Packet, name)
! def __init__(self,*args):
! _swig_setattr(self, Packet, 'this', apply(_TOSSIM.new_Packet,args))
! _swig_setattr(self, Packet, 'thisown', 1)
! def __del__(self, destroy= _TOSSIM.delete_Packet):
! try:
! if self.thisown: destroy(self)
! except: pass
! def setSource(*args): return apply(_TOSSIM.Packet_setSource,args)
! def source(*args): return apply(_TOSSIM.Packet_source,args)
! def setDestination(*args): return apply(_TOSSIM.Packet_setDestination,args)
! def destination(*args): return apply(_TOSSIM.Packet_destination,args)
! def setLength(*args): return apply(_TOSSIM.Packet_setLength,args)
! def length(*args): return apply(_TOSSIM.Packet_length,args)
! def setType(*args): return apply(_TOSSIM.Packet_setType,args)
! def type(*args): return apply(_TOSSIM.Packet_type,args)
! def data(*args): return apply(_TOSSIM.Packet_data,args)
! def setData(*args): return apply(_TOSSIM.Packet_setData,args)
! def maxLength(*args): return apply(_TOSSIM.Packet_maxLength,args)
! def setStrength(*args): return apply(_TOSSIM.Packet_setStrength,args)
! def deliver(*args): return apply(_TOSSIM.Packet_deliver,args)
! def deliverNow(*args): return apply(_TOSSIM.Packet_deliverNow,args)
! def __repr__(self):
! return "<C Packet instance at %s>" % (self.this,)
!
! class PacketPtr(Packet):
! def __init__(self,this):
! _swig_setattr(self, Packet, 'this', this)
! if not hasattr(self,"thisown"): _swig_setattr(self, Packet, 'thisown', 0)
! _swig_setattr(self, Packet,self.__class__,Packet)
! _TOSSIM.Packet_swigregister(PacketPtr)
class variable_string_t(_object):
--- 114,140 ----
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, Packet, name)
! __repr__ = _swig_repr
! def __init__(self, *args):
! this = _TOSSIM.new_Packet(*args)
! try: self.this.append(this)
! except: self.this = this
! __swig_destroy__ = _TOSSIM.delete_Packet
! __del__ = lambda self : None;
! def setSource(*args): return _TOSSIM.Packet_setSource(*args)
! def source(*args): return _TOSSIM.Packet_source(*args)
! def setDestination(*args): return _TOSSIM.Packet_setDestination(*args)
! def destination(*args): return _TOSSIM.Packet_destination(*args)
! def setLength(*args): return _TOSSIM.Packet_setLength(*args)
! def length(*args): return _TOSSIM.Packet_length(*args)
! def setType(*args): return _TOSSIM.Packet_setType(*args)
! def type(*args): return _TOSSIM.Packet_type(*args)
! def data(*args): return _TOSSIM.Packet_data(*args)
! def setData(*args): return _TOSSIM.Packet_setData(*args)
! def maxLength(*args): return _TOSSIM.Packet_maxLength(*args)
! def setStrength(*args): return _TOSSIM.Packet_setStrength(*args)
! def deliver(*args): return _TOSSIM.Packet_deliver(*args)
! def deliverNow(*args): return _TOSSIM.Packet_deliverNow(*args)
! Packet_swigregister = _TOSSIM.Packet_swigregister
! Packet_swigregister(Packet)
class variable_string_t(_object):
***************
*** 143,174 ****
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, variable_string_t, name)
__swig_setmethods__["type"] = _TOSSIM.variable_string_t_type_set
__swig_getmethods__["type"] = _TOSSIM.variable_string_t_type_get
! if _newclass:type = property(_TOSSIM.variable_string_t_type_get,_TOSSIM.variable_string_t_type_set)
__swig_setmethods__["ptr"] = _TOSSIM.variable_string_t_ptr_set
__swig_getmethods__["ptr"] = _TOSSIM.variable_string_t_ptr_get
! if _newclass:ptr = property(_TOSSIM.variable_string_t_ptr_get,_TOSSIM.variable_string_t_ptr_set)
__swig_setmethods__["len"] = _TOSSIM.variable_string_t_len_set
__swig_getmethods__["len"] = _TOSSIM.variable_string_t_len_get
! if _newclass:len = property(_TOSSIM.variable_string_t_len_get,_TOSSIM.variable_string_t_len_set)
__swig_setmethods__["isArray"] = _TOSSIM.variable_string_t_isArray_set
__swig_getmethods__["isArray"] = _TOSSIM.variable_string_t_isArray_get
! if _newclass:isArray = property(_TOSSIM.variable_string_t_isArray_get,_TOSSIM.variable_string_t_isArray_set)
! def __init__(self,*args):
! _swig_setattr(self, variable_string_t, 'this', apply(_TOSSIM.new_variable_string_t,args))
! _swig_setattr(self, variable_string_t, 'thisown', 1)
! def __del__(self, destroy= _TOSSIM.delete_variable_string_t):
! try:
! if self.thisown: destroy(self)
! except: pass
! def __repr__(self):
! return "<C variable_string_t instance at %s>" % (self.this,)
!
! class variable_string_tPtr(variable_string_t):
! def __init__(self,this):
! _swig_setattr(self, variable_string_t, 'this', this)
! if not hasattr(self,"thisown"): _swig_setattr(self, variable_string_t, 'thisown', 0)
! _swig_setattr(self, variable_string_t,self.__class__,variable_string_t)
! _TOSSIM.variable_string_t_swigregister(variable_string_tPtr)
class nesc_app_t(_object):
--- 143,167 ----
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, variable_string_t, name)
+ __repr__ = _swig_repr
__swig_setmethods__["type"] = _TOSSIM.variable_string_t_type_set
__swig_getmethods__["type"] = _TOSSIM.variable_string_t_type_get
! if _newclass:type = _swig_property(_TOSSIM.variable_string_t_type_get, _TOSSIM.variable_string_t_type_set)
__swig_setmethods__["ptr"] = _TOSSIM.variable_string_t_ptr_set
__swig_getmethods__["ptr"] = _TOSSIM.variable_string_t_ptr_get
! if _newclass:ptr = _swig_property(_TOSSIM.variable_string_t_ptr_get, _TOSSIM.variable_string_t_ptr_set)
__swig_setmethods__["len"] = _TOSSIM.variable_string_t_len_set
__swig_getmethods__["len"] = _TOSSIM.variable_string_t_len_get
! if _newclass:len = _swig_property(_TOSSIM.variable_string_t_len_get, _TOSSIM.variable_string_t_len_set)
__swig_setmethods__["isArray"] = _TOSSIM.variable_string_t_isArray_set
__swig_getmethods__["isArray"] = _TOSSIM.variable_string_t_isArray_get
! if _newclass:isArray = _swig_property(_TOSSIM.variable_string_t_isArray_get, _TOSSIM.variable_string_t_isArray_set)
! def __init__(self, *args):
! this = _TOSSIM.new_variable_string_t(*args)
! try: self.this.append(this)
! except: self.this = this
! __swig_destroy__ = _TOSSIM.delete_variable_string_t
! __del__ = lambda self : None;
! variable_string_t_swigregister = _TOSSIM.variable_string_t_swigregister
! variable_string_t_swigregister(variable_string_t)
class nesc_app_t(_object):
***************
*** 177,208 ****
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, nesc_app_t, name)
__swig_setmethods__["numVariables"] = _TOSSIM.nesc_app_t_numVariables_set
__swig_getmethods__["numVariables"] = _TOSSIM.nesc_app_t_numVariables_get
! if _newclass:numVariables = property(_TOSSIM.nesc_app_t_numVariables_get,_TOSSIM.nesc_app_t_numVariables_set)
__swig_setmethods__["variableNames"] = _TOSSIM.nesc_app_t_variableNames_set
__swig_getmethods__["variableNames"] = _TOSSIM.nesc_app_t_variableNames_get
! if _newclass:variableNames = property(_TOSSIM.nesc_app_t_variableNames_get,_TOSSIM.nesc_app_t_variableNames_set)
__swig_setmethods__["variableTypes"] = _TOSSIM.nesc_app_t_variableTypes_set
__swig_getmethods__["variableTypes"] = _TOSSIM.nesc_app_t_variableTypes_get
! if _newclass:variableTypes = property(_TOSSIM.nesc_app_t_variableTypes_get,_TOSSIM.nesc_app_t_variableTypes_set)
__swig_setmethods__["variableArray"] = _TOSSIM.nesc_app_t_variableArray_set
__swig_getmethods__["variableArray"] = _TOSSIM.nesc_app_t_variableArray_get
! if _newclass:variableArray = property(_TOSSIM.nesc_app_t_variableArray_get,_TOSSIM.nesc_app_t_variableArray_set)
! def __init__(self,*args):
! _swig_setattr(self, nesc_app_t, 'this', apply(_TOSSIM.new_nesc_app_t,args))
! _swig_setattr(self, nesc_app_t, 'thisown', 1)
! def __del__(self, destroy= _TOSSIM.delete_nesc_app_t):
! try:
! if self.thisown: destroy(self)
! except: pass
! def __repr__(self):
! return "<C nesc_app_t instance at %s>" % (self.this,)
!
! class nesc_app_tPtr(nesc_app_t):
! def __init__(self,this):
! _swig_setattr(self, nesc_app_t, 'this', this)
! if not hasattr(self,"thisown"): _swig_setattr(self, nesc_app_t, 'thisown', 0)
! _swig_setattr(self, nesc_app_t,self.__class__,nesc_app_t)
! _TOSSIM.nesc_app_t_swigregister(nesc_app_tPtr)
class Variable(_object):
--- 170,194 ----
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, nesc_app_t, name)
+ __repr__ = _swig_repr
__swig_setmethods__["numVariables"] = _TOSSIM.nesc_app_t_numVariables_set
__swig_getmethods__["numVariables"] = _TOSSIM.nesc_app_t_numVariables_get
! if _newclass:numVariables = _swig_property(_TOSSIM.nesc_app_t_numVariables_get, _TOSSIM.nesc_app_t_numVariables_set)
__swig_setmethods__["variableNames"] = _TOSSIM.nesc_app_t_variableNames_set
__swig_getmethods__["variableNames"] = _TOSSIM.nesc_app_t_variableNames_get
! if _newclass:variableNames = _swig_property(_TOSSIM.nesc_app_t_variableNames_get, _TOSSIM.nesc_app_t_variableNames_set)
__swig_setmethods__["variableTypes"] = _TOSSIM.nesc_app_t_variableTypes_set
__swig_getmethods__["variableTypes"] = _TOSSIM.nesc_app_t_variableTypes_get
! if _newclass:variableTypes = _swig_property(_TOSSIM.nesc_app_t_variableTypes_get, _TOSSIM.nesc_app_t_variableTypes_set)
__swig_setmethods__["variableArray"] = _TOSSIM.nesc_app_t_variableArray_set
__swig_getmethods__["variableArray"] = _TOSSIM.nesc_app_t_variableArray_get
! if _newclass:variableArray = _swig_property(_TOSSIM.nesc_app_t_variableArray_get, _TOSSIM.nesc_app_t_variableArray_set)
! def __init__(self, *args):
! this = _TOSSIM.new_nesc_app_t(*args)
! try: self.this.append(this)
! except: self.this = this
! __swig_destroy__ = _TOSSIM.delete_nesc_app_t
! __del__ = lambda self : None;
! nesc_app_t_swigregister = _TOSSIM.nesc_app_t_swigregister
! nesc_app_t_swigregister(nesc_app_t)
class Variable(_object):
***************
*** 211,231 ****
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, Variable, name)
! def __init__(self,*args):
! _swig_setattr(self, Variable, 'this', apply(_TOSSIM.new_Variable,args))
! _swig_setattr(self, Variable, 'thisown', 1)
! def __del__(self, destroy= _TOSSIM.delete_Variable):
! try:
! if self.thisown: destroy(self)
! except: pass
! def getData(*args): return apply(_TOSSIM.Variable_getData,args)
! def __repr__(self):
! return "<C Variable instance at %s>" % (self.this,)
!
! class VariablePtr(Variable):
! def __init__(self,this):
! _swig_setattr(self, Variable, 'this', this)
! if not hasattr(self,"thisown"): _swig_setattr(self, Variable, 'thisown', 0)
! _swig_setattr(self, Variable,self.__class__,Variable)
! _TOSSIM.Variable_swigregister(VariablePtr)
class Mote(_object):
--- 197,210 ----
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, Variable, name)
! __repr__ = _swig_repr
! def __init__(self, *args):
! this = _TOSSIM.new_Variable(*args)
! try: self.this.append(this)
! except: self.this = this
! __swig_destroy__ = _TOSSIM.delete_Variable
! __del__ = lambda self : None;
! def getData(*args): return _TOSSIM.Variable_getData(*args)
! Variable_swigregister = _TOSSIM.Variable_swigregister
! Variable_swigregister(Variable)
class Mote(_object):
***************
*** 234,265 ****
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, Mote, name)
! def __init__(self,*args):
! _swig_setattr(self, Mote, 'this', apply(_TOSSIM.new_Mote,args))
! _swig_setattr(self, Mote, 'thisown', 1)
! def __del__(self, destroy= _TOSSIM.delete_Mote):
! try:
! if self.thisown: destroy(self)
! except: pass
! def id(*args): return apply(_TOSSIM.Mote_id,args)
! def euid(*args): return apply(_TOSSIM.Mote_euid,args)
! def setEuid(*args): return apply(_TOSSIM.Mote_setEuid,args)
! def bootTime(*args): return apply(_TOSSIM.Mote_bootTime,args)
! def bootAtTime(*args): return apply(_TOSSIM.Mote_bootAtTime,args)
! def isOn(*args): return apply(_TOSSIM.Mote_isOn,args)
! def turnOff(*args): return apply(_TOSSIM.Mote_turnOff,args)
! def turnOn(*args): return apply(_TOSSIM.Mote_turnOn,args)
! def getVariable(*args): return apply(_TOSSIM.Mote_getVariable,args)
! def addNoiseTraceReading(*args): return apply(_TOSSIM.Mote_addNoiseTraceReading,args)
! def createNoiseModel(*args): return apply(_TOSSIM.Mote_createNoiseModel,args)
! def generateNoise(*args): return apply(_TOSSIM.Mote_generateNoise,args)
! def __repr__(self):
! return "<C Mote instance at %s>" % (self.this,)
!
! class MotePtr(Mote):
! def __init__(self,this):
! _swig_setattr(self, Mote, 'this', this)
! if not hasattr(self,"thisown"): _swig_setattr(self, Mote, 'thisown', 0)
! _swig_setattr(self, Mote,self.__class__,Mote)
! _TOSSIM.Mote_swigregister(MotePtr)
class Tossim(_object):
--- 213,237 ----
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, Mote, name)
! __repr__ = _swig_repr
! def __init__(self, *args):
! this = _TOSSIM.new_Mote(*args)
! try: self.this.append(this)
! except: self.this = this
! __swig_destroy__ = _TOSSIM.delete_Mote
! __del__ = lambda self : None;
! def id(*args): return _TOSSIM.Mote_id(*args)
! def euid(*args): return _TOSSIM.Mote_euid(*args)
! def setEuid(*args): return _TOSSIM.Mote_setEuid(*args)
! def bootTime(*args): return _TOSSIM.Mote_bootTime(*args)
! def bootAtTime(*args): return _TOSSIM.Mote_bootAtTime(*args)
! def isOn(*args): return _TOSSIM.Mote_isOn(*args)
! def turnOff(*args): return _TOSSIM.Mote_turnOff(*args)
! def turnOn(*args): return _TOSSIM.Mote_turnOn(*args)
! def getVariable(*args): return _TOSSIM.Mote_getVariable(*args)
! def addNoiseTraceReading(*args): return _TOSSIM.Mote_addNoiseTraceReading(*args)
! def createNoiseModel(*args): return _TOSSIM.Mote_createNoiseModel(*args)
! def generateNoise(*args): return _TOSSIM.Mote_generateNoise(*args)
! Mote_swigregister = _TOSSIM.Mote_swigregister
! Mote_swigregister(Mote)
class Tossim(_object):
***************
*** 268,302 ****
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, Tossim, name)
! def __init__(self,*args):
! _swig_setattr(self, Tossim, 'this', apply(_TOSSIM.new_Tossim,args))
! _swig_setattr(self, Tossim, 'thisown', 1)
! def __del__(self, destroy= _TOSSIM.delete_Tossim):
! try:
! if self.thisown: destroy(self)
! except: pass
! def init(*args): return apply(_TOSSIM.Tossim_init,args)
! def time(*args): return apply(_TOSSIM.Tossim_time,args)
! def ticksPerSecond(*args): return apply(_TOSSIM.Tossim_ticksPerSecond,args)
! def setTime(*args): return apply(_TOSSIM.Tossim_setTime,args)
! def timeStr(*args): return apply(_TOSSIM.Tossim_timeStr,args)
! def currentNode(*args): return apply(_TOSSIM.Tossim_currentNode,args)
! def getNode(*args): return apply(_TOSSIM.Tossim_getNode,args)
! def setCurrentNode(*args): return apply(_TOSSIM.Tossim_setCurrentNode,args)
! def addChannel(*args): return apply(_TOSSIM.Tossim_addChannel,args)
! def removeChannel(*args): return apply(_TOSSIM.Tossim_removeChannel,args)
! def randomSeed(*args): return apply(_TOSSIM.Tossim_randomSeed,args)
! def runNextEvent(*args): return apply(_TOSSIM.Tossim_runNextEvent,args)
! def mac(*args): return apply(_TOSSIM.Tossim_mac,args)
! def radio(*args): return apply(_TOSSIM.Tossim_radio,args)
! def newPacket(*args): return apply(_TOSSIM.Tossim_newPacket,args)
! def __repr__(self):
! return "<C Tossim instance at %s>" % (self.this,)
- class TossimPtr(Tossim):
- def __init__(self,this):
- _swig_setattr(self, Tossim, 'this', this)
- if not hasattr(self,"thisown"): _swig_setattr(self, Tossim, 'thisown', 0)
- _swig_setattr(self, Tossim,self.__class__,Tossim)
- _TOSSIM.Tossim_swigregister(TossimPtr)
--- 240,268 ----
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, Tossim, name)
! __repr__ = _swig_repr
! def __init__(self, *args):
! this = _TOSSIM.new_Tossim(*args)
! try: self.this.append(this)
! except: self.this = this
! __swig_destroy__ = _TOSSIM.delete_Tossim
! __del__ = lambda self : None;
! def init(*args): return _TOSSIM.Tossim_init(*args)
! def time(*args): return _TOSSIM.Tossim_time(*args)
! def ticksPerSecond(*args): return _TOSSIM.Tossim_ticksPerSecond(*args)
! def setTime(*args): return _TOSSIM.Tossim_setTime(*args)
! def timeStr(*args): return _TOSSIM.Tossim_timeStr(*args)
! def currentNode(*args): return _TOSSIM.Tossim_currentNode(*args)
! def getNode(*args): return _TOSSIM.Tossim_getNode(*args)
! def setCurrentNode(*args): return _TOSSIM.Tossim_setCurrentNode(*args)
! def addChannel(*args): return _TOSSIM.Tossim_addChannel(*args)
! def removeChannel(*args): return _TOSSIM.Tossim_removeChannel(*args)
! def randomSeed(*args): return _TOSSIM.Tossim_randomSeed(*args)
! def runNextEvent(*args): return _TOSSIM.Tossim_runNextEvent(*args)
! def mac(*args): return _TOSSIM.Tossim_mac(*args)
! def radio(*args): return _TOSSIM.Tossim_radio(*args)
! def newPacket(*args): return _TOSSIM.Tossim_newPacket(*args)
! Tossim_swigregister = _TOSSIM.Tossim_swigregister
! Tossim_swigregister(Tossim)
Index: tossim.c
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/tossim/tossim.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** tossim.c 1 Apr 2007 00:29:34 -0000 1.5
--- tossim.c 15 Aug 2008 18:34:36 -0000 1.6
***************
*** 114,119 ****
}
else {
! str.ptr = "<no such variable>";
! str.type = "<no such variable>";
str.len = strlen("<no such variable>");
str.isArray = 0;
--- 114,119 ----
}
else {
! str.ptr = (char*)"<no such variable>";
! str.type = (char*)"<no such variable>";
str.len = strlen("<no such variable>");
str.isArray = 0;
***************
*** 167,171 ****
Variable* Mote::getVariable(char* name) {
! char* typeStr = "";
int isArray;
Variable* var;
--- 167,171 ----
Variable* Mote::getVariable(char* name) {
! char* typeStr = (char*)"";
int isArray;
Variable* var;
Index: tossim.i
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/tossim/tossim.i,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** tossim.i 1 Apr 2007 00:29:34 -0000 1.4
--- tossim.i 15 Aug 2008 18:34:36 -0000 1.5
***************
*** 299,304 ****
}
else {
! app->variableNames[i] = "<bad string>";
! app->variableTypes[i] = "<bad string>";
}
}
--- 299,304 ----
}
else {
! app->variableNames[i] = (char*)"<bad string>";
! app->variableTypes[i] = (char*)"<bad string>";
}
}
Index: tossim_wrap.cxx
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/tossim/tossim_wrap.cxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** tossim_wrap.cxx 4 Jul 2007 16:15:11 -0000 1.5
--- tossim_wrap.cxx 15 Aug 2008 18:34:36 -0000 1.6
***************
*** 1,5 ****
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
! * Version 1.3.19
*
* This file is not intended to be easily readable and contains a number of
--- 1,5 ----
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
! * Version 1.3.33
*
[...10226 lines suppressed...]
+ * -----------------------------------------------------------------------------*/
+
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+ SWIGEXPORT void SWIG_init(void) {
+ PyObject *m, *d;
+
+ /* Fix SwigMethods to carry the callback ptrs when needed */
+ SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
+
+ m = Py_InitModule((char *) SWIG_name, SwigMethods);
+ d = PyModule_GetDict(m);
+
+ SWIG_InitializeModule(0);
+ SWIG_InstallConstants(d,swig_const_table);
+
+
}
More information about the Tinyos-2-commits
mailing list