[Tinyos-2-commits]
CVS: tinyos-2.x/apps/tests/TestRadioPM/lib/timeSync
TimeSync.h, NONE, 1.1.2.1 TimeSyncC.nc, NONE,
1.1.2.1 TimeSyncP.nc, NONE, 1.1.2.1
Kevin Klues
klueska at users.sourceforge.net
Mon May 15 12:36:11 PDT 2006
- Previous message: [Tinyos-2-commits]
CVS: tinyos-2.x/apps/tests/TestRadioPM/lib/serialDebug
SerialDebug.nc, NONE, 1.1.2.1 SerialDebugC.nc, NONE,
1.1.2.1 SerialDebugMsg.h, NONE, 1.1.2.1 SerialDebugP.nc, NONE,
1.1.2.1
- Next message: [Tinyos-2-commits]
CVS: tinyos-2.x/tos/interfaces ChannelMonitor.nc, NONE,
1.1.2.1 PreambleLength.nc, 1.1.2.2,
1.1.2.3 RadioPowerControl.nc, NONE,
1.1.2.1 ReceiveNotification.nc, NONE,
1.1.2.1 SendNotification.nc, NONE, 1.1.2.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/tinyos/tinyos-2.x/apps/tests/TestRadioPM/lib/timeSync
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv9561/apps/tests/TestRadioPM/lib/timeSync
Added Files:
Tag: tos-2-resource-pm-eval-cand
TimeSync.h TimeSyncC.nc TimeSyncP.nc
Log Message:
Radio Power Management protocol architecture
--- NEW FILE: TimeSync.h ---
/*
* "Copyright (c) 2005 Washington University in St. Louis.
* 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 WASHINGTON UNIVERSITY IN ST. LOUIS 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 WASHINGTON
* UNIVERSITY IN ST. LOUIS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* WASHINGTON UNIVERSITY IN ST. LOUIS 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 WASHINGTON UNIVERSITY IN ST. LOUIS HAS NO
* OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
* MODIFICATIONS."
*/
/**
* @author Kevin Klues (klueska at cs.wustl.edu)
* @version $Revision: 1.1.2.1 $
* @date $Date: 2006/05/15 19:36:09 $
*/
#ifndef TIME_SYNC_H
#define TIME_SYNC_H
enum {
AM_TIME_SYNC_MSG = 150,
};
#endif //TIME_SYNC_H
--- NEW FILE: TimeSyncC.nc ---
/*
* "Copyright (c) 2005 Washington University in St. Louis.
* 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 WASHINGTON UNIVERSITY IN ST. LOUIS 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 WASHINGTON
* UNIVERSITY IN ST. LOUIS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* WASHINGTON UNIVERSITY IN ST. LOUIS 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 WASHINGTON UNIVERSITY IN ST. LOUIS HAS NO
* OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
* MODIFICATIONS."
*/
/**
*
* @author Kevin Klues (klueska at cs.wustl.edu)
* @version $Revision: 1.1.2.1 $
* @date $Date: 2006/05/15 19:36:09 $
*/
#include "TimeSync.h"
configuration TimeSyncC {
provides {
interface SplitControl;
}
}
implementation {
components MainC;
components TimeSyncP;
components new AMSenderC(AM_TIME_SYNC_MSG) as AMSender;
components new AMReceiverC(AM_TIME_SYNC_MSG) as AMReceiver;
SplitControl = TimeSyncP;
TimeSyncP.SyncReceive -> AMReceiver;
TimeSyncP.SyncSend -> AMSender;
}
--- NEW FILE: TimeSyncP.nc ---
/*
* "Copyright (c) 2005 Washington University in St. Louis.
* 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 WASHINGTON UNIVERSITY IN ST. LOUIS 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 WASHINGTON
* UNIVERSITY IN ST. LOUIS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* WASHINGTON UNIVERSITY IN ST. LOUIS 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 WASHINGTON UNIVERSITY IN ST. LOUIS HAS NO
* OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
* MODIFICATIONS."
*/
/**
*
* @author Kevin Klues (klueska at cs.wustl.edu)
* @version $Revision: 1.1.2.1 $
* @date $Date: 2006/05/15 19:36:09 $
*/
module TimeSyncP {
provides {
interface SplitControl;
}
uses {
interface AMSend as SyncSend;
interface Receive as SyncReceive;
}
}
implementation
{
message_t syncMsg;
command error_t SplitControl.start() {
if(TOS_NODE_ID == 0) {
if(call SyncSend.send(AM_BROADCAST_ADDR, &syncMsg, 0) != SUCCESS) {
return FAIL;
}
}
return SUCCESS;
}
command error_t SplitControl.stop() {
return SUCCESS;
}
event void SyncSend.sendDone(message_t* msg, error_t error) {
if(msg == &syncMsg)
signal SplitControl.startDone(SUCCESS);
}
event message_t* SyncReceive.receive(message_t* msg, void* payload, uint8_t len) {
signal SplitControl.startDone(SUCCESS);
return msg;
}
}
- Previous message: [Tinyos-2-commits]
CVS: tinyos-2.x/apps/tests/TestRadioPM/lib/serialDebug
SerialDebug.nc, NONE, 1.1.2.1 SerialDebugC.nc, NONE,
1.1.2.1 SerialDebugMsg.h, NONE, 1.1.2.1 SerialDebugP.nc, NONE,
1.1.2.1
- Next message: [Tinyos-2-commits]
CVS: tinyos-2.x/tos/interfaces ChannelMonitor.nc, NONE,
1.1.2.1 PreambleLength.nc, 1.1.2.2,
1.1.2.3 RadioPowerControl.nc, NONE,
1.1.2.1 ReceiveNotification.nc, NONE,
1.1.2.1 SendNotification.nc, NONE, 1.1.2.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Tinyos-2-commits
mailing list