[Tinyos-contrib-commits]
CVS: tinyos-1.x/contrib/rincon/apps/Blackbook3/demos/Standalone
TestBlackbookM.nc, NONE, 1.1 readme.txt, NONE, 1.1 Makefile,
NONE, 1.1 TestBlackbookC.nc, NONE, 1.1
dmm
rincon at users.sourceforge.net
Thu Apr 20 16:03:35 PDT 2006
- Previous message: [Tinyos-contrib-commits]
CVS: tinyos-1.x/contrib/rincon/apps/Blackbook3/implementation/STM25P
FlashBridgeM.nc, NONE, 1.1 readme.txt, NONE, 1.1 Makefile,
NONE, 1.1 FlashSettings.h, NONE, 1.1 FlashBridgeC.nc, NONE, 1.1
- Next message: [Tinyos-contrib-commits]
CVS: tinyos-1.x/contrib/rincon/apps/Blackbook3
BlackbookC.nc, NONE, 1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/tinyos/tinyos-1.x/contrib/rincon/apps/Blackbook3/demos/Standalone
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16174/contrib/rincon/apps/Blackbook3/demos/Standalone
Added Files:
TestBlackbookM.nc readme.txt Makefile TestBlackbookC.nc
Log Message:
Uploaded the Blackbook file system, version 3.
--- NEW FILE: TestBlackbookM.nc ---
/*
* Copyright (c) 2004-2006 Rincon Research Corporation.
* All rights reserved.
*
* Rincon Research will permit distribution and use by others subject to
* the restrictions of a licensing agreement which contains (among other things)
* the following restrictions:
*
* 1. No credit will be taken for the Work of others.
* 2. It will not be resold for a price in excess of reproduction and
* distribution costs.
* 3. Others are not restricted from copying it or using it except as
* set forward in the licensing agreement.
* 4. Commented source code of any modifications or additions will be
* made available to Rincon Research on the same terms.
* 5. This notice will remain intact and displayed prominently.
*
* Copies of the complete licensing agreement may be obtained by contacting
* Rincon Research, 101 N. Wilmot, Suite 101, Tucson, AZ 85711.
*
* There is no warranty with this product, either expressed or implied.
* Use at your own risk. Rincon Research is not liable or responsible for
* damage or loss incurred or resulting from the use or misuse of this software.
*/
/**
* Test Blackbook
* @author David Moss - dmm at rincon.com
*/
module TestBlackbookM {
uses {
interface BBoot;
interface BFileRead;
interface BFileWrite;
interface BFileDelete;
interface BFileDir;
interface BDictionary;
interface BClean;
}
}
implementation {
/***************** BBoot Events ****************/
/**
* The file system finished booting
* @param totalNodes - the total number of nodes found on flash
* @param result - SUCCESS if the file system is ready for use.
*/
event void BBoot.booted(uint16_t totalNodes, uint8_t totalFiles, result_t result) {
}
/***************** BClean Events ****************/
/**
* The Garbage Collector is erasing a sector - this may take awhile
*/
event void BClean.erasing() {
}
/**
* Garbage Collection is complete
* @return SUCCESS if any sectors were erased.
*/
event void BClean.gcDone(result_t result) {
}
/***************** BFileRead Events ****************/
/**
* A file has been opened
* @param fileName - name of the opened file
* @param len - the total data length of the file
* @param result - SUCCESS if the file was successfully opened
*/
event void BFileRead.opened(char *fileName, uint32_t amount, result_t result) {
}
/**
* Any previously opened file is now closed
* @param result - SUCCESS if the file was closed properly
*/
event void BFileRead.closed(result_t result) {
}
/**
* File read complete
* @param *buf - this is the buffer that was initially passed in
* @param len - the length of the data read into the buffer
* @param result - SUCCESS if there were no problems reading the data
*/
event void BFileRead.readDone(char *fileName, void *buf, uint16_t len, result_t result) {
}
/***************** BFileWrite Events ****************/
/**
* Signaled when a file has been opened, with the results
* @param fileName - the name of the opened write file
* @param len - The total reserved length of the file
* @param result - SUCCSES if the file was opened successfully
*/
event void BFileWrite.opened(char *fileName, uint32_t len, result_t result) {
}
/**
* Signaled when the opened file has been closed
* @param result - SUCCESS if the file was closed properly
*/
event void BFileWrite.closed(result_t result) {
}
/**
* Signaled when this file has been saved.
* This does not require the save() command to be called
* before being signaled - this would happen if another
* file was open for writing and that file was saved, but
* the behavior of the checkpoint file required all files
* on the system to be saved as well.
* @param fileName - name of the open write file that was saved
* @param result - SUCCESS if the file was saved successfully
*/
event void BFileWrite.saved(char *fileName, result_t result) {
}
/**
* Signaled when data is written to flash. On some media,
* the data is not guaranteed to be written to non-volatile memory
* until save() or close() is called.
* @param fileName
* @param data The buffer of data appended to flash
* @param amountWritten The amount written to flash
* @param result
*/
event void BFileWrite.appended(char *fileName, void *data, uint16_t amountWritten, result_t result) {
}
/***************** BFileDelete Events ****************/
/**
* A file was deleted
* @param result - SUCCESS if the file was deleted from flash
*/
event void BFileDelete.deleted(result_t result) {
}
/***************** BFileDir Events ****************/
/**
* The corruption check on a file is complete
* @param fileName - the name of the file that was checked
* @param isCorrupt - TRUE if the file's actual data does not match its CRC
* @param result - SUCCESS if this information is valid.
*/
event void BFileDir.corruptionCheckDone(char *fileName, bool isCorrupt, result_t result) {
}
/**
* The check to see if a file exists is complete
* @param fileName - the name of the file
* @param doesExist - TRUE if the file exists
* @param result - SUCCESS if this information is valid
*/
event void BFileDir.existsCheckDone(char *fileName, bool doesExist, result_t result) {
}
/**
* This is the next file in the file system after the given
* present file.
* @param fileName - name of the next file
* @param result - SUCCESS if this is actually the next file,
* FAIL if the given present file is not valid or there is no
* next file.
*/
event void BFileDir.nextFile(char *fileName, result_t result) {
}
/***************** BDictionary Events ****************/
/**
* A Dictionary file was opened successfully.
* @param totalSize - the total amount of flash space dedicated to storing
* key-value pairs in the file
* @param remainingBytes - the remaining amount of space left to write to
* @param result - SUCCESS if the file was successfully opened.
*/
event void BDictionary.opened(uint16_t totalSize, uint16_t remainingBytes, result_t result) {
}
/**
* The opened Dictionary file is now closed
* @param result - SUCCSESS if there are no open files
*/
event void BDictionary.closed(result_t result) {
}
/**
* A key-value pair was inserted into the currently opened Dictionary file.
* @param key - the key used to insert the value
* @param value - pointer to the buffer containing the value.
* @param valueSize - the amount of bytes copied from the buffer into flash
* @param result - SUCCESS if the key was written successfully.
*/
event void BDictionary.inserted(uint32_t key, void *value, uint16_t valueSize, result_t result) {
}
/**
* A value was retrieved from the given key.
* @param key - the key used to find the value
* @param valueHolder - pointer to the buffer where the value was stored
* @param valueSize - the actual size of the value.
* @param result - SUCCESS if the value was pulled out and is uncorrupted
*/
event void BDictionary.retrieved(uint32_t key, void *valueHolder, uint16_t valueSize, result_t result) {
}
/**
* A key-value pair was removed
* @param key - the key that should no longer exist
* @param result - SUCCESS if the key was really removed
*/
event void BDictionary.removed(uint32_t key, result_t result) {
}
/**
* The next key in the open Dictionary file
* @param nextKey - the next key
* @param result - SUCCESS if this is the really the next key,
* FAIL if the presentKey was invalid or there is no next key.
*/
event void BDictionary.nextKey(uint32_t nextKey, result_t result) {
}
}
--- NEW FILE: readme.txt ---
This is a standalone Blackbook application with nothing else
attached and no functionality. By compiling it, you'll see exactly
how much ROM and RAM Blackbook requires. It does nothing besides that.
@author David Moss (dmm at rincon.com)
--- NEW FILE: Makefile ---
COMPONENT=TestBlackbookC
# Choose one:
#CFLAGS += -I../../implementation/AT45DB
CFLAGS += -I../../implementation/STM25P
CFLAGS += -I../../ -I../../interfaces -I../../implementation
CFLAGS += -I../../../../tos/lib/State
include $(TOSROOT)/apps/Makerules
--- NEW FILE: TestBlackbookC.nc ---
/*
* Copyright (c) 2004-2006 Rincon Research Corporation.
* All rights reserved.
*
* Rincon Research will permit distribution and use by others subject to
* the restrictions of a licensing agreement which contains (among other things)
* the following restrictions:
*
* 1. No credit will be taken for the Work of others.
* 2. It will not be resold for a price in excess of reproduction and
* distribution costs.
* 3. Others are not restricted from copying it or using it except as
* set forward in the licensing agreement.
* 4. Commented source code of any modifications or additions will be
* made available to Rincon Research on the same terms.
* 5. This notice will remain intact and displayed prominently.
*
* Copies of the complete licensing agreement may be obtained by contacting
* Rincon Research, 101 N. Wilmot, Suite 101, Tucson, AZ 85711.
*
* There is no warranty with this product, either expressed or implied.
* Use at your own risk. Rincon Research is not liable or responsible for
* damage or loss incurred or resulting from the use or misuse of this software.
*/
/**
* Blackbook Test Module
*
* @author David Moss - dmm at rincon.com
*/
configuration TestBlackbookC {
}
implementation {
components Main, TestBlackbookM, BlackbookC;
Main.StdControl -> BlackbookC;
TestBlackbookM.BClean -> BlackbookC.BClean;
TestBlackbookM.BBoot -> BlackbookC.BBoot;
TestBlackbookM.BFileRead -> BlackbookC.BFileRead[unique("BFileRead")];
TestBlackbookM.BFileWrite -> BlackbookC.BFileWrite[unique("BFileWrite")];
TestBlackbookM.BFileDelete -> BlackbookC.BFileDelete[unique("BFileDelete")];
TestBlackbookM.BFileDir -> BlackbookC.BFileDir[unique("BFileDir")];
TestBlackbookM.BDictionary -> BlackbookC.BDictionary[unique("BDictionary")];
}
- Previous message: [Tinyos-contrib-commits]
CVS: tinyos-1.x/contrib/rincon/apps/Blackbook3/implementation/STM25P
FlashBridgeM.nc, NONE, 1.1 readme.txt, NONE, 1.1 Makefile,
NONE, 1.1 FlashSettings.h, NONE, 1.1 FlashBridgeC.nc, NONE, 1.1
- Next message: [Tinyos-contrib-commits]
CVS: tinyos-1.x/contrib/rincon/apps/Blackbook3
BlackbookC.nc, NONE, 1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Tinyos-contrib-commits
mailing list