hello everyone...
please help me..i am newbie in using tinyOS..now i want to combined
Surge_Reliable module and XSensorMTS400 module and injecting that program in my
node...
i can use that module one by one. i know if i want to use Surge_Reliable module
i just install it in my mote and sink. if i want to use XSensorMTS400 i just
install XSensorMTS400 module in my mote and install TOSBase module in my sink.
some body please help me to combined the script and edit "makefile"
this is script and makefile Surge_Reliable module
SCRIPT :
includes Surge;
includes SurgeCmd;
includes MultiHop;
configuration Surge {
}
implementation {
components Main, SurgeM, TimerC, LedsC, NoLeds, ADCC, RandomLFSR, PhotoTemp,
GenericCommPromiscuous as Comm, Bcast, EWMAMultiHopRouter as multihopM ,
QueuedSend, Sounder, Accel, AttrMag, Attr;
Main.StdControl -> SurgeM.StdControl;
Main.StdControl -> Bcast.StdControl;
Main.StdControl -> multihopM.StdControl;
Main.StdControl -> QueuedSend.StdControl;
Main.StdControl -> TimerC;
Main.StdControl -> Comm;
Main.StdControl -> AttrMag;
// multihopM.CommControl -> Comm;
SurgeM.ADCControl -> ADCC;
#ifndef PLATFORM_PC
SurgeM.Batt -> ADCC.ADC[TOS_ADC_BANDGAP_PORT];
#else
SurgeM.Batt -> ADCC.ADC[10];
#endif
SurgeM.Temp -> PhotoTemp.ExternalTempADC;
SurgeM.Light -> PhotoTemp.ExternalPhotoADC;
SurgeM.AccelX -> Accel.AccelX;
SurgeM.AccelY -> Accel.AccelY;
SurgeM.AccelCtl -> Accel;
SurgeM.TempStdControl -> PhotoTemp.TempStdControl;
SurgeM.LightStdControl -> PhotoTemp.PhotoStdControl;
SurgeM.TempTimer -> TimerC.Timer[unique("Timer")];
SurgeM.Timer -> TimerC.Timer[unique("Timer")];
SurgeM.Leds -> LedsC; // NoLeds;
SurgeM.Sounder -> Sounder;
SurgeM.AttrUse -> Attr.AttrUse;
SurgeM.Bcast -> Bcast.Receive[AM_SURGECMDMSG];
Bcast.ReceiveMsg[AM_SURGECMDMSG] -> Comm.ReceiveMsg[AM_SURGECMDMSG];
SurgeM.RouteControl -> multihopM;
SurgeM.Send -> multihopM.Send[AM_SURGEMSG];
multihopM.ReceiveMsg[AM_SURGEMSG] -> Comm.ReceiveMsg[AM_SURGEMSG];
//multihopM.ReceiveMsg[AM_MULTIHOPMSG] -> Comm.ReceiveMsg[AM_MULTIHOPMSG];
}
MAKEFILE :
COMPONENT=Surge
SENSORBOARD=micasb
MSG_SIZE=80
PFLAGS+= -I../../beta/tos/lib/CC2420RadioAck -I../../beta/tos/platform/micazack
-I../../tos/lib/ReliableRoute -I%T/lib/Queue -I%T/lib/Broadcast
-I%T/lib/Attributes
include ../MakeXbowlocal
include ${TOSROOT}/tools/make/Makerules
and this is XSensorMTS400 script and makefile
SCRIPT :
includes sensorboardApp;
configuration TestMTS400 {
// this module does not provide any interface
}
implementation {
components Main, TestMTS400M, SensirionHumidity,
IntersemaPressure,MicaWbSwitch,
UARTGpsPacket,//UARTNoCRCPacket,
FramerM, UART, RadioCRCPacket as Comm,ADCC,
TimerC, Voltage, LedsC, Accel, TaosPhoto;
Main.StdControl -> TestMTS400M;
Main.StdControl -> TimerC;
// Wiring for gps
TestMTS400M.GpsControl -> UARTGpsPacket;
// TestMTS400M.GpsSend -> UARTGpsPacket;
TestMTS400M.GpsReceive -> UARTGpsPacket;
TestMTS400M.GpsCmd -> UARTGpsPacket.GpsCmd;
//UARTGpsPacket.GpsCmd;
// Wiring for UART communication
TestMTS400M.UARTControl -> FramerM;
TestMTS400M.UARTSend -> FramerM;
TestMTS400M.UARTReceive -> FramerM;
FramerM.ByteControl -> UART;
FramerM.ByteComm -> UART;
// Wiring for RF communication
TestMTS400M.RadioControl -> Comm;
TestMTS400M.RadioSend -> Comm;
TestMTS400M.RadioReceive -> Comm;
// Wiring for Battery Ref
TestMTS400M.BattControl -> Voltage;
TestMTS400M.ADCBATT -> Voltage;
// Wiring for Taos light sensor
TestMTS400M.TaosControl -> TaosPhoto;
TestMTS400M.TaosCh0 -> TaosPhoto.ADC[0];
TestMTS400M.TaosCh1 -> TaosPhoto.ADC[1];
// Wiring for Accelerometer
TestMTS400M.AccelControl->Accel.StdControl;
TestMTS400M.AccelCmd -> Accel.AccelCmd;
TestMTS400M.AccelX -> Accel.AccelX;
TestMTS400M.AccelY -> Accel.AccelY;
// Wiring for Sensirion humidity/temperature sensor
TestMTS400M.TempHumControl -> SensirionHumidity;
TestMTS400M.Humidity -> SensirionHumidity.Humidity;
TestMTS400M.Temperature -> SensirionHumidity.Temperature;
TestMTS400M.HumidityError -> SensirionHumidity.HumidityError;
TestMTS400M.TemperatureError -> SensirionHumidity.TemperatureError;
// Wiring for Intersema barometric pressure/temperature sensor
TestMTS400M.IntersemaCal -> IntersemaPressure;
TestMTS400M.PressureControl -> IntersemaPressure;
TestMTS400M.IntersemaPressure -> IntersemaPressure.Pressure;
TestMTS400M.IntersemaTemp -> IntersemaPressure.Temperature;
TestMTS400M.Leds -> LedsC;
TestMTS400M.Timer -> TimerC.Timer[unique("Timer")];
}
MAKEFILE :
COMPONENT=TestMTS400
SENSORBOARD=mts400
PFLAGS= -I../../tos/interfaces -I../../tos/system
-I../../tos/platform/$(PLATFORM) -I../../tos/lib
-I../../tos/sensorboards/$(SENSORBOARD)
include ../MakeXbowlocal
include ${TOSROOT}/tools/make/Makerules
this is the script and makefile TOSBase module
SCRIPT :
configuration TOSBase {
}
implementation {
components Main, TOSBaseM, RadioCRCPacket as Comm, FramerM, UART, LedsC;
Main.StdControl -> TOSBaseM;
TOSBaseM.UARTControl -> FramerM;
TOSBaseM.UARTSend -> FramerM;
TOSBaseM.UARTReceive -> FramerM;
TOSBaseM.UARTTokenReceive -> FramerM;
TOSBaseM.RadioControl -> Comm;
TOSBaseM.RadioSend -> Comm;
TOSBaseM.RadioReceive -> Comm;
TOSBaseM.Leds -> LedsC;
FramerM.ByteControl -> UART;
FramerM.ByteComm -> UART;
}
MAKEFILE :
COMPONENT=TOSBase
XBOWROOT=%T/../contrib/xbow/tos
PFLAGS= -I$(XBOWROOT)/platform/mica2
include ../MakeXbowlocal
include $(TOSROOT)/tools/make/Makerules
thank you for your help and i'm sorry for my bad english..
regards
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help