fuchsia.lowpan.bootstrap

新增:7

PROTOCOLS

執行緒

定義於 fuchsia.lowpan.bootstrap/thread.fidl

此通訊協定可讓元件提供從現有 Thread 實作項目衍生的初始設定資料,確保 Thread 網路和其他執行緒設定的連續性。

ImportSettings

匯入包含 Thread 設定的 JSON 資料檔案,該檔案是由 [ThreadConfigManager](https://fuchsia.googlesource.com/fuchsia/+/refs/heads/master/src/connectivity/openthread/third_party/openthread/platform/thread_config_manager.cc) 建立。JSON 格式如下: { "key1" : [ base64_encoded_string1_1, base64_encoded_string1_2, ... ], "key2" : [ base64_encoded_string2_1, base64_encoded_string2_2, ... ], ... } 其中 key1、key2 等是 uint16_t 值的十進位表示法。 base64_encoded_strings 是從 uint16_t 值向量建立。 這個 JSON 格式等同於 POSIX 中的執行緒設定檔,也就是以二進位檔案形式編碼的資訊: 2 個位元組的 key1、2 個位元組的 value_len1、「value_len1」個位元組的「value1」、 2 個位元組的 key2、2 個位元組的 value_len2、「value_len2」個位元組的「value2」、 2 個位元組的 key1、2 個位元組的 value_len3、「value_len3」個位元組的「value3」、 2 個位元組的 key2、2 個位元組的 value_len4、「value_len4」個位元組的「value4」。 POSIX 二進位檔案只是一連串的位元組,且允許重複的鍵。上方會將此轉換為 JSON 格式,並將值轉換為: base64_encoded_string1_1 = base64_encode(value1[0:value_len1]) base64_encoded_string1_2 = base64_encode(value2[0:value_len2]) base64_encoded_string2_1 = base64_encode(value3[0:value_len3]) base64_encoded_string2_2 = base64_encode(value4[0:value_len4]) 鍵只是以雙引號括住的 uint16_t 鍵的十進位表示法。

保證在成功完成此呼叫後,設定會持續存在。如果匯入設定失敗,系統會關閉管道。

要求

名稱類型
thread_settings_json fuchsia.mem/Buffer

回應

<EMPTY>