diff --git a/include/openthread/instance.h b/include/openthread/instance.h index 9fe27ff33..1a45a97e2 100644 --- a/include/openthread/instance.h +++ b/include/openthread/instance.h @@ -53,7 +53,7 @@ extern "C" { * @note This number versions both OpenThread platform and user APIs. * */ -#define OPENTHREAD_API_VERSION (206) +#define OPENTHREAD_API_VERSION (207) /** * @addtogroup api-instance diff --git a/include/openthread/platform/radio.h b/include/openthread/platform/radio.h index 6e85030c0..ba7314ebb 100644 --- a/include/openthread/platform/radio.h +++ b/include/openthread/platform/radio.h @@ -1060,14 +1060,14 @@ void otPlatRadioUpdateCslSampleTime(otInstance *aInstance, uint32_t aCslSampleTi uint8_t otPlatRadioGetCslAccuracy(otInstance *aInstance); /** - * Get the current uncertainty, in units of 10 us, of the clock used for scheduling CSL operations. + * The fixed uncertainty of the Device for scheduling CSL Transmissions in units of 10 microseconds. * * @param[in] aInstance A pointer to an OpenThread instance. * - * @returns The current CSL Clock Uncertainty in units of 10 us. + * @returns The CSL Uncertainty in units of 10 us. * */ -uint8_t otPlatRadioGetCslClockUncertainty(otInstance *aInstance); +uint8_t otPlatRadioGetCslUncertainty(otInstance *aInstance); /** * Set the max transmit power for a specific channel. diff --git a/src/core/radio/radio.hpp b/src/core/radio/radio.hpp index d82a8b867..10e5fd1c9 100644 --- a/src/core/radio/radio.hpp +++ b/src/core/radio/radio.hpp @@ -473,12 +473,12 @@ public: uint8_t GetCslAccuracy(void); /** - * Get the current uncertainty, in units of 10 us, of the clock used for scheduling CSL operations. + * Get the fixed uncertainty of the Device for scheduling CSL Transmissions in units of 10 microseconds. * - * @returns The current CSL Clock Uncertainty in units of 10 us. + * @returns The CSL Uncertainty in units of 10 us. * */ - uint8_t GetCslClockUncertainty(void); + uint8_t GetCslUncertainty(void); #endif // OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE || OPENTHREAD_CONFIG_MAC_CSL_TRANSMITTER_ENABLE /** @@ -812,9 +812,9 @@ inline uint8_t Radio::GetCslAccuracy(void) #endif #if OPENTHREAD_CONFIG_MAC_CSL_TRANSMITTER_ENABLE -inline uint8_t Radio::GetCslClockUncertainty(void) +inline uint8_t Radio::GetCslUncertainty(void) { - return otPlatRadioGetCslClockUncertainty(GetInstancePtr()); + return otPlatRadioGetCslUncertainty(GetInstancePtr()); } #endif @@ -981,7 +981,7 @@ inline uint8_t Radio::GetCslAccuracy(void) return UINT8_MAX; } -inline uint8_t Radio::GetCslClockUncertainty(void) +inline uint8_t Radio::GetCslUncertainty(void) { return UINT8_MAX; } diff --git a/src/core/radio/radio_platform.cpp b/src/core/radio/radio_platform.cpp index 877de44bd..fe994c1ec 100644 --- a/src/core/radio/radio_platform.cpp +++ b/src/core/radio/radio_platform.cpp @@ -250,7 +250,7 @@ OT_TOOL_WEAK uint8_t otPlatRadioGetCslAccuracy(otInstance *aInstance) return UINT8_MAX; } -OT_TOOL_WEAK uint8_t otPlatRadioGetCslClockUncertainty(otInstance *aInstance) +OT_TOOL_WEAK uint8_t otPlatRadioGetCslUncertainty(otInstance *aInstance) { OT_UNUSED_VARIABLE(aInstance); diff --git a/src/core/thread/mle.cpp b/src/core/thread/mle.cpp index 3dcf12022..619171f6e 100644 --- a/src/core/thread/mle.cpp +++ b/src/core/thread/mle.cpp @@ -1556,7 +1556,7 @@ Error Mle::AppendCslClockAccuracy(Message &aMessage) cslClockAccuracy.Init(); cslClockAccuracy.SetCslClockAccuracy(Get().GetCslAccuracy()); - cslClockAccuracy.SetCslUncertainty(Get().GetCslClockUncertainty()); + cslClockAccuracy.SetCslUncertainty(Get().GetCslUncertainty()); SuccessOrExit(error = aMessage.Append(cslClockAccuracy)); @@ -3472,7 +3472,7 @@ bool Mle::IsBetterParent(uint16_t aRloc16, { cslMetric = CalcParentCslMetric(aCslClockAccuracy, aCslUncertainty); candidateCslMetric = - CalcParentCslMetric(mParentCandidate.GetCslClockAccuracy(), mParentCandidate.GetCslClockUncertainty()); + CalcParentCslMetric(mParentCandidate.GetCslClockAccuracy(), mParentCandidate.GetCslUncertainty()); if (candidateCslMetric != cslMetric) { ExitNow(rval = (cslMetric < candidateCslMetric)); @@ -3681,7 +3681,7 @@ void Mle::HandleParentResponse(RxInfo &aRxInfo) mParentCandidate.SetKeySequence(aRxInfo.mKeySequence); #if OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE mParentCandidate.SetCslClockAccuracy(clockAccuracy.GetCslClockAccuracy()); - mParentCandidate.SetCslClockUncertainty(clockAccuracy.GetCslUncertainty()); + mParentCandidate.SetCslUncertainty(clockAccuracy.GetCslUncertainty()); #endif mParentPriority = connectivity.GetParentPriority(); @@ -3809,7 +3809,7 @@ void Mle::HandleChildIdResponse(RxInfo &aRxInfo) mParentCandidate.Clear(); #if OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE - Get().SetCslParentUncertainty(mParent.GetCslClockUncertainty()); + Get().SetCslParentUncertainty(mParent.GetCslUncertainty()); Get().SetCslParentClockAccuracy(mParent.GetCslClockAccuracy()); #endif diff --git a/src/core/thread/topology.hpp b/src/core/thread/topology.hpp index dc39d9ddb..5d476825b 100644 --- a/src/core/thread/topology.hpp +++ b/src/core/thread/topology.hpp @@ -1365,7 +1365,7 @@ public: Neighbor::Init(aInstance); #if OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE SetCslClockAccuracy(kCslWorstCrystalPpm); - SetCslClockUncertainty(kCslWorstUncertainty); + SetCslUncertainty(kCslWorstUncertainty); #endif } @@ -1446,15 +1446,15 @@ public: * @returns The CSL clock uncertainty of this router. * */ - uint8_t GetCslClockUncertainty(void) const { return mCslClockUncertainty; } + uint8_t GetCslUncertainty(void) const { return mCslUncertainty; } /** * This method sets the CSL clock uncertainty of this router. * - * @param[in] aCslClockUncertainty The CSL clock uncertainty of this router. + * @param[in] aCslUncertainty The CSL clock uncertainty of this router. * */ - void SetCslClockUncertainty(uint8_t aCslClockUncertainty) { mCslClockUncertainty = aCslClockUncertainty; } + void SetCslUncertainty(uint8_t aCslUncertainty) { mCslUncertainty = aCslUncertainty; } #endif private: @@ -1467,8 +1467,8 @@ private: uint8_t mCost : 4; ///< The cost to this router via neighbor router #endif #if OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE - uint8_t mCslClockAccuracy; ///< Crystal accuracy, in units of ± ppm. - uint8_t mCslClockUncertainty; ///< Scheduling uncertainty, in units of 10 us. + uint8_t mCslClockAccuracy; ///< Crystal accuracy, in units of ± ppm. + uint8_t mCslUncertainty; ///< Scheduling uncertainty, in units of 10 us. #endif }; diff --git a/src/ncp/ncp_base.cpp b/src/ncp/ncp_base.cpp index 401aa7347..0f922a31b 100644 --- a/src/ncp/ncp_base.cpp +++ b/src/ncp/ncp_base.cpp @@ -1557,7 +1557,7 @@ template <> otError NcpBase::HandlePropertyGet(voi #if OPENTHREAD_CONFIG_MAC_CSL_TRANSMITTER_ENABLE template <> otError NcpBase::HandlePropertyGet(void) { - return mEncoder.WriteUint8(otPlatRadioGetCslClockUncertainty(mInstance)); + return mEncoder.WriteUint8(otPlatRadioGetCslUncertainty(mInstance)); } #endif diff --git a/src/posix/platform/radio.cpp b/src/posix/platform/radio.cpp index 4eaaed031..2e2ecdf8d 100644 --- a/src/posix/platform/radio.cpp +++ b/src/posix/platform/radio.cpp @@ -614,7 +614,7 @@ uint8_t otPlatRadioGetCslAccuracy(otInstance *aInstance) #endif #if OPENTHREAD_CONFIG_MAC_CSL_TRANSMITTER_ENABLE -uint8_t otPlatRadioGetCslClockUncertainty(otInstance *aInstance) +uint8_t otPlatRadioGetCslUncertainty(otInstance *aInstance) { OT_UNUSED_VARIABLE(aInstance);