[Tinyos-contrib-commits] CVS: tinyos-1.x/contrib/umass/apps/StressTest Makefile, NONE, 1.1 StressTestC.nc, NONE, 1.1 StressTestM.nc, NONE, 1.1 sizes.h, NONE, 1.1

Gaurav gmathur at users.sourceforge.net
Sat Dec 9 13:05:50 PST 2006


Update of /cvsroot/tinyos/tinyos-1.x/contrib/umass/apps/StressTest
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv17795/apps/StressTest

Added Files:
	Makefile StressTestC.nc StressTestM.nc sizes.h 
Log Message:
Added contrib/umass containing Capsule -- a storage system for sensors

--- NEW FILE: Makefile ---
MSG_SIZE=128
COMPONENT=StressTestC
PFLAGS=-I%T/lib/Util -g
include ../Makerules


--- NEW FILE: StressTestC.nc ---
/*
 * Test Compaction
 */
includes common_header;
includes sizes;

configuration StressTestC {
}

implementation {
    components Main, StressTestM, ChunkStorageM, FalC, ConsoleC, Crc8M,
               LedsC, StackM, StreamM, CheckpointM,
               IndexM, ArrayM, StreamIndexM, QueueM, CompactionAbsorbM;

    Main.StdControl -> StressTestM;
    Main.StdControl -> FalC;
    Main.StdControl -> ChunkStorageM;
    Main.StdControl -> IndexM;

    /* Wire the chunk storage system */
    ChunkStorageM.GenericFlash -> FalC.GenericFlash[unique("Flash")]; 
    ChunkStorageM.Leds -> LedsC;
    ChunkStorageM.Compaction -> CompactionAbsorbM;
    ChunkStorageM.Crc8 -> Crc8M;

    /* Wire the data structures */
    StackM.ChunkStorage -> ChunkStorageM.ChunkStorage[unique("Fal")];
    StreamM.ChunkStorage -> ChunkStorageM.ChunkStorage[unique("Fal")];
    QueueM.ChunkStorage -> ChunkStorageM.ChunkStorage[unique("Fal")];
    ArrayM.ChunkStorage -> ChunkStorageM.ChunkStorage[unique("Fal")];
    IndexM.ChunkStorage -> ChunkStorageM.ChunkStorage[unique("Fal")];
    StreamIndexM.ChunkStorage -> ChunkStorageM.ChunkStorage[unique("Fal")];
    StreamIndexM.Stream -> StreamM.Stream[unique("Stream")];
    StreamIndexM.Index -> IndexM.Index[unique("Index")];
    IndexM.Array -> ArrayM.Array;
    StreamM.Stack -> StackM.Stack[unique("Stack")];
    StackM.Console -> ConsoleC;
    ChunkStorageM.Console -> ConsoleC;

    StackM.Leds -> LedsC;
    StreamM.Leds -> LedsC;
    ArrayM.Leds -> LedsC;
    IndexM.Leds -> LedsC;
    StreamIndexM.Leds -> LedsC;
    
    /* Debugging */
    StressTestM.Console -> ConsoleC;
    QueueM.Console -> ConsoleC;
    StreamM.Console -> ConsoleC;
    StackM.Console -> ConsoleC;
    IndexM.Console -> ConsoleC;
    ArrayM.Console -> ConsoleC;
    StreamIndexM.Console -> ConsoleC;
    
    /* Testing */
    StressTestM.ChunkStorage -> ChunkStorageM.ChunkStorage[unique("Fal")];
    StressTestM.Leds -> LedsC;
    StressTestM.Stack -> StackM.Stack[unique("Stack")];
    StressTestM.GenericFlash -> FalC.GenericFlash[unique("Flash")];
    StressTestM.Queue -> QueueM.Queue[unique("Queue")];
    StressTestM.StreamIndex -> StreamIndexM.StreamIndex[unique("StreamIndex")];
    StressTestM.Index -> IndexM.Index[unique("Index")];
    StressTestM.Stream -> StreamM.Stream[unique("Stream")];
}

--- NEW FILE: StressTestM.nc ---
/*
 * Measuring the performance of the data structures
 */
includes chunk_header;
includes sizes;

module StressTestM {
    provides interface StdControl;
    
    uses {
        interface ChunkStorage;
        interface Leds;
        interface Console;
        interface Stack;
        interface GenericFlash;
        interface Queue;
        interface Stream;
        interface StreamIndex;
        interface Index;
[...972 lines suppressed...]
        call Console.string("Init done\n");
        return (SUCCESS);
    }

    event result_t GenericFlash.writeDone(result_t r)
    {
        return (SUCCESS);
    }

    event result_t GenericFlash.readDone(result_t r)
    {
        return (SUCCESS);
    }

    event result_t GenericFlash.falReadDone(result_t r)
    {
        return (SUCCESS);
    }

}

--- NEW FILE: sizes.h ---
#ifndef SIZES_H
#define SIZES_H

/*
 * Debug messages
 */

//#define INDEX_DEBUG
//#define ARRAY_DEBUG
//#define CHUNK_DEBUG
//#define QUEUE_DEBUG
//#define STACK_DEBUG
//#define STREAM_DEBUG
//#define STREAM_INDEX_DEBUG
//#define TRANSACTION_DEBUG
//#define ROOT_DIR_DEBUG
//#define COMPACT_DEBUG
#define COUNT 50
/* Length of the data (compaction expt) */
#define LEN 32


/*
 * TODO
 * The following defines the number of instances of each of these storage 
 * objects being used in the application.
 * The values for these should ideally be set automatically by the compiler
 */


/*
 * This indicates the number of elements in level 1 of the index
 */
#define ARRAY_ELEMENTS_PER_CHUNK 10

/*
 * This indicates the number of index elements in level 2 of the index
 */
#define INDEX_ELEMENTS_PER_CHUNK 10




#endif



More information about the Tinyos-contrib-commits mailing list