[Tinyos-2-commits]
CVS: tinyos-2.x/apps/tests/mica2/mts300 Makefile, NONE,
1.2.2.2 TestMts300C.nc, NONE, 1.2.2.2 TestMts300P.nc, NONE, 1.2.2.2
Kevin Klues
klueska at users.sourceforge.net
Mon May 15 11:35:31 PDT 2006
Update of /cvsroot/tinyos/tinyos-2.x/apps/tests/mica2/mts300
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv18756/apps/tests/mica2/mts300
Added Files:
Tag: tos-2-resource-pm-eval-cand
Makefile TestMts300C.nc TestMts300P.nc
Log Message:
Merging the development branch with the resource/power management evaluation branch. After this merge all files except those already commited should be identical.
--- NEW FILE: Makefile ---
COMPONENT=TestMts300C
SENSORBOARD=mts300
CFLAGS += -I%T/lib/oski
#CFLAGS += -I%T/sensorboards/mts300
include $(MAKERULES)
--- NEW FILE: TestMts300C.nc ---
/**
* Copyright (c) 2004-2005 Crossbow Technology, Inc.
* 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 (updated) modification history and the author appear in
* all copies of this source code.
*
* Permission is also granted to distribute this software under the
* standard BSD license as contained in the TinyOS distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS'
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOSS OF USE, DATA,
* OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
* @author Martin Turon <mturon at xbow.com>
*
* $Id: TestMts300C.nc,v 1.2.2.2 2006/05/15 18:35:27 klueska Exp $
*/
/**
* This application tests the mts300 sensorboard.
* Specifically, this handles the thermistor and light sensors.
*
* @author Martin Turon
* @date October 19, 2005
*/
configuration TestMts300C {
}
implementation
{
components MainC, TestMts300P, LedsC, new OskiTimerMilliC(),
SensorMts300C;
MainC.SoftwareInit -> SensorMts300C;
TestMts300P -> MainC.Boot;
TestMts300P.Leds -> LedsC;
TestMts300P.AppTimer -> OskiTimerMilliC;
TestMts300P.SensorControl -> SensorMts300C;
TestMts300P.Temp -> SensorMts300C.Temp;
TestMts300P.Light -> SensorMts300C.Light;
}
--- NEW FILE: TestMts300P.nc ---
/**
* Copyright (c) 2004-2005 Crossbow Technology, Inc.
* 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 (updated) modification history and the author appear in
* all copies of this source code.
*
* Permission is also granted to distribute this software under the
* standard BSD license as contained in the TinyOS distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS'
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOSS OF USE, DATA,
* OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
* @author Martin Turon <mturon at xbow.com>
*
* $Id: TestMts300P.nc,v 1.2.2.2 2006/05/15 18:35:27 klueska Exp $
*/
#include "Timer.h"
/**
* This application tests the mts300 sensorboard.
* Specifically, this handles the thermistor and light sensors.
*
* @author Martin Turon
* @date October 19, 2005
*/
module TestMts300P
{
uses {
interface Boot;
interface Leds;
interface Timer<TMilli> as AppTimer;
interface StdControl as SensorControl;
interface AcquireData as Temp;
interface AcquireData as Light;
}
}
implementation
{
event void Boot.booted() {
call Leds.led0On();
call Leds.led1On(); // power led
call SensorControl.start();
}
event void AppTimer.fired() {
call Leds.led0Toggle(); // heartbeat indicator
call Light.getData();
call Temp.getData();
}
event void Light.dataReady(uint16_t data) {
call Leds.led1Toggle();
}
event void Temp.dataReady(uint16_t data) {
call Leds.led2Toggle();
}
event void Light.error(uint16_t info) {
}
event void Temp.error(uint16_t info) {
}
}
More information about the Tinyos-2-commits
mailing list