[Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/rf230 RadioChannel.nc, NONE, 1.1 MessageBufferLayerC.nc, 1.2, 1.3 MessageBufferLayerP.nc, 1.4, 1.5 RadioState.nc, 1.1, 1.2 RF230ActiveMessageC.nc, 1.6, 1.7 RF230LayerP.nc, 1.21, 1.22 TrafficMonitorLayerP.nc, 1.1, 1.2 RadioConfig.nc, 1.1, NONE
Miklos Maroti
mmaroti at users.sourceforge.net
Wed Feb 25 12:44:08 PST 2009
Update of /cvsroot/tinyos/tinyos-2.x/tos/chips/rf230
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv23013
Modified Files:
MessageBufferLayerC.nc MessageBufferLayerP.nc RadioState.nc
RF230ActiveMessageC.nc RF230LayerP.nc TrafficMonitorLayerP.nc
Added Files:
RadioChannel.nc
Removed Files:
RadioConfig.nc
Log Message:
implement getChannel and rename interface to RadioChannel
--- NEW FILE: RadioChannel.nc ---
/*
* Copyright (c) 2009, Vanderbilt University
* All rights reserved.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation for any purpose, without fee, and without written agreement is
* hereby granted, provided that the above copyright notice, the following
* two paragraphs and the author appear in all copies of this software.
*
* IN NO EVENT SHALL THE VANDERBILT UNIVERSITY BE LIABLE TO ANY PARTY FOR
* DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
* OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE VANDERBILT
* UNIVERSITY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* THE VANDERBILT UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
* ON AN "AS IS" BASIS, AND THE VANDERBILT UNIVERSITY HAS NO OBLIGATION TO
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*
* Author: Miklos Maroti
*/
interface RadioChannel
{
/**
* Sets the current channel. Returns EBUSY if the stack is unable
* to change the channel this time (some other operation is in progress),
* EALREADY if the selected channel is already set, SUCCESS otherwise.
*/
command error_t setChannel(uint8_t channel);
/**
* This event is signaled exactly once for each sucessfully posted state
* setChannel command when it is completed.
*/
event void setChannelDone();
/**
* Returns the currently selected channel.
*/
command uint8_t getChannel();
}
Index: MessageBufferLayerC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/rf230/MessageBufferLayerC.nc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** MessageBufferLayerC.nc 27 Jan 2009 20:17:51 -0000 1.2
--- MessageBufferLayerC.nc 25 Feb 2009 20:43:57 -0000 1.3
***************
*** 29,33 ****
interface Send;
interface Receive;
! interface RadioConfig;
}
uses
--- 29,33 ----
interface Send;
interface Receive;
! interface RadioChannel;
}
uses
***************
*** 50,54 ****
Send = MessageBufferLayerP;
Receive = MessageBufferLayerP;
! RadioConfig = MessageBufferLayerP;
RadioState = MessageBufferLayerP;
--- 50,54 ----
Send = MessageBufferLayerP;
Receive = MessageBufferLayerP;
! RadioChannel = MessageBufferLayerP;
RadioState = MessageBufferLayerP;
Index: MessageBufferLayerP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/rf230/MessageBufferLayerP.nc,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** MessageBufferLayerP.nc 27 Jan 2009 20:17:51 -0000 1.4
--- MessageBufferLayerP.nc 25 Feb 2009 20:43:59 -0000 1.5
***************
*** 34,38 ****
interface Send;
interface Receive;
! interface RadioConfig;
}
uses
--- 34,38 ----
interface Send;
interface Receive;
! interface RadioChannel;
}
uses
***************
*** 101,105 ****
}
! command error_t RadioConfig.setChannel(uint8_t channel)
{
error_t error;
--- 101,105 ----
}
! command error_t RadioChannel.setChannel(uint8_t channel)
{
error_t error;
***************
*** 120,123 ****
--- 120,128 ----
}
+ command uint8_t RadioChannel.getChannel()
+ {
+ return call RadioState.getChannel();
+ }
+
task void stateDoneTask()
{
***************
*** 134,138 ****
signal SplitControl.stopDone(SUCCESS);
else if( s == STATE_CHANNEL )
! signal RadioConfig.setChannelDone();
else // not our event, ignore it
state = s;
--- 139,143 ----
signal SplitControl.stopDone(SUCCESS);
else if( s == STATE_CHANNEL )
! signal RadioChannel.setChannelDone();
else // not our event, ignore it
state = s;
***************
*** 152,156 ****
}
! default event void RadioConfig.setChannelDone()
{
}
--- 157,161 ----
}
! default event void RadioChannel.setChannelDone()
{
}
Index: RadioState.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/rf230/RadioState.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** RadioState.nc 5 Nov 2007 20:36:58 -0000 1.1
--- RadioState.nc 25 Feb 2009 20:44:01 -0000 1.2
***************
*** 57,59 ****
--- 57,64 ----
*/
tasklet_async event void done();
+
+ /**
+ * Returns the currently selected channel.
+ */
+ tasklet_async command uint8_t getChannel();
}
Index: RF230ActiveMessageC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/rf230/RF230ActiveMessageC.nc,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** RF230ActiveMessageC.nc 27 Jan 2009 20:17:51 -0000 1.6
--- RF230ActiveMessageC.nc 25 Feb 2009 20:44:01 -0000 1.7
***************
*** 38,42 ****
interface PacketAcknowledgements;
interface LowPowerListening;
! interface RadioConfig;
interface PacketField<uint8_t> as PacketLinkQuality;
--- 38,42 ----
interface PacketAcknowledgements;
interface LowPowerListening;
! interface RadioChannel;
interface PacketField<uint8_t> as PacketLinkQuality;
***************
*** 70,74 ****
PacketTimeStampMilli = RF230PacketC;
LowPowerListening = LowPowerListeningLayerC;
! RadioConfig = MessageBufferLayerC;
components ActiveMessageLayerC;
--- 70,74 ----
PacketTimeStampMilli = RF230PacketC;
LowPowerListening = LowPowerListeningLayerC;
! RadioChannel = MessageBufferLayerC;
components ActiveMessageLayerC;
Index: RF230LayerP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/rf230/RF230LayerP.nc,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** RF230LayerP.nc 22 Jan 2009 20:04:37 -0000 1.21
--- RF230LayerP.nc 25 Feb 2009 20:44:02 -0000 1.22
***************
*** 269,272 ****
--- 269,277 ----
/*----------------- CHANNEL -----------------*/
+ tasklet_async command uint8_t RadioState.getChannel()
+ {
+ return channel;
+ }
+
tasklet_async command error_t RadioState.setChannel(uint8_t c)
{
Index: TrafficMonitorLayerP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/rf230/TrafficMonitorLayerP.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TrafficMonitorLayerP.nc 5 Nov 2007 20:37:01 -0000 1.1
--- TrafficMonitorLayerP.nc 25 Feb 2009 20:44:03 -0000 1.2
***************
*** 227,230 ****
--- 227,235 ----
}
+ tasklet_async command uint8_t RadioState.getChannel()
+ {
+ return call SubState.getChannel();
+ }
+
task void startStopTimer()
{
--- RadioConfig.nc DELETED ---
More information about the Tinyos-2-commits
mailing list