RECEIVE CHECK / RADIO POWER: In 2.0.2 (and possibly earlier versions) the PowerCycleC configuration provides two State interfaces:
interface State as SplitControlState; interface State as RadioPowerState; The State enumerator, which should actually be located in a header file and not the PowerCycleP module, looks like this: enum { S_OFF, // off by default S_TURNING_ON, S_ON, S_TURNING_OFF, }; The RadioPowerState interface can only be S_ON or S_OFF according to the PowerCycleP code. And the SplitControlState can be any of the 4 states. So, tap into PowerCycleC's State interfaces and you can query the state of the radio: call RadioPowerState.isState(S_ON); call SplitControlState.getState(); etc... TRANSMISSIONS: The DefaultLplC configuration provides a similar interface for the Send side of things: interface State as SendState; Its State enum is in the DefaultLpl.h file: typedef enum { S_LPL_NOT_SENDING, // DEFAULT S_LPL_FIRST_MESSAGE, // 1. Sending the first message S_LPL_SENDING, // 2. Sending all other messages S_LPL_CLEAN_UP, // 3. Clean up the transmission } lpl_sendstate_t; -David -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Murray, Ben Sent: Tuesday, October 30, 2007 3:10 AM To: Tinyos help Forum (E-mail) Subject: [Tinyos-help] checking the radio status when using low powerlistening? Hi is there a quick and concise way to check whether the radio is on/active when using low power listening? For example, if I wanted to shut the radio off fully (AMControl.stop()) but only if I was certain LPL was not in the middle of detecting energy or receiving a packet and had initiated or completed its own radio turn off action. Something along the lines of Timer.IsRunning() perhaps? Regards Ben **************************************************************************** *** Please consider the environment before printing this email. **************************************************************************** *** This email and any files transmitted with it are intended solely for the use of the individual or entity to whom they are addressed and may not be divulged to any third party without the express permission of the originator. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Thales Research & Technology (UK) Limited. **************************************************************************** *** _______________________________________________ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help _______________________________________________ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help