[Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/byte_radio PacketAck.h,
NONE, 1.1.2.1 ChannelMonitorData.nc, 1.1.2.3,
1.1.2.4 LinkLayerP.nc, 1.1.2.5, 1.1.2.6 PacketSerializerP.nc,
1.1.2.9, 1.1.2.10
Philipp Huppertz
phihup at users.sourceforge.net
Tue Sep 12 05:16:36 PDT 2006
- Previous message: [Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/tda5250/mac
CsmaMacC.nc, 1.1.2.9, 1.1.2.10 CsmaMacP.nc, 1.1.2.10, 1.1.2.11
- Next message: [Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/tda5250
HplTda5250ConfigC.nc, 1.1.2.4, 1.1.2.5 HplTda5250ConfigP.nc,
1.1.2.5, 1.1.2.6 Tda5250ActiveMessageP.nc, 1.1.2.4,
1.1.2.5 tda5250_message.h, 1.1.2.4, 1.1.2.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/tinyos/tinyos-2.x/tos/lib/byte_radio
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv11833/tos/lib/byte_radio
Modified Files:
Tag: tinyos-2_0_devel-BRANCH
ChannelMonitorData.nc LinkLayerP.nc PacketSerializerP.nc
Added Files:
Tag: tinyos-2_0_devel-BRANCH
PacketAck.h
Log Message:
- added Andreas Koepke's improvements and fixes to the tda5250 and /lib/byte_radio
- improved unconnected ASKNFSK pin handling/wireing on eyes
--- NEW FILE: PacketAck.h ---
/* -*- mode:c++; indent-tabs-mode: nil -*-
* Copyright (c) 2006, Technische Universitaet Berlin
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* - Neither the name of the Technische Universitaet Berlin nor the names
* of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* 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
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES {} LOSS OF USE, DATA,
* OR PROFITS {} OR BUSINESS INTERRUPTION) 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.
*
* - Description ---------------------------------------------------------
* provide constants for packet ack interface
* - Author --------------------------------------------------------------
* @author: Andreas Koepke (koepke at tkn.tu-berlin.de)
* ========================================================================
*/
#ifndef PACKET_ACK_H
#define PACKET_ACK_H
/*
#define NO_ACK_REQUESTED 1
#define WAS_ACKED 2
#define ACK_REQUESTED 128
*/
typedef enum {
NO_ACK_REQUESTED = 1,
WAS_ACKED,
WAS_NOT_ACKED,
ACK_REQUESTED = 128U
} packet_ack_t;
#endif
Index: ChannelMonitorData.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/byte_radio/ChannelMonitorData.nc,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -C2 -d -r1.1.2.3 -r1.1.2.4
*** ChannelMonitorData.nc 21 Jun 2006 14:45:10 -0000 1.1.2.3
--- ChannelMonitorData.nc 12 Sep 2006 12:16:31 -0000 1.1.2.4
***************
*** 74,77 ****
--- 74,83 ----
async event void getSnrDone(int16_t snr);
+ /**
+ * try to be lucky: read anything stored as the rssi and
+ * make a crude and fast conversion to an snr value
+ */
+ async command uint16_t readSnr();
+
/**
* Get the noisefloor in mV.
Index: LinkLayerP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/byte_radio/LinkLayerP.nc,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -C2 -d -r1.1.2.5 -r1.1.2.6
*** LinkLayerP.nc 21 Jun 2006 14:45:10 -0000 1.1.2.5
--- LinkLayerP.nc 12 Sep 2006 12:16:31 -0000 1.1.2.6
***************
*** 31,34 ****
--- 31,35 ----
#include "radiopacketfunctions.h"
#include "message.h"
+ #include "PacketAck.h"
/**
***************
*** 180,184 ****
atomic {
txBufPtr = msg;
- getMetadata(msg)->ack = 1; // this is rather stupid
}
if (error == SUCCESS) {
--- 181,184 ----
***************
*** 245,257 ****
async command error_t PacketAcknowledgements.requestAck(message_t* msg) {
! return FAIL;
}
async command error_t PacketAcknowledgements.noAck(message_t* msg) {
! return SUCCESS;
}
async command bool PacketAcknowledgements.wasAcked(message_t* msg) {
! return FALSE;
}
}
--- 245,261 ----
async command error_t PacketAcknowledgements.requestAck(message_t* msg) {
! getMetadata(msg)->ack = ACK_REQUESTED;
! return SUCCESS;
}
async command error_t PacketAcknowledgements.noAck(message_t* msg) {
! getMetadata(msg)->ack = NO_ACK_REQUESTED;
! return SUCCESS;
}
async command bool PacketAcknowledgements.wasAcked(message_t* msg) {
! bool rVal = FALSE;
! if(getMetadata(msg)->ack == WAS_ACKED) rVal = TRUE;
! return rVal;
}
}
- Previous message: [Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/tda5250/mac
CsmaMacC.nc, 1.1.2.9, 1.1.2.10 CsmaMacP.nc, 1.1.2.10, 1.1.2.11
- Next message: [Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/tda5250
HplTda5250ConfigC.nc, 1.1.2.4, 1.1.2.5 HplTda5250ConfigP.nc,
1.1.2.5, 1.1.2.6 Tda5250ActiveMessageP.nc, 1.1.2.4,
1.1.2.5 tda5250_message.h, 1.1.2.4, 1.1.2.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Tinyos-2-commits
mailing list