Searched refs:Clamp (Results 1 – 9 of 9) sorted by relevance
/openthread-latest/tests/unit/ |
D | test_serial_number.cpp | 83 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()
|
D | test_mle.cpp | 95 VerifyOrQuit(Clamp(aFirst.mLeaderWeightAdjustment, kMinAdjustment, kMaxAdjustment) == in CompareDevicePropertiess() 96 Clamp(aSecond.mLeaderWeightAdjustment, kMinAdjustment, kMaxAdjustment)); in CompareDevicePropertiess()
|
/openthread-latest/src/core/common/ |
D | num_utils.hpp | 83 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/ |
D | mle_types.cpp | 91 mLeaderWeightAdjustment = Clamp(mLeaderWeightAdjustment, kMinAdjustment, kMaxAdjustment); in ClampWeightAdjustment()
|
D | link_metrics.cpp | 793 value = Clamp(value, kMinRssi, kMaxRssi) - kMinRssi; in ScaleRssiToRawValue()
|
D | mle_router.cpp | 508 interval = Clamp(interval, kAdvIntervalMaxLowerBound, kAdvIntervalMaxUpperBound); in DetermineAdvertiseIntervalMax()
|
/openthread-latest/src/core/backbone_router/ |
D | bbr_leader.cpp | 198 config.mMlrTimeout = Clamp(config.mMlrTimeout, kMinMlrTimeout, kMaxMlrTimeout); in UpdateBackboneRouterPrimary()
|
/openthread-latest/src/core/meshcop/ |
D | joiner.cpp | 229 priority = Clamp<int8_t>(aRssi, -127, -1); in CalculatePriority()
|
/openthread-latest/src/core/net/ |
D | srp_server.cpp | 210 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()
|