[Tinyos-devel] external (nx*) types and floating point
David Gay
dgay42 at gmail.com
Fri May 2 14:19:16 PDT 2008
On Tue, Oct 9, 2007 at 9:07 AM, David Gay <dgay42 at gmail.com> wrote:
> 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
Did anyone care about this? Offhand, it did seem worthwhile doing the
last proposal (defining nx_float/nx_double for each MCU).
David
More information about the Tinyos-devel
mailing list