[Tinyos-devel] Packet.clear()
Miklos Maroti
mmaroti at math.u-szeged.hu
Fri Oct 19 04:42:40 PDT 2007
Hi Kevin,
On 10/18/07, Kevin Klues <klueska at gmail.com> wrote:
> To do this, it would make more sense to define message_t with two
> separate metadata fields. One for send metadata and one for receive
> metadata. The semantics for Packet.clear() would then be to 0 out the
> entire send metadata field, leaving the receive metadata field in
> tact.
Maybe you could do that, but in Packet.clear you might also want to
set up header fields (such as IEEE 802.15.4 stuff like the message is
data packet). Yes, this could (and is) set up during Send.send, but it
is not out of the question to do other initialization. Do we want to
restrict the implementation of Send to a clear all bits to 0 approach?
> For things like the LPL stack that add fields to the metadata
> depending on which layers in the stack are included, providing this
> separation is essential. Othgerwise you have to explicitly name each
> field you want cleared, but they aren't necessarily known ahead of
> time.
I think Packet.clear goes down the chain of radio layers, so each
could clear its own stuff.
Miklos
More information about the Tinyos-devel
mailing list