[settings] reserve settings keys for vendor use (#7532)

This commit is contained in:
jinran-google
2022-03-29 00:10:27 -07:00
committed by GitHub
parent 2b2534cc76
commit 7e4ada6f16
3 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -53,7 +53,7 @@ extern "C" {
* @note This number versions both OpenThread platform and user APIs.
*
*/
#define OPENTHREAD_API_VERSION (199)
#define OPENTHREAD_API_VERSION (200)
/**
* @addtogroup api-instance
+4
View File
@@ -75,6 +75,10 @@ enum
OT_SETTINGS_KEY_SRP_SERVER_INFO = 0x000d, ///< The SRP server info (UDP port).
OT_SETTINGS_KEY_LEGACY_NAT64_PREFIX = 0x000e, ///< Reserved. Legacy NAT64 prefix.
OT_SETTINGS_KEY_BR_ULA_PREFIX = 0x000f, ///< BR ULA prefix.
// Keys in range 0x8000-0xffff are reserved for vendor-specific use.
OT_SETTINGS_KEY_VENDOR_RESERVED_MIN = 0x8000,
OT_SETTINGS_KEY_VENDOR_RESERVED_MAX = 0xffff,
};
/**
+2
View File
@@ -128,6 +128,8 @@ public:
};
static constexpr Key kLastKey = kKeyBrUlaPrefix; ///< The last (numerically) enumerator value in `Key`.
static_assert(static_cast<uint16_t>(kLastKey) < static_cast<uint16_t>(OT_SETTINGS_KEY_VENDOR_RESERVED_MIN),
"Core settings keys overlap with vendor reserved keys");
/**
* This structure represents the device's own network information for settings storage.