Hi,

I'm looking at line 309 in the Receive.receive() function in TimeSyncP.nc:

    event message_t* Receive.receive(message_t* msg, void* payload, uint8_t
len)
    {
#ifdef TIMESYNC_DEBUG   // this code can be used to simulate multiple hopsf
        uint8_t incomingID = (uint8_t)((TimeSyncMsg*)payload)->nodeID;
        int8_t diff = (incomingID & 0x0F) - (TOS_NODE_ID & 0x0F);
        if( diff < -1 || diff > 1 )
            return msg;
        diff = (incomingID & 0xF0) - (TOS_NODE_ID & 0xF0);
        if( diff < -16 || diff > 16 )
            return msg;
#endif
        if( (state & STATE_PROCESSING) == 0 ) {
            message_t* old = processedMsg;

            processedMsg = msg;
309:            ((TimeSyncMsg*)(payload))->localTime = call
TimeSyncPacket.eventTime(msg);

            state |= STATE_PROCESSING;
            post processMsg();

            return old;
        }

        return msg;
    }

What actually happens with localTime after this assignment? It looks like
localTime is just assigned the event time and then nothing is done with the
value. Does the radio stack use localTime when receive() returns? I couldn't
see anything in the lower levels of the radio stack. I'm using the CVS head.

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

Reply via email to