On Mon, Jan 12, 2009 at 10:59 AM, Michael Schippling <[email protected]>wrote:
> You could change datax to: nx_uint8_t datax[14]
> and then use a string or array copy to set it.
> You've only got 28 or 29 bytes (depending on the
> TOS version and standard settings) to play with
> in your message, and the other fields add up to
> 14 bytes already...or perhaps more if the int8's
> are padded -- in fact I would group those two
> int8's together in the hopes that the compiler
> will not pad them.
The compiler won't pad them. if they are bytes.
eric
>
>
> MS
>
> Sonia Pardo wrote:
> > Dear All,
> >
> > I'm trying send data from mote A to mote B whit this structure:
> >
> > typedef nx_struct PacketLinkMsg {
> > nx_uint32_t count;
> > nx_uint32_t loss;
> > nx_uint16_t src;
> > nx_uint8_t cmd;
> > nx_uint16_t sync;
> > nx_int8_t rssin;
> > nx_uint32_t datatx
> > } PacketLinkMsg;
> >
> > In this case datatx is a int, but I want to send a sentence like "Hello
> > World". In mote B I've installed a base station, where i can read the
> > data i receive.
> > I guess It should be declaring a string or a char, but I've problems
> > whit this and i don't know how to do it.
> >
> > Can you help me please?
> >
> > Thanks a lot
> >
> > Sonia
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Tinyos-help mailing list
> > [email protected]
> > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
> --
> Platform: WinXP/Cygwin
> TinyOS version: 1.x, Boomerang
> Programmer: MIB510
> Device(s): Mica2, MicaZ, Tmote
> Sensor board: homebrew
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
--
Eric B. Decker
Senior (over 50 :-) Researcher
Autonomous Systems Lab
Jack Baskin School of Engineering
UCSC
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help