X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=tos%2Flib%2Fmac%2Ftkn154%2FPibP.nc;h=d8f1c286b604c9b91629ea3747697e948ce08d08;hb=dac274225f4101f5dd61d0df8c6647d7f7a4c05f;hp=eb2f9bd0d2cbb7c780112b39dd658f33eb8e3dda;hpb=f50b3e1320b358f1686b7fd440dc125e3c24c327;p=tinyos-2.x.git diff --git a/tos/lib/mac/tkn154/PibP.nc b/tos/lib/mac/tkn154/PibP.nc index eb2f9bd0..d8f1c286 100644 --- a/tos/lib/mac/tkn154/PibP.nc +++ b/tos/lib/mac/tkn154/PibP.nc @@ -50,7 +50,7 @@ module PibP { interface Set as SetMacBeaconTxTime; interface Set as SetMacPanCoordinator; interface Get as IsMacPanCoordinator; - interface Get as IsBeaconEnabledPAN; + interface GetNow as IsBeaconEnabledPAN; interface FrameUtility; interface IEEE154Frame as Frame; interface IEEE154BeaconFrame as BeaconFrame; @@ -77,7 +77,8 @@ implementation 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 @@ -176,7 +177,7 @@ implementation 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; @@ -202,8 +203,9 @@ implementation 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(); @@ -1047,7 +1049,7 @@ implementation return dest == m_pib.macCoordExtendedAddress; } - command bool IsBeaconEnabledPAN.get() + async command bool IsBeaconEnabledPAN.getNow() { return (m_panType == BEACON_ENABLED_PAN); }