I have a task which just samples data by using ReadStream.read(100) ; my buffer size is 2000. At this rate the buffer fills up in 0.2 seconds.
Then I process data inside readDone (which basically takes the average of all these 2000 values and stores it in 1 index of output message array). After this I post the sampling task again. Using an If check inside readDone I decide if the message size is approaching maximum then I call AMSend or else I keep sampling . The problem is this seems to be adding a lot of overhead. I want to know if my averaging mechanism temp=0; for (j=0;j<BUF_SIZE;j++) { temp=temp+buf[j]; } could be the reason for slowing things down ??? task void sampleData() { call ReadStream.read(100); } Or is the task overhead. Since for 10 rounds of such buffers (my message can handle 10 such average values) to get full it should not take more than 1-1.2 seconds since it takes 0.2 seconds for one buffer to get full but it is taking almost 10 seconds ... Please help me with this Thanks Akankshu Dhawan -- First they ignore you, then they laugh at you, then they fight you, then you win. - Mahatma Gandhi
_______________________________________________ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help