mirror of
https://github.com/espressif/openthread.git
synced 2026-10-29 18:54:06 +00:00
[mle] add OPENTHREAD_CONFIG_MLE_DEVICE_PROPERTY_LEADER_WEIGHT_ENABLE (#9387)
This commit adds a build configuration flag for the feature to set and get device properties, which are then used to calculate the local leader weight on a device. The feature is enabled by default on Thread 1.3.1 or later. The new configuration flag allows OpenThread project integrators to enable this feature on earlier versions if desired.
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
|
||||
namespace ot {
|
||||
|
||||
#if OPENTHREAD_FTD && (OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_3_1)
|
||||
#if OPENTHREAD_FTD && OPENTHREAD_CONFIG_MLE_DEVICE_PROPERTY_LEADER_WEIGHT_ENABLE
|
||||
|
||||
void TestDefaultDeviceProperties(void)
|
||||
{
|
||||
@@ -170,13 +170,13 @@ void TestLeaderWeightCalculation(void)
|
||||
printf("TestLeaderWeightCalculation passed\n");
|
||||
}
|
||||
|
||||
#endif // #if OPENTHREAD_FTD && (OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_3_1)
|
||||
#endif // #if OPENTHREAD_FTD && OPENTHREAD_CONFIG_MLE_DEVICE_PROPERTY_LEADER_WEIGHT_ENABLE
|
||||
|
||||
} // namespace ot
|
||||
|
||||
int main(void)
|
||||
{
|
||||
#if OPENTHREAD_FTD && (OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_3_1)
|
||||
#if OPENTHREAD_FTD && OPENTHREAD_CONFIG_MLE_DEVICE_PROPERTY_LEADER_WEIGHT_ENABLE
|
||||
ot::TestDefaultDeviceProperties();
|
||||
ot::TestLeaderWeightCalculation();
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user