interface Set<ieee154_macBeaconTxTime_t> as SetMacBeaconTxTime;
interface Set<ieee154_macPanCoordinator_t> as SetMacPanCoordinator;
interface Get<ieee154_macPanCoordinator_t> as IsMacPanCoordinator;
- interface Get<bool> as IsBeaconEnabledPAN;
+ interface GetNow<bool> as IsBeaconEnabledPAN;
interface FrameUtility;
interface IEEE154Frame as Frame;
interface IEEE154BeaconFrame as BeaconFrame;
ieee154_PIB_t m_pib;
uint8_t m_numResetClientPending;
bool m_setDefaultPIB;
- uint8_t m_panType;
+ norace uint8_t m_panType;
+ uint8_t m_updatePANType;
uint8_t m_resetSpin;
#ifdef IEEE154_EXTENDED_ADDRESS
if (call PromiscuousModeGet.get())
return IEEE154_TRANSACTION_OVERFLOW; // must first cancel promiscuous mode!
m_setDefaultPIB = SetDefaultPIB;
- m_panType = PANType;
+ m_updatePANType = PANType;
if (!call Token.isOwner())
call Token.request();
return IEEE154_SUCCESS;
event void RadioControl.stopDone(error_t error)
{
- call CapReset.init(); // resets the CAP component(s)
- call CapQueueReset.init(); // resets the CAP queue component(s)
+ m_panType = m_updatePANType;
+ call CapReset.init(); // resets the CAP component(s), spool out frames
+ call CapQueueReset.init(); // resets the CAP queue component(s), spool out frames
call MacReset.init(); // resets the remaining components
m_resetSpin = 5;
post resetSpinTask();
return dest == m_pib.macCoordExtendedAddress;
}
- command bool IsBeaconEnabledPAN.get()
+ async command bool IsBeaconEnabledPAN.getNow()
{
return (m_panType == BEACON_ENABLED_PAN);
}