Radio packets and serial packets are two different animals. They might
contain some of the same fields, but there's necessarily not a one-to-one
relationship.
What developers usually do is the following:
1) they receive a radio packet
2) they "extract" the payload and identify its various fields expressed as
an structure such as
MyRadioPacket {
uint8_t field1;
uint8_t field2;
etc}
3) they create a serial packet with the fields you chose to send to the
serial port (which is not necessarily the same as the radio packet as you
probably want to add extra fields, etc)
MySerialPacket{
uint8_t TheOnlyField;
}
and, as needed, copy or point its fields to the corresponding radio packet
fields (in this case we have only one field)
ASerialPacket.TheOnlyField=MyRadioPacket.field2;
Inco
On Mon, Jul 20, 2009 at 6:43 PM, Joe Green <[email protected]> wrote:
> Sorry about the first message.
>
> I am trying to understand how the serial communication works. Where are
> values taken from a radio packet and assigned to the serial packet? I need
> specific code lines because I am trying to add an extra byte to the serial
> package which needs to translate over from the radio package.
>
> Thanks!
> Joe
>
>
>
>
> _______________________________________________
> 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