[Tinyos-help] question about timesyn in MultiHopLQI.nc

yicheng y-jie at northwestern.edu
Thu Sep 15 11:27:51 PDT 2005


Hi Joe,

It does have, actually it is compiled by conditional 'TIMESYNC', here it is:

In event TOS_MsgPtr ReceiveMsg.receive(TOS_MsgPtr Msg):
#ifdef TIMESYNC
      call TimeSet.set(call TimeUtil.create(0, pRP->timestamp));
      dbg(DBG_ROUTE,"TimeSync: Setting Time To: %d\n", pRP->timestamp);
#endif

#ifdef TIMESYNC
  async event void RadioCoordinator.startSymbol(uint8_t bitsPerBlock, 
						uint8_t offset, 
						TOS_MsgPtr msgBuff) {
    tos_time_t endTime;
    TOS_MHopMsg *pMHMsg = (TOS_MHopMsg *) &msgBuff->data[0];
    BeaconMsg *pRP = (BeaconMsg *) &pMHMsg->data[0];

    atomic {
      if (msgBufBusy == TRUE) {
	endTime = call Time.get(); 
	pRP->timestamp = endTime.low32;
	dbg(DBG_ROUTE,"TimeSync: End Send RoutePacket Time %d\n",
endTime.low32);
      }
    }
  }

  async event void RadioCoordinator.byte(TOS_MsgPtr msg, uint8_t byteCount)
{
      /* XXX: do nothing */
  }

  async event void RadioCoordinator.blockTimer() {
      /* XXX: do nothing */
  }
#endif

-----Original Message-----
From: joe.polastre at gmail.com [mailto:joe.polastre at gmail.com] On Behalf Of
Joe Polastre
Sent: Thursday, September 15, 2005 12:43 PM
To: yicheng
Cc: tinyos-help at millennium.berkeley.edu
Subject: Re: [Tinyos-help] question about timesyn in MultiHopLQI.nc

There is no time sync in MultiHopLQI.

-Joe

On 9/15/05, yicheng <y-jie at northwestern.edu> wrote:
> Hi All,
> 
> I have a question about using TimeSyn in MultiHopLQI.nc component. When
> every node in the network is tuned to a unified time with the base node
> through TimeSync, does route message need to be sent at a fixed interval
> between each node? Say there's 6 nodes, no.6 is the source node and no.0
is
> the base node, after TimeSync, no.6 node sends route message at time tick
n,
> no.5 node sends route message at time tick n + 10, no.4 at n + 20, no.3 at
n
> + 30...is this necessary?
> 
> Thanks!
> Yicheng
> 
> _______________________________________________
> Tinyos-help mailing list
> Tinyos-help at Millennium.Berkeley.EDU
> https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>



More information about the Tinyos-help mailing list