[Tinyos-commits] CVS: tinyos-1.x/tos/lib/RamSymbols README, NONE,
1.1 RamSymbols.h, NONE, 1.1 RamSymbolsM.nc, NONE, 1.1
Kamin Whitehouse
kaminw at users.sourceforge.net
Fri Sep 23 03:13:57 PDT 2005
- Previous message: [Tinyos-commits] CVS: tinyos-1.x/tos/lib/Hood Hood.nc, NONE,
1.1 HoodM.nc, NONE, 1.1 HoodManager.nc, NONE,
1.1 HoodTransport.h, NONE, 1.1 HoodTransport.nc, NONE,
1.1 HoodTransportC.nc, NONE, 1.1 HoodTransportM.nc, NONE,
1.1 Marshall.nc, NONE, 1.1 Marshaller.h, NONE,
1.1 MarshallerM.nc, NONE, 1.1 README, NONE, 1.1 ReflBackend.nc,
NONE, 1.1 Reflection.nc, NONE, 1.1 ReflectionM.nc, NONE,
1.1 Unmarshall.nc, NONE, 1.1
- Next message: [Tinyos-commits] CVS: tinyos-1.x/tos/lib/Registry AttrBackend.nc,
NONE, 1.1 Attribute.nc, NONE, 1.1 AttributeM.nc, NONE,
1.1 GenericBackend.nc, NONE, 1.1 NucleusAttrWrapperC.nc, NONE,
1.1 README, NONE, 1.1 RegistryM.nc, NONE, 1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/tinyos/tinyos-1.x/tos/lib/RamSymbols
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4228/RamSymbols
Added Files:
README RamSymbols.h RamSymbolsM.nc
Log Message:
These are 5 new tinyos libraries to: 1) automatically define a namespace of node attributes such as location, sensor values, etc, which is exposed through a central 'registry' 2) store these attributes to flash 3) expand that namespace to attributes of neighbors (hood) 4) expose arbitrary functions, including the get/set functions of registry attributes to other nodes and/or the pc through an rpc interface 5) expose arbitrary module variables through the same rpc interface. These libraries require code generation and must be used with nesc 1.2 or later. the code generation scripts are in tinyos-1.x/tools/scripts/codeGeneration.
--- NEW FILE: README ---
directory: tinyos-1.x/tos/lib/RamSymbols
author: kamin whitehouse
date: 9/23/05
Please see the following wiki page for documentation:
http://today.cs.berkeley.edu/nestfe/index.php/Ram_Symbols
--- NEW FILE: RamSymbols.h ---
//$Id: RamSymbols.h,v 1.1 2005/09/23 10:13:54 kaminw Exp $
/* tab:4
* "Copyright (c) 2000-2003 The Regents of the University of California.
* 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 UNIVERSITY OF CALIFORNIA 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 UNIVERSITY OF
* CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* THE UNIVERSITY OF CALIFORNIA 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 UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS."
*
*/
/**
* @author Kamin Whitehouse
*/
enum{
MAX_RAM_SYMBOL_SIZE = 13- sizeof(unsigned int)-sizeof(uint8_t)-sizeof(bool)
};
typedef struct ramSymbol_t {
unsigned int memAddress;
uint8_t length;
bool dereference;
uint8_t data[MAX_RAM_SYMBOL_SIZE];
} __attribute__ ((packed)) ramSymbol_t;
--- NEW FILE: RamSymbolsM.nc ---
//$Id: RamSymbolsM.nc,v 1.1 2005/09/23 10:13:54 kaminw Exp $
/* tab:4
* "Copyright (c) 2000-2003 The Regents of the University of California.
* 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 UNIVERSITY OF CALIFORNIA 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 UNIVERSITY OF
* CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* THE UNIVERSITY OF CALIFORNIA 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 UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS."
*
*/
/**
* @author Kamin Whitehouse
*/
includes Rpc;
includes RamSymbols;
module RamSymbolsM
{
provides command unsigned int poke(ramSymbol_t *symbol) @rpc();
provides command ramSymbol_t peek(unsigned int memAddress, uint8_t length, bool dereference) @rpc();
}
implementation
{
ramSymbol_t symbol;
command unsigned int poke(ramSymbol_t *p_symbol){
if ( p_symbol->length <= MAX_RAM_SYMBOL_SIZE) {
if (p_symbol->dereference == TRUE){
memcpy(*(void**)p_symbol->memAddress, (void*)p_symbol->data, p_symbol->length);
}
else{
memcpy((void*)p_symbol->memAddress, (void*)p_symbol->data, p_symbol->length);
}
}
return p_symbol->memAddress;
}
command ramSymbol_t peek(unsigned int memAddress, uint8_t length, bool dereference){
symbol.memAddress = memAddress;
symbol.length = length;
symbol.dereference = dereference;
if ( symbol.length <= MAX_RAM_SYMBOL_SIZE) {
if (symbol.dereference == TRUE){
memcpy((void*)symbol.data, *(void**)symbol.memAddress, symbol.length);
}
else{
memcpy((void*)symbol.data, (void*)symbol.memAddress, symbol.length);
}
}
return symbol;
}
}
- Previous message: [Tinyos-commits] CVS: tinyos-1.x/tos/lib/Hood Hood.nc, NONE,
1.1 HoodM.nc, NONE, 1.1 HoodManager.nc, NONE,
1.1 HoodTransport.h, NONE, 1.1 HoodTransport.nc, NONE,
1.1 HoodTransportC.nc, NONE, 1.1 HoodTransportM.nc, NONE,
1.1 Marshall.nc, NONE, 1.1 Marshaller.h, NONE,
1.1 MarshallerM.nc, NONE, 1.1 README, NONE, 1.1 ReflBackend.nc,
NONE, 1.1 Reflection.nc, NONE, 1.1 ReflectionM.nc, NONE,
1.1 Unmarshall.nc, NONE, 1.1
- Next message: [Tinyos-commits] CVS: tinyos-1.x/tos/lib/Registry AttrBackend.nc,
NONE, 1.1 Attribute.nc, NONE, 1.1 AttributeM.nc, NONE,
1.1 GenericBackend.nc, NONE, 1.1 NucleusAttrWrapperC.nc, NONE,
1.1 README, NONE, 1.1 RegistryM.nc, NONE, 1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Tinyos-commits
mailing list