mirror of
https://github.com/espressif/openthread.git
synced 2026-06-05 21:14:49 +00:00
[version] introduce OT_THREAD_VERSION_1_4 (#9946)
Update constants and build switch options to reflect the new version number "1.4" (previously "1.3.1"). Keeping the legacy "1.3.1" and OT_THREAD_VERSION_1_3_1 types for backward compatibility with projects that might be using those version names. Note that this commit does not change the default config value of `OPENTHREAD_CONFIG_THREAD_VERSION` which is the default version to use if it is not explicitly specified by build switches or in a project config file.
This commit is contained in:
@@ -278,7 +278,7 @@ if(ot_index EQUAL -1)
|
||||
endif()
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
set(OT_THREAD_VERSION_VALUES "1.1" "1.2" "1.3" "1.3.1")
|
||||
set(OT_THREAD_VERSION_VALUES "1.1" "1.2" "1.3" "1.3.1" "1.4")
|
||||
set(OT_THREAD_VERSION "1.3" CACHE STRING "set Thread version")
|
||||
set_property(CACHE OT_THREAD_VERSION PROPERTY STRINGS "${OT_THREAD_VERSION_VALUES}")
|
||||
list(FIND OT_THREAD_VERSION_VALUES "${OT_THREAD_VERSION}" ot_index)
|
||||
@@ -286,7 +286,7 @@ if(ot_index EQUAL -1)
|
||||
message(STATUS "OT_THREAD_VERSION=\"${OT_THREAD_VERSION}\"")
|
||||
message(FATAL_ERROR "Invalid value for OT_THREAD_VERSION - valid values are: " "${OT_THREAD_VERSION_VALUES}")
|
||||
endif()
|
||||
set(OT_VERSION_SUFFIX_LIST "1_1" "1_2" "1_3" "1_3_1")
|
||||
set(OT_VERSION_SUFFIX_LIST "1_1" "1_2" "1_3" "1_3_1" "1_4")
|
||||
list(GET OT_VERSION_SUFFIX_LIST ${ot_index} OT_VERSION_SUFFIX)
|
||||
target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_THREAD_VERSION=OT_THREAD_VERSION_${OT_VERSION_SUFFIX}")
|
||||
message(STATUS "OT_THREAD_VERSION=\"${OT_THREAD_VERSION}\" -> OPENTHREAD_CONFIG_THREAD_VERSION=OT_THREAD_VERSION_${OT_VERSION_SUFFIX}")
|
||||
|
||||
@@ -41,6 +41,8 @@ if (openthread_enable_core_config_args) {
|
||||
defines += [ "OPENTHREAD_CONFIG_THREAD_VERSION=OT_THREAD_VERSION_1_3" ]
|
||||
} else if (openthread_config_thread_version == "1.3.1") {
|
||||
defines += [ "OPENTHREAD_CONFIG_THREAD_VERSION=OT_THREAD_VERSION_1_3_1" ]
|
||||
} else if (openthread_config_thread_version == "1.4") {
|
||||
defines += [ "OPENTHREAD_CONFIG_THREAD_VERSION=OT_THREAD_VERSION_1_4" ]
|
||||
} else if (openthread_config_thread_version != "") {
|
||||
assert(false,
|
||||
"Unrecognized Thread version: ${openthread_config_thread_version}")
|
||||
|
||||
@@ -82,8 +82,7 @@
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_BORDER_AGENT_EPHEMERAL_KEY_ENABLE
|
||||
#define OPENTHREAD_CONFIG_BORDER_AGENT_EPHEMERAL_KEY_ENABLE \
|
||||
(OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_3_1)
|
||||
#define OPENTHREAD_CONFIG_BORDER_AGENT_EPHEMERAL_KEY_ENABLE (OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_4)
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
||||
@@ -104,12 +104,12 @@
|
||||
* Define as 1 to enable feature to set device properties which are used for calculating the local leader weight on a
|
||||
* device.
|
||||
*
|
||||
* It is enabled by default on Thread Version 1.3.1 or later.
|
||||
* It is enabled by default on Thread Version 1.4 or later.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_MLE_DEVICE_PROPERTY_LEADER_WEIGHT_ENABLE
|
||||
#define OPENTHREAD_CONFIG_MLE_DEVICE_PROPERTY_LEADER_WEIGHT_ENABLE \
|
||||
(OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_3_1)
|
||||
(OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_4)
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
||||
@@ -41,7 +41,9 @@
|
||||
#define OT_THREAD_VERSION_1_1 2
|
||||
#define OT_THREAD_VERSION_1_2 3
|
||||
#define OT_THREAD_VERSION_1_3 4
|
||||
// Support projects on legacy "1.3.1" version, which is now "1.4"
|
||||
#define OT_THREAD_VERSION_1_3_1 5
|
||||
#define OT_THREAD_VERSION_1_4 5
|
||||
|
||||
#define OPENTHREAD_CORE_CONFIG_H_IN
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ public:
|
||||
* containing the CSL IE was transmitted until the next channel sample,
|
||||
* see IEEE 802.15.4-2015, section 6.12.2.
|
||||
*
|
||||
* The Thread standard further defines the CSL phase (see Thread 1.3.1,
|
||||
* The Thread standard further defines the CSL phase (see Thread 1.4,
|
||||
* section 3.2.6.3.4, also conforming to IEEE 802.15.4-2020, section
|
||||
* 6.12.2.1):
|
||||
* * The "first symbol" from the definition SHALL be interpreted as the
|
||||
|
||||
@@ -42,10 +42,12 @@ namespace ot {
|
||||
|
||||
constexpr uint16_t kThreadVersion = OPENTHREAD_CONFIG_THREAD_VERSION; ///< Thread Version of this device.
|
||||
|
||||
constexpr uint16_t kThreadVersion1p1 = OT_THREAD_VERSION_1_1; ///< Thread Version 1.1
|
||||
constexpr uint16_t kThreadVersion1p2 = OT_THREAD_VERSION_1_2; ///< Thread Version 1.2
|
||||
constexpr uint16_t kThreadVersion1p3 = OT_THREAD_VERSION_1_3; ///< Thread Version 1.3
|
||||
constexpr uint16_t kThreadVersion1p1 = OT_THREAD_VERSION_1_1; ///< Thread Version 1.1
|
||||
constexpr uint16_t kThreadVersion1p2 = OT_THREAD_VERSION_1_2; ///< Thread Version 1.2
|
||||
constexpr uint16_t kThreadVersion1p3 = OT_THREAD_VERSION_1_3; ///< Thread Version 1.3
|
||||
// Support projects on legacy "1.3.1" version, which is now "1.4"
|
||||
constexpr uint16_t kThreadVersion1p3p1 = OT_THREAD_VERSION_1_3_1; ///< Thread Version 1.3.1
|
||||
constexpr uint16_t kThreadVersion1p4 = OT_THREAD_VERSION_1_4; ///< Thread Version 1.4
|
||||
|
||||
} // namespace ot
|
||||
|
||||
|
||||
+14
-14
@@ -113,7 +113,7 @@ case ${build_config} in
|
||||
echo "==================================================================================================="
|
||||
cd "${top_builddir}" || die "cd failed"
|
||||
cmake -GNinja -DOT_PLATFORM=simulation -DOT_COMPILE_WARNING_AS_ERROR=ON -DOT_COVERAGE=${ot_coverage} \
|
||||
-DOT_THREAD_VERSION=1.3.1 -DOT_APP_CLI=OFF -DOT_APP_NCP=ON -DOT_APP_RCP=OFF \
|
||||
-DOT_THREAD_VERSION=1.4 -DOT_APP_CLI=OFF -DOT_APP_NCP=ON -DOT_APP_RCP=OFF \
|
||||
-DOT_OPERATIONAL_DATASET_AUTO_INIT=ON -DOT_PLATFORM_KEY_REF=${ot_plat_key_ref} \
|
||||
-DOT_BORDER_ROUTING=OFF \
|
||||
-DOT_PROJECT_CONFIG=../tests/toranj/openthread-core-toranj-config-simulation.h \
|
||||
@@ -127,7 +127,7 @@ case ${build_config} in
|
||||
echo "==================================================================================================="
|
||||
cd "${top_builddir}" || die "cd failed"
|
||||
cmake -GNinja -DOT_PLATFORM=simulation -DOT_COMPILE_WARNING_AS_ERROR=ON -DOT_COVERAGE=${ot_coverage} \
|
||||
-DOT_THREAD_VERSION=1.3.1 -DOT_APP_CLI=OFF -DOT_APP_NCP=ON -DOT_APP_RCP=OFF \
|
||||
-DOT_THREAD_VERSION=1.4 -DOT_APP_CLI=OFF -DOT_APP_NCP=ON -DOT_APP_RCP=OFF \
|
||||
-DOT_15_4=ON -DOT_TREL=OFF -DOT_OPERATIONAL_DATASET_AUTO_INIT=ON \
|
||||
-DOT_BORDER_ROUTING=OFF \
|
||||
-DOT_PLATFORM_KEY_REF=${ot_plat_key_ref} \
|
||||
@@ -143,7 +143,7 @@ case ${build_config} in
|
||||
echo "==================================================================================================="
|
||||
cd "${top_builddir}" || die "cd failed"
|
||||
cmake -GNinja -DOT_PLATFORM=simulation -DOT_COMPILE_WARNING_AS_ERROR=ON -DOT_COVERAGE=${ot_coverage} \
|
||||
-DOT_THREAD_VERSION=1.3.1 -DOT_APP_CLI=OFF -DOT_APP_NCP=ON -DOT_APP_RCP=OFF \
|
||||
-DOT_THREAD_VERSION=1.4 -DOT_APP_CLI=OFF -DOT_APP_NCP=ON -DOT_APP_RCP=OFF \
|
||||
-DOT_15_4=OFF -DOT_TREL=ON -DOT_OPERATIONAL_DATASET_AUTO_INIT=ON \
|
||||
-DOT_BORDER_ROUTING=OFF \
|
||||
-DOT_PLATFORM_KEY_REF=${ot_plat_key_ref} \
|
||||
@@ -159,7 +159,7 @@ case ${build_config} in
|
||||
echo "==================================================================================================="
|
||||
cd "${top_builddir}" || die "cd failed"
|
||||
cmake -GNinja -DOT_PLATFORM=simulation -DOT_COMPILE_WARNING_AS_ERROR=ON -DOT_COVERAGE=${ot_coverage} \
|
||||
-DOT_THREAD_VERSION=1.3.1 -DOT_APP_CLI=OFF -DOT_APP_NCP=ON -DOT_APP_RCP=OFF \
|
||||
-DOT_THREAD_VERSION=1.4 -DOT_APP_CLI=OFF -DOT_APP_NCP=ON -DOT_APP_RCP=OFF \
|
||||
-DOT_15_4=ON -DOT_TREL=ON -DOT_OPERATIONAL_DATASET_AUTO_INIT=ON \
|
||||
-DOT_BORDER_ROUTING=OFF \
|
||||
-DOT_PLATFORM_KEY_REF=${ot_plat_key_ref} \
|
||||
@@ -175,7 +175,7 @@ case ${build_config} in
|
||||
echo "==================================================================================================="
|
||||
cd "${top_builddir}" || die "cd failed"
|
||||
cmake -GNinja -DOT_PLATFORM=simulation -DOT_COMPILE_WARNING_AS_ERROR=ON -DOT_COVERAGE=${ot_coverage} \
|
||||
-DOT_THREAD_VERSION=1.3.1 -DOT_APP_CLI=ON -DOT_APP_NCP=OFF -DOT_APP_RCP=OFF \
|
||||
-DOT_THREAD_VERSION=1.4 -DOT_APP_CLI=ON -DOT_APP_NCP=OFF -DOT_APP_RCP=OFF \
|
||||
-DOT_PLATFORM_KEY_REF=${ot_plat_key_ref} \
|
||||
-DOT_PROJECT_CONFIG=../tests/toranj/openthread-core-toranj-config-simulation.h \
|
||||
"${top_srcdir}" || die
|
||||
@@ -188,7 +188,7 @@ case ${build_config} in
|
||||
echo "==================================================================================================="
|
||||
cd "${top_builddir}" || die "cd failed"
|
||||
cmake -GNinja -DOT_PLATFORM=simulation -DOT_COMPILE_WARNING_AS_ERROR=ON -DOT_COVERAGE=${ot_coverage} \
|
||||
-DOT_THREAD_VERSION=1.3.1 -DOT_APP_CLI=ON -DOT_APP_NCP=OFF -DOT_APP_RCP=OFF \
|
||||
-DOT_THREAD_VERSION=1.4 -DOT_APP_CLI=ON -DOT_APP_NCP=OFF -DOT_APP_RCP=OFF \
|
||||
-DOT_15_4=ON -DOT_TREL=OFF \
|
||||
-DOT_PLATFORM_KEY_REF=${ot_plat_key_ref} \
|
||||
-DOT_PROJECT_CONFIG=../tests/toranj/openthread-core-toranj-config-simulation.h \
|
||||
@@ -203,7 +203,7 @@ case ${build_config} in
|
||||
echo "==================================================================================================="
|
||||
cd "${top_builddir}" || die "cd failed"
|
||||
cmake -GNinja -DOT_PLATFORM=simulation -DOT_COMPILE_WARNING_AS_ERROR=ON -DOT_COVERAGE=${ot_coverage} \
|
||||
-DOT_THREAD_VERSION=1.3.1 -DOT_APP_CLI=ON -DOT_APP_NCP=OFF -DOT_APP_RCP=OFF \
|
||||
-DOT_THREAD_VERSION=1.4 -DOT_APP_CLI=ON -DOT_APP_NCP=OFF -DOT_APP_RCP=OFF \
|
||||
-DOT_15_4=OFF -DOT_TREL=ON \
|
||||
-DOT_PLATFORM_KEY_REF=${ot_plat_key_ref} \
|
||||
-DOT_PROJECT_CONFIG=../tests/toranj/openthread-core-toranj-config-simulation.h \
|
||||
@@ -218,7 +218,7 @@ case ${build_config} in
|
||||
echo "==================================================================================================="
|
||||
cd "${top_builddir}" || die "cd failed"
|
||||
cmake -GNinja -DOT_PLATFORM=simulation -DOT_COMPILE_WARNING_AS_ERROR=ON -DOT_COVERAGE=${ot_coverage} \
|
||||
-DOT_THREAD_VERSION=1.3.1 -DOT_APP_CLI=ON -DOT_APP_NCP=OFF -DOT_APP_RCP=OFF \
|
||||
-DOT_THREAD_VERSION=1.4 -DOT_APP_CLI=ON -DOT_APP_NCP=OFF -DOT_APP_RCP=OFF \
|
||||
-DOT_15_4=ON -DOT_TREL=ON \
|
||||
-DOT_PLATFORM_KEY_REF=${ot_plat_key_ref} \
|
||||
-DOT_PROJECT_CONFIG=../tests/toranj/openthread-core-toranj-config-simulation.h \
|
||||
@@ -233,7 +233,7 @@ case ${build_config} in
|
||||
echo "===================================================================================================="
|
||||
cd "${top_builddir}" || die "cd failed"
|
||||
cmake -GNinja -DOT_PLATFORM=simulation -DOT_COMPILE_WARNING_AS_ERROR=ON -DOT_COVERAGE=${ot_coverage} \
|
||||
-DOT_THREAD_VERSION=1.3.1 -DOT_APP_CLI=OFF -DOT_APP_NCP=OFF -DOT_APP_RCP=ON \
|
||||
-DOT_THREAD_VERSION=1.4 -DOT_APP_CLI=OFF -DOT_APP_NCP=OFF -DOT_APP_RCP=ON \
|
||||
-DOT_PLATFORM_KEY_REF=${ot_plat_key_ref} \
|
||||
-DOT_PROJECT_CONFIG=../tests/toranj/openthread-core-toranj-config-simulation.h \
|
||||
"${top_srcdir}" || die
|
||||
@@ -246,7 +246,7 @@ case ${build_config} in
|
||||
echo "===================================================================================================="
|
||||
cd "${top_builddir}" || die "cd failed"
|
||||
cmake -GNinja -DOT_PLATFORM=posix -DOT_COMPILE_WARNING_AS_ERROR=ON -DOT_COVERAGE=${ot_coverage} \
|
||||
-DOT_THREAD_VERSION=1.3.1 -DOT_APP_CLI=ON -DOT_APP_NCP=ON -DOT_APP_RCP=OFF \
|
||||
-DOT_THREAD_VERSION=1.4 -DOT_APP_CLI=ON -DOT_APP_NCP=ON -DOT_APP_RCP=OFF \
|
||||
-DOT_PLATFORM_KEY_REF=${ot_plat_key_ref} \
|
||||
-DOT_PROJECT_CONFIG=../tests/toranj/openthread-core-toranj-config-posix.h \
|
||||
"${top_srcdir}" || die
|
||||
@@ -259,7 +259,7 @@ case ${build_config} in
|
||||
echo "===================================================================================================="
|
||||
cd "${top_builddir}" || die "cd failed"
|
||||
cmake -GNinja -DOT_PLATFORM=posix -DOT_COMPILE_WARNING_AS_ERROR=ON -DOT_COVERAGE=${ot_coverage} \
|
||||
-DOT_THREAD_VERSION=1.3.1 -DOT_APP_CLI=ON -DOT_APP_NCP=ON -DOT_APP_RCP=OFF \
|
||||
-DOT_THREAD_VERSION=1.4 -DOT_APP_CLI=ON -DOT_APP_NCP=ON -DOT_APP_RCP=OFF \
|
||||
-DOT_15_4=ON -DOT_TREL=OFF \
|
||||
-DOT_PLATFORM_KEY_REF=${ot_plat_key_ref} \
|
||||
-DOT_PROJECT_CONFIG=../tests/toranj/openthread-core-toranj-config-posix.h \
|
||||
@@ -273,7 +273,7 @@ case ${build_config} in
|
||||
echo "===================================================================================================="
|
||||
cd "${top_builddir}" || die "cd failed"
|
||||
cmake -GNinja -DOT_PLATFORM=posix -DOT_COMPILE_WARNING_AS_ERROR=ON -DOT_COVERAGE=${ot_coverage} \
|
||||
-DOT_THREAD_VERSION=1.3.1 -DOT_APP_CLI=ON -DOT_APP_NCP=ON -DOT_APP_RCP=OFF \
|
||||
-DOT_THREAD_VERSION=1.4 -DOT_APP_CLI=ON -DOT_APP_NCP=ON -DOT_APP_RCP=OFF \
|
||||
-DOT_15_4=OFF -DOT_TREL=ON \
|
||||
-DOT_PLATFORM_KEY_REF=${ot_plat_key_ref} \
|
||||
-DOT_PROJECT_CONFIG=../tests/toranj/openthread-core-toranj-config-posix.h \
|
||||
@@ -287,7 +287,7 @@ case ${build_config} in
|
||||
echo "===================================================================================================="
|
||||
cd "${top_builddir}" || die "cd failed"
|
||||
cmake -GNinja -DOT_PLATFORM=posix -DOT_COMPILE_WARNING_AS_ERROR=ON -DOT_COVERAGE=${ot_coverage} \
|
||||
-DOT_THREAD_VERSION=1.3.1 -DOT_APP_CLI=ON -DOT_APP_NCP=ON -DOT_APP_RCP=OFF \
|
||||
-DOT_THREAD_VERSION=1.4 -DOT_APP_CLI=ON -DOT_APP_NCP=ON -DOT_APP_RCP=OFF \
|
||||
-DOT_15_4=ON -DOT_TREL=ON \
|
||||
-DOT_PLATFORM_KEY_REF=${ot_plat_key_ref} \
|
||||
-DOT_PROJECT_CONFIG=../tests/toranj/openthread-core-toranj-config-posix.h \
|
||||
@@ -301,7 +301,7 @@ case ${build_config} in
|
||||
echo "===================================================================================================="
|
||||
cd "${top_builddir}" || die "cd failed"
|
||||
cmake -GNinja -DOT_PLATFORM=simulation -DOT_COMPILE_WARNING_AS_ERROR=ON -DOT_COVERAGE=${ot_coverage} \
|
||||
-DOT_THREAD_VERSION=1.3.1 -DOT_APP_CLI=ON -DOT_APP_NCP=ON -DOT_APP_RCP=ON \
|
||||
-DOT_THREAD_VERSION=1.4 -DOT_APP_CLI=ON -DOT_APP_NCP=ON -DOT_APP_RCP=ON \
|
||||
-DOT_PLATFORM_KEY_REF=${ot_plat_key_ref} \
|
||||
-DOT_PROJECT_CONFIG=../tests/toranj/openthread-core-toranj-config-simulation.h \
|
||||
"${top_srcdir}" || die
|
||||
|
||||
@@ -76,12 +76,12 @@ VENDOR_APP_URL = 35
|
||||
|
||||
r1.set_vendor_name('nest')
|
||||
r1.set_vendor_model('marble')
|
||||
r1.set_vendor_sw_version('ot-1.3.1')
|
||||
r1.set_vendor_sw_version('ot-1.4')
|
||||
r1.set_vendor_app_url('https://example.com/vendor-app')
|
||||
|
||||
verify(r1.get_vendor_name() == 'nest')
|
||||
verify(r1.get_vendor_model() == 'marble')
|
||||
verify(r1.get_vendor_sw_version() == 'ot-1.3.1')
|
||||
verify(r1.get_vendor_sw_version() == 'ot-1.4')
|
||||
verify(r1.get_vendor_app_url() == 'https://example.com/vendor-app')
|
||||
|
||||
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
Reference in New Issue
Block a user