]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/rf230/TimeSyncMessageP.nc
IRIS: reworked the time sync implementation
[tinyos-2.x.git] / tos / chips / rf230 / TimeSyncMessageP.nc
index 81616cdf49d467db8c5f059cb548fd52d312aa00..a80906a6d2d125b1a7d2dbb66179381a3dbeb8c6 100644 (file)
@@ -46,6 +46,8 @@ module TimeSyncMessageP
 
                interface LocalTime<TRF230> as LocalTimeRadio;
                interface LocalTime<TMilli> as LocalTimeMilli;
+
+               interface PacketField<uint8_t> as PacketTimeSyncOffset;
        }
 }
 
@@ -92,6 +94,8 @@ implementation
                timesync_footer_t* footer = (timesync_footer_t*)(msg->data + len);
                footer->time_offset = (nx_int32_t)event_time;
 
+               call PacketTimeSyncOffset.set(msg, len);
+
                return call SubSend.send[id](addr, msg, len + sizeof(timesync_footer_t));
        }