The array index numbers indicate the type of message structure being used.
Generally we like to #define or enum these in a header file someplace so
they make some kind of sense and don't get us confused. You can see an
example of handling different message types in my RoboCode:
http://www.etantdonnes.com/Motes/robocode.tar.gz
MS
Siva Sankar Gupta wrote:
> Hello,
>
> I'm writing an application using TinyOS 1.x in which i want to send
> different type of messages over the radio. I'm not sure how to built
> this application in TinyOS 1.x. These messages must also be transmitted
> over the UART.
> Suppose in the examples in TinyOS 1.x
>
> In the Configuration we are given......
> configuration SimpleRelayC{
> }
> implementation{
> components Main,
> SimpleRelayM,
> LedsC,
> TimerC,
> GenericComm;
>
> Main.StdControl -> GenericComm;
> Main.StdControl -> SimpleRelayM;
> Main.StdControl -> TimerC;
> SimpleRelayM.SendMsg -> GenericComm.SendMsg[5];
> SimpleRelayM.ReceiveMsg -> GenericComm.ReceiveMsg[5];
> SimpleRelayM.SendUART -> GenericComm.SendMsg[1];//default 1
> SimpleRelayM.ReceiveUART -> GenericComm.ReceiveMsg[1];// default 1
> }
>
> and in the module
> module SimpleRelayM{
> provides interface StdControl;
>
> uses interface SendMsg;
> uses interface ReceiveMsg;
> uses interface SendMsg as SendUART;
> uses interface ReceiveMsg as ReceiveUART;
> }
> what does the numbers 1 and 5 stand for? i hope you understood the
> problem and waiting for your replies
>
> Thankyou for your help
>
> with regards
> --
> Siva Sankar Gupta Guggilum
> Schubertstraße 19
> Klagenfurt,9020
> Austria
> Ph:- 0043 6606871071
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
--
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help