[Tinyos-help] taking ascii value instead the literal value....

primalfear 69 primeballerina at gmail.com
Sat Sep 30 01:00:39 PDT 2006


hello everybody

I am using mica2 with Tinyos1.1.0 under windows XP.

my application needs to transmit a stack of data. i am using the TOS_Msg
structure........ in that the payload data has our stack in it. *(our
structure includes the many fields like function etc and then comes byte
count.(number of data layers being followed )and then the data).*
**
 the problem is coming when i try to extract the data using the byte count
which i have declared.

here is the code


if( i == xyz->data[n] )
{
do something;
}

if xyz->data[n] is 5 (the byte count) ........... then the loop is waiting
till 53 times in order to "do something".
where 53 is the ascii value of 5 in decimal.

how to get the check with the literal value instead the ascii. is there any
command to convert ascii to literal or some other suggestions..:)

Regards
Primalfear
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20060930/dd9175d2/attachment-0001.htm


More information about the Tinyos-help mailing list