[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:
Abtin Keshavarzian
2023-06-09 12:51:16 -07:00
committed by GitHub
parent b2116446bc
commit cc851aacda
9 changed files with 31 additions and 10 deletions
+4 -3
View File
@@ -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