Hai all,
I am new to tinyOS. I am facing some problems to measure the delay between 2 
events.  I thought Counter is a better option for this. I am using Crossbow 
micaz mote , mib510 programming board.  I have used CounterToLocalTimeC and 
tried the following wiring.
ATTEMPT-I
 SenseAppC.nc
--------------
components new CounterToLocalTimeC(TMilli);
  components new Atm128CounterC(TMilli, uint32_t);

SenseC.LocalTime -> CounterToLocalTimeC;
  CounterToLocalTimeC.Counter -> Atm128CounterC;
----------------------------------------------

SenseC.nc
---------

Event1:
uint32_t intial_time = call LocalTime.get();

Event2:
uint32_t final_time = call LocalTime.get();

Calculate delay:
delay = final_time - intial_time;
----------------------------------------------
I get following error:
In component `SenseAppC.Atm128CounterC':
/opt/tinyos-2.x/tos/chips/atm128/timer/Atm128CounterC.nc: In function 
`Counter.get':
/opt/tinyos-2.x/tos/chips/atm128/timer/Atm128CounterC.nc(SenseAppC.Atm128CounterC):43:
 Timer.get not connected
make: *** [exe0] Error 1

Kindly help to resolve the issue. 

I also tried using TransformCounterC, thinking that Counter interface used by 
CounterToLocalTimeC is Counter<precision_tag,uint32_t> and I thought may be 
Atmega 128L provides only 8-bit/16 bit Timers as mentioned in datasheet

ATTEMPT-II
In SenseAppC.nc
---------------------------------------------------
 components new CounterToLocalTimeC(TMilli);
  components new TransformCounterC(TMilli,uint32_t,TMilli,uint8_t,2,uint32_t);
  components new Atm128CounterC(TMilli, uint8_t);


 SenseC.LocalTime -> CounterToLocalTimeC;
  CounterToLocalTimeC.Counter -> TransformCounterC;
  TransformCounterC.CounterFrom -> Atm128CounterC;
-------------------------------------------------------------
Still I get errors.

In component `SenseAppC.Atm128CounterC':
/opt/tinyos-2.x/tos/chips/atm128/timer/Atm128CounterC.nc: In function 
`Counter.get':
/opt/tinyos-2.x/tos/chips/atm128/timer/Atm128CounterC.nc(SenseAppC.Atm128CounterC):43:
 Timer.get not connected
/opt/tinyos-2.x/tos/chips/atm128/timer/Atm128CounterC.nc: In function 
`Counter.isOverflowPending':
/opt/tinyos-2.x/tos/chips/atm128/timer/Atm128CounterC.nc(SenseAppC.Atm128CounterC):48:
 Timer.test not connected
make: *** [exe0] Error 1

Am I following a correct approach. Kindly help to resolve issue

Thanks & Regards
Hari
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to