If I understand correctly your problem you only need to write a function to
convert the data. You should be able to solve in a few lines of code with
something like this:
int hexToInt(int high, int low) {
int res=high << 8;
res += low;
return res;
}
2010/3/12 David Rodenas Herráiz <[email protected]>
> Hi all
>
> Finally I connected my application (made in C++) to the Serial Forwarder,
> and I receive packets. But my problem is the following (I only need some
> information): The data is sent by the mote in *big-endian* format, for
> example, 01 02 means 258 (256*1 + 2). When I receive the packet, I need
> the value 258, not the 01 02, as if it were an integer.
>
> Any suggestion?
>
> Thanks!
>
> David
>
> ------------------------------
> Compartir tus mejores FOTOS es fácil en Messenger ¡DESCUBRE
> cómo!<http://events.es.msn.com/windows-live/redes-sociales/default.aspx>
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help