Home
last modified time | relevance | path

Searched refs:Clamp (Results 1 – 9 of 9) sorted by relevance

/openthread-latest/tests/unit/
Dtest_serial_number.cpp83 VerifyOrQuit(Clamp<uint8_t>(1, 5, 10) == 5); in TestNumUtils()
84 VerifyOrQuit(Clamp<uint8_t>(5, 5, 10) == 5); in TestNumUtils()
85 VerifyOrQuit(Clamp<uint8_t>(7, 5, 10) == 7); in TestNumUtils()
86 VerifyOrQuit(Clamp<uint8_t>(10, 5, 10) == 10); in TestNumUtils()
87 VerifyOrQuit(Clamp<uint8_t>(12, 5, 10) == 10); in TestNumUtils()
89 VerifyOrQuit(Clamp<uint8_t>(10, 10, 10) == 10); in TestNumUtils()
90 VerifyOrQuit(Clamp<uint8_t>(9, 10, 10) == 10); in TestNumUtils()
91 VerifyOrQuit(Clamp<uint8_t>(11, 10, 10) == 10); in TestNumUtils()
Dtest_mle.cpp95 VerifyOrQuit(Clamp(aFirst.mLeaderWeightAdjustment, kMinAdjustment, kMaxAdjustment) == in CompareDevicePropertiess()
96 Clamp(aSecond.mLeaderWeightAdjustment, kMinAdjustment, kMaxAdjustment)); in CompareDevicePropertiess()
/openthread-latest/src/core/common/
Dnum_utils.hpp83 template <typename Type> Type Clamp(Type aValue, Type aMin, Type aMax) in Clamp() function
147 return static_cast<int8_t>(Clamp(aValue, static_cast<IntType>(NumericLimits<int8_t>::kMin), in ClampToInt8()
/openthread-latest/src/core/thread/
Dmle_types.cpp91 mLeaderWeightAdjustment = Clamp(mLeaderWeightAdjustment, kMinAdjustment, kMaxAdjustment); in ClampWeightAdjustment()
Dlink_metrics.cpp793 value = Clamp(value, kMinRssi, kMaxRssi) - kMinRssi; in ScaleRssiToRawValue()
Dmle_router.cpp508 interval = Clamp(interval, kAdvIntervalMaxLowerBound, kAdvIntervalMaxUpperBound); in DetermineAdvertiseIntervalMax()
/openthread-latest/src/core/backbone_router/
Dbbr_leader.cpp198 config.mMlrTimeout = Clamp(config.mMlrTimeout, kMinMlrTimeout, kMaxMlrTimeout); in UpdateBackboneRouterPrimary()
/openthread-latest/src/core/meshcop/
Djoiner.cpp229 priority = Clamp<int8_t>(aRssi, -127, -1); in CalculatePriority()
/openthread-latest/src/core/net/
Dsrp_server.cpp210 return Clamp(Min(aTtl, aLease), mMinTtl, mMaxTtl); in GrantTtl()
243 return (aLease == 0) ? 0 : Clamp(aLease, mMinLease, mMaxLease); in GrantLease()
250 return (aKeyLease == 0) ? 0 : Clamp(aKeyLease, mMinKeyLease, mMaxKeyLease); in GrantKeyLease()