Hi 

did you do some thing like:

vari=m.getVariable('abcde')

value=vari.getData()


i've made the mistake of forgetting the .getData() a few times and getting 
strange results

 


Date: Thu, 14 Jan 2010 20:39:53 +0100
From: [email protected]
To: [email protected]
Subject: [Tinyos-help] TOSSIM - reading nesC variables values from Python

Hello, I am trying to read the value of a variable of my nesC code from python 
right after my TOSSIM simulation.


In the TinyOS documentation it is said that getData method should return a 
python data type directly related to the nesC type.


However, I am trying to read a float_t or double_t variable, and I get a 
string! 


This string contains invalid characters codes, so I guess that it actually 
contains the bits of the float_t or double_t variable messed up in any way.
In all the simulations I do, I get one of these two values for the "string" :


'\x00\x00\x00\x00\x00\x00\x00\x80\xff?\x00\x00'
'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'


What is going on and how to fix it ?                                      
_________________________________________________________________
Reinvent how you stay in touch with the new Windows Live Messenger.
http://go.microsoft.com/?linkid=9706116
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to