I do not understand why shoul i  used seconds, hour, minute. I want to
mesure the jitter ??
what do you think ? please help if you can ..
Best,
  Sara

Juan Antonio wrote:
you try made your aplication with BlinkToRadio and TestSerial
(C:\cygwin\opt\tinyos-2.x\apps\tests\TestSerial).

*
/////////////////////////////////////////////////////////////////////////////////////////
In the node remote (BlinkToRadio) modify BlinkToRadio.h:*

enum {
  AM_BLINKTORADIOMSG = 6,  //Remenber this number
  TIMER_PERIOD_MILLI = 250  //Change to 1000. The units of parameters in
timers is in ms.
};

typedef nx_struct BlinkToRadioMsg {
  //Add variables for hour...seconds
  nx_uint8_t seconds, hour, minute;
  nx_uint16_t nodeid;
  nx_uint16_t counter;
} BlinkToRadioMsg;

Inside of BlinkToRadioC for get the time in event receive or update the time
in timer fired event is very easy. In timer before of send:

btrpkt->nodeid = TOS_NODE_ID;
btrpkt->counter = counter;
btrpkt->seconds = sec; //You must update this varible in your program

For get the value in event receive btrpkt->seconds

*
////////////////////////////////////////////////////////////////////////////////////////////
In the PC node.* Copy BlinkToRadio.h and paste inside of folder. Using code
of BlinkToRadio change the files TestSerialAppC (take care with names of
interfaces, you not can use the same, you can see configuration BaseStation
of example also) and TestSerialC to when receive the message by serie send
to radio and when recive the message by radio send to serie. Remove the
timer, you not need. Add variables for time in the struct of the file
TestSerial.h. Open Makefile, you can see the line java mig ...this line
generatte the code of file TestSerialMsg when you type make plattform
automatically. Finally you only need modify file TestSerial.java for the new
variables using methods of TestSerialMsg.java. See the other for variable
counter of before:

payload.set_counter(counter); //update counter
msg.get_counter()  //get counter value

Remenber run TestSerial program in cygwin. The same with in tutorial.
Tutorial 3 y 4 can help you very much also.
It is a long, but you understand all finally.

I wait that help you.

A greeting,
Juan Antonio.
_______________________________________________
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to