[Tinyos-contrib-commits]
CVS: tinyos-1.x/contrib/rincon/apps/MeshCollect/apps/TestMeshCollect
Makefile, NONE, 1.1 TestMeshCollectM.nc, NONE,
1.1 TestMeshCollect.h, NONE, 1.1 readme.txt, NONE,
1.1 TestMeshCollectC.nc, NONE, 1.1
dmm
rincon at users.sourceforge.net
Thu Jul 27 16:38:27 PDT 2006
Update of /cvsroot/tinyos/tinyos-1.x/contrib/rincon/apps/MeshCollect/apps/TestMeshCollect
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv18715/contrib/rincon/apps/MeshCollect/apps/TestMeshCollect
Added Files:
Makefile TestMeshCollectM.nc TestMeshCollect.h readme.txt
TestMeshCollectC.nc
Log Message:
Added the MeshCollect component to CVS; Testing will continue on this component
--- NEW FILE: Makefile ---
COMPONENT=TestMeshCollectC
# Standard include directories
CFLAGS += -I../../../../tos/lib/Transceiver
CFLAGS += -I../../../../tos/lib/State
CFLAGS += -I../../
CFLAGS += -I../../core
CFLAGS += -I../../interfaces
# Increase the Transceiver pool of messages
CFLAGS += -DMAX_TOS_MSGS=10
include $(MAKERULES)
--- NEW FILE: TestMeshCollectM.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.
*/
/**
* @author David Moss
*/
includes TestMeshCollect;
module TestMeshCollectM {
provides {
interface StdControl;
}
uses {
interface Transceiver as MultihopTransceiver;
interface Packet as MultihopPacket;
interface RouteControl;
interface Leds;
interface Timer;
}
}
implementation {
/***************** StdControl Commands ****************/
command result_t StdControl.init() {
return SUCCESS;
}
command result_t StdControl.start() {
call Timer.start(TIMER_REPEAT, 2048);
return SUCCESS;
}
command result_t StdControl.stop() {
return SUCCESS;
}
/***************** Timer Events ****************/
event result_t Timer.fired() {
/*
This is where you could have this component send a message
but I commented it out because I wanted to watch the MeshAnalysis
work - it does something similar to this TestMsg.
TOS_Msg *tosPtr;
TestMsg *payload;
if((tosPtr = call MultihopTransceiver.requestWrite()) != NULL) {
payload = (TestMsg *) call MultihopPacket.getPayload(tosPtr, NULL);
payload->origin = TOS_LOCAL_ADDRESS;
payload->parent = call RouteControl.getParent();
payload->lqi = call RouteControl.getQuality();
call MultihopTransceiver.sendRadio(0xDA, sizeof(TestMsg));
}
*/
return SUCCESS;
}
/***************** RouteControl Events ****************/
event void RouteControl.connected(bool isConnected) {
}
/***************** MultihopTransceiver Events ****************/
/**
* This is the only event we receive from MultihopTransceiver
*/
event result_t MultihopTransceiver.radioSendDone(TOS_MsgPtr m, result_t result) {
return SUCCESS;
}
event result_t MultihopTransceiver.uartSendDone(TOS_MsgPtr m, result_t result) {
return SUCCESS;
}
event TOS_MsgPtr MultihopTransceiver.receiveRadio(TOS_MsgPtr m) {
return m;
}
event TOS_MsgPtr MultihopTransceiver.receiveUart(TOS_MsgPtr m) {
return m;
}
}
--- NEW FILE: TestMeshCollect.h ---
/*
* 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.
*/
#ifndef _TEST_MESH_COLLECT
#define _TEST_MESH_COLLECT
typedef struct TestMsg {
uint16_t origin;
uint16_t parent;
uint16_t lqi;
} TestMsg;
enum {
AM_TESTMSG = 0x10,
};
#endif
--- NEW FILE: readme.txt ---
Compiling:
You should just download the whole Rincon directory from CVS to
run this, because it requires the Transceiver and State components.
You should also be using the newest radio stack provided by
Rincon in the /contrib/rincon/tos/lib/CC1000Radio directory.
If you don't want to use the newest radio stack, make sure
your ack's are enabled on all motes.
This test application will compile the MeshCollect component.
The MeshAnalysis will start running on the mote and you can see
how the mesh is forming. Right now there are no Java tools
to read the MeshAnalysis message, so you may have to parse
it out yourself manually with Listen or write your own tools to view
the status of the network.
This component used to send multihop messages over the network,
but I commented that code out because MeshAnalysis took over
that job.
-David Moss (dmm at rincon.com)
--- NEW FILE: TestMeshCollectC.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.
*/
/**
* @author David Moss
*/
includes TestMeshCollect;
configuration TestMeshCollectC {
}
implementation {
components Main, MeshCollectC, TestMeshCollectM, TimerC, LedsC;
Main.StdControl -> MeshCollectC;
Main.StdControl -> TestMeshCollectM;
Main.StdControl -> TimerC;
Main.StdControl -> LedsC;
TestMeshCollectM.MultihopTransceiver -> MeshCollectC.MultihopTransceiver[AM_TESTMSG];
TestMeshCollectM.MultihopPacket -> MeshCollectC.MultihopPacket;
TestMeshCollectM.RouteControl -> MeshCollectC;
TestMeshCollectM.Leds -> LedsC;
TestMeshCollectM.Timer -> TimerC.Timer[unique("Timer")];
}
More information about the Tinyos-contrib-commits
mailing list