mirror of
https://github.com/espressif/openthread.git
synced 2026-09-02 15:20:07 +00:00
[mle] restrict otDeviceProperties to version 1.3.1 or later (#9157)
This commit restricts the `otDeviceProperties` functionality to OpenThread builds with `OT_THREAD_VERSION` set to `1.3.1` or later. This functionality was added in PR #8670 and is used to calculate and set the local Leader Weight on the device based on its properties, such as power supply configuration and whether or the device is acting as a Border Router, etc.
This commit is contained in:
@@ -36,7 +36,8 @@
|
||||
|
||||
namespace ot {
|
||||
|
||||
#if OPENTHREAD_FTD
|
||||
#if OPENTHREAD_FTD && (OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_3_1)
|
||||
|
||||
void TestDefaultDeviceProperties(void)
|
||||
{
|
||||
Instance *instance;
|
||||
@@ -169,13 +170,13 @@ void TestLeaderWeightCalculation(void)
|
||||
printf("TestLeaderWeightCalculation passed\n");
|
||||
}
|
||||
|
||||
#endif // OPENTHREAD_FTD
|
||||
#endif // #if OPENTHREAD_FTD && (OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_3_1)
|
||||
|
||||
} // namespace ot
|
||||
|
||||
int main(void)
|
||||
{
|
||||
#if OPENTHREAD_FTD
|
||||
#if OPENTHREAD_FTD && (OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_3_1)
|
||||
ot::TestDefaultDeviceProperties();
|
||||
ot::TestLeaderWeightCalculation();
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user