On Feb 5, 2008, at 5:26 AM, David Moss wrote:
I just added a hook to the CC2420 radio stack in CVS to configure
an outbound message. The interface is called SendNotifier, and has
a single event:
event void aboutToSend(am_addr_t addr, message_t *msg);
This event is provided by CC2420ActiveMessageC, and is
parameterized by am_id_t.
You can access this interface to configure packets sent by any
module in your application, modifying the outbound packet based on
AM type, destination, etc. The main intention is CTP + LPL
integration (with examples attached – modify as necessary), but you
can use it to add all sorts of system-wide functionality to your
application. Here’s a small example:
event void SendNotifier.aboutToSend[AM_CTP_DATA](am_addr_t addr,
message_t *msg) {
call LowPowerListening.setRxSleepInterval(msg, 512);
}
Simply create a module that defines an LPL policy for your system,
and use the SendNotifier interface to enforce it.
If this hook works out, we can extend this to other radio stacks as
necessary
This is a bit weird. Why should the sleep interval be controlled by a
single layer 3 protocol? On the receiver side, it must somehow be
determined across all of the layer 3 protocols. If anything, this
seems something that should *not* be parameterized, so that a -- to
borrow the SP nomenclature -- a policy manager can decide what to do.
Phil
_______________________________________________
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help