The header conversion takes place within whichever stack the message is
being passed into. The radio stack uses a header, and the serial stack has
a different header as you've pointed out - but those headers are filled in
behind the send() interface with whatever you pass into the send()
interface.
One of the "conversions" takes place around BaseStationP line 191, where we
obtain 3 elements from calls to the radio stack (the radio stack knows how
to read the received radio message header) and then hand those elements to
the serial stack:
len = call RadioPacket.payloadLength(msg);
id = call RadioAMPacket.type(msg);
addr = call RadioAMPacket.destination(msg);
if (call UartSend.send[id](addr, uartQueue[uartOut], len) == SUCCESS)
// Where uartQueue[uartOut] is the payload
// ...
So there are four elements being passed from the radio stack to the uart
(and vice versa): 1) the AM id of the received message, 2) the destination
address of the message, 3) the payload of the message, and 4) the length of
the payload. All other information is dropped, including the rest of the
received header and all of the metadata. The information passed into send()
gets automatically jacked into the right spots of the serial message by the
serial stack.
Hope that helps,
-David
-----Original Message-----
From: KURT PETERS [mailto:[EMAIL PROTECTED]
Sent: Friday, November 09, 2007 7:13 AM
To: [email protected]
Cc: [EMAIL PROTECTED]
Subject: RE: [Tinyos-help] Basestation - tinyos 2.0.1 vs 2.0.2
David,
Could you answer another question about BaseStation for me? It seems that
the message is just passed to the serial module by just a reference to the
received CC2420 packet with no modifications to the header (that I could
find) to make the header compatible to the serial_header_t (and vice-versa).
Does this translation from one header format to the other happen in some
code somewhere? I've looked pretty intensely at all but the most basic HIL
software, and by that time, I don't know how the software would know to even
convert from one header to the other. The same is essentially true for the
meta-data.
How does the software know how to correlate, for instance, the dest in
one with the dest in the other? It doesn't look like the way the header is
recalled (by tying it to the start location of the data payload) that the
compiler would be smart enough to do this translation automatically.
This really has me confused, and any help in enlightening me would be
greatly appreciated.
Regards,
Kurt
----Original Message Follows----
From: "David Moss" <[EMAIL PROTECTED]>
To:
<[EMAIL PROTECTED]>,<[EMAIL PROTECTED]
du>
Subject: [Tinyos-help] Basestation - tinyos 2.0.1 vs 2.0.2
Date: Thu, 8 Nov 2007 12:34:58 -0700
Yup. BaseStationCC2420 is deprecated because the CC2420 stack has the
ability to enable/disable auto-acks and address recognition at compile time.
There's no longer a need to maintain two separate portions of the CC2420
stack.
-David
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Thursday, November 08, 2007 12:22 PM
To: [email protected]
Subject: [Copfilter] Copy of quarantined email - *** SPAM ***
[11.6/5.0][Tinyos-help] Basestation - tinyos 2.0.1 vs 2.0.2
Just checking, did BasestationCC2240 get removed from 2.0.1 when updating to
2.0.2? I just installed 2.0.2 and that directory seemed to go away...
Kurt
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help