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.
-David
CtpLplC.nc
Description: Binary data
CtpLplP.nc
Description: Binary data
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
