interface WriteBeaconField as GtsInfoWrite;
interface WriteBeaconField as PendingAddrWrite;
interface FrameUtility;
- interface Get<bool> as IsTrackingBeacons;
+ interface GetNow<bool> as IsTrackingBeacons;
interface GetNow<uint32_t> as LastBeaconRxTime;
interface GetNow<ieee154_reftime_t*> as LastBeaconRxRefTime;
interface Ieee802154Debug as Debug;
!(IEEE154_SUPPORTED_CHANNELS & ((uint32_t) 1 << logicalChannel)) ||
(superframeOrder > beaconOrder))
status = IEEE154_INVALID_PARAMETER;
- else if (startTime && !call IsTrackingBeacons.get())
+ else if (startTime && !call IsTrackingBeacons.getNow())
status = IEEE154_TRACKING_OFF;
else if (startTime && 0xFF000000)
status = IEEE154_INVALID_PARAMETER;
event void Token.granted()
{
+ call Debug.flush();
call Debug.log(LEVEL_INFO, StartP_GOT_RESOURCE, m_lastBeaconTxTime, m_beaconInterval, m_requests);
if (m_requests & REQUEST_REALIGNMENT_DONE_PENDING){
// unlikely to occur: we have not yet received a done()
m_framePendingBit = TRUE;
else
m_framePendingBit = FALSE;
- memcpy(m_gtsField, &frame->payload[0], gtsFieldLength);
+ memcpy(m_gtsField, &frame->payload[2], gtsFieldLength);
if (frame->payload[1] & 0x10){
// BLE is active; calculate the time offset from slot0
m_BLELen = IEEE154_SHR_DURATION +