[Tinyos-help] Pointer&Struct clarification

2006-11-18 Thread Mikael Ifversen
Hi, Can someone clarify following code for me? It is from the CountSendP component in boomerang: CountMsg_t* body = (CountMsg_t*)m_msg.data; body->n = m_count; body->src = TOS_LOCAL_ADDRESS; CountMsg_t is a variable of struct CountMsg. m_msg is a variable of TOS_Msg. m_msg.data i

[Tinyos-help] Help required to achieve time synchronization in Tossim

2006-11-18 Thread Farhana Jabeen
Hello I need help can some one guide me how to synchronize timings of motes in TOSSIM although i gave the flag -b=0 but it still give me different timings. As i want that all of my motes to start sensing at the same time. Kindly guide me for tossim. Kindly guide me how can i achie

[Tinyos-help] Help required to achieve time synchronization in Tossim

2006-11-18 Thread Farhana Jabeen
Hello I need help can some one guide me how to synchronize timings of motes in TOSSIM although i gave the flag -b=0 but it still give me different timings. As i want that all of my motes to start sensing at the same time. Kindly guide me for tossim. Kindly guide me how can i achie

Re: [Tinyos-help] Programmer is not responding error

2006-11-18 Thread Sankar Gorthi
Hi, the most common instances of this happening were when 1. the mote was switched off (turn it on) 2. the programmer switch on the programmer was set to on (set to the off position) 3. the port was being used by a different application (on windows i close all applications, labview, hyperterm

Re: [Tinyos-help] Pointer&Struct clarification

2006-11-18 Thread Sankar Gorthi
Hi, CountMsg_t is a structure datatype. body is a pointer variable of type CountMsg_t. n is a field in the structure CountMsg_t and so is src. when you type cast m_msg.data to the CountMsg_t pointer datatype, depending upon the order in which the values are defined in the structure defin

Re: [Tinyos-help] Pointer&Struct clarification

2006-11-18 Thread Michael Schippling
One slight correction... > " the corresponding > bytes from m_msg.data are put into the corresponding fields in the > variable addressed by the pointer body." > Implies that values are copied from m_msg.data to someplace, however this is not the case. The assignment statement: CountMsg_t* body

Re: [Tinyos-help] Pointer&Struct clarification

2006-11-18 Thread Mikael Ifversen
Thanks for both replies, it makes sense. But where is "data" declared as an array of chars. In AM.h the type of the struct TOS_Msg member data, is int8_t. Mikael Michael Schippling wrote: One slight correction... > " the corresponding > bytes from m_msg.data are put into the corresponding fiel

[Tinyos-help] Unsupported class version error

2006-11-18 Thread under . actuate
I think this should be easily fixed. I've searched the archives, but can't seem to find this. I do $ [EMAIL PROTECTED]:tmote java net.tinyos.tools.Listen I then get this Exception in thread "main" java.lang.UnsupportedClassVersionError: net/tinyos/tools/Listen (Unsupported major.minor version

Re: [Tinyos-help] Pointer&Struct clarification

2006-11-18 Thread Sankar Gorthi
d'oh. i knew i was doing something wrong there. and yes. K&R http://cm.bell-labs.com/cm/cs/cbook/ way to go. Sankar. On Sat, 18 Nov 2006 13:23:30 -0600, Michael Schippling <[EMAIL PROTECTED]> wrote: One slight correction... > " the corresponding > bytes from m_msg.data are put into t

Re: [Tinyos-help] Pointer&Struct clarification

2006-11-18 Thread Sankar Gorthi
that's the beauty of typecasting. whatever the datatype declared when storing to a register, you can interpret it in any way you want. it's only stored as a bunch of zeros and ones anyway. when you typecast the particular register into a particular datatype the program interprets it as such

[Tinyos-help] Making Cricket Motes Omnidirectional

2006-11-18 Thread Sarfraz Nawaz
Hi all, I am planning to use MIT cricket motes for some of my experiments. From what I have heard and read it seems that the ultrasound transceiver on the mote is fairly directional. I intent do use them by placing them on the ground with the ultrasound transceiver facing upwards. Does anyone ha