[Tinyos-devel] external (nx*) types and floating point
David Gay
dgay42 at gmail.com
Tue Oct 9 09:07:50 PDT 2007
There's currently no nx_float / nx_double type that would allow use of
floating point in protocols.
Two questions:
- how necessary are such types? (w/o them, you have to figure out some
integer encoding for any real numbers you have to deal with)
- does anybody have some portable code (and not too large...) for
converting an array of bytes to a float/double? (that's the main
sticking point as far as I'm concerned)
Some additional comments:
- specifying these types as IEEE 32 and 64-bit numbers seems reasonable
- I'm reluctant to include platform-specific code w/ the nesC
distribution to deal with nx_float/nx_double, as it feels like it
would make nesC maintenance more painful
- we could actually define nx_float/nx_double in TinyOS (on a
per-chip or per-platform basis, e.g.) - external types are defined by
a magic (undocumented) attribute, so can fairly easily be added
independent of nesC
David Gay
More information about the Tinyos-devel
mailing list