nl:: Weave:: Profiles:: SoftwareUpdate:: ImageQueryResponse
#include <src/lib/profiles/software-update/SoftwareUpdateProfile.h>
支援建立及解碼圖片查詢回應訊息的類別。
摘要
圖片查詢回應訊息格式如下:
長 | 欄位名稱 |
變數 | URI |
變數 | 版本規格 |
變數 | 完整性規格 |
1 位元組 | 更新配置 |
1 位元組 | 更新選項 |
位元 | 意義 |
0.2 | 更新優先順序 |
3..4 | 更新條件 |
5 | 報表狀態。設定後,用戶端會要求產生選用的 DownloadNotification 和 Update Notifications 訊息。 |
5..7 | 已預約 |
建構函式和解構函式 |
|
---|---|
ImageQueryResponse()
ImageQueryResponse 的預設建構函式。
|
公開屬性 |
|
---|---|
integritySpec
|
欄位包含軟體更新映像檔的完整性資訊 (完整性類型和雜湊)。
|
reportStatus
|
bool
要求以「Download 此」和「Update Notifications」訊息,通知伺服器關於軟體更新進度。
|
updateCondition
|
關於繼續執行軟體更新之條件的指示。
|
updatePriority
|
指示裝置何時執行軟體更新。
|
updateScheme
|
uint8_t
用來下載軟體更新映像檔的更新配置。
|
uri
|
長度可變的 UTF-8 字串,內含軟體圖片的位置。
|
versionSpec
|
長度可變的 UTF-8 字串,包含供應商專用的軟體版本識別碼。
|
公用函式 |
|
---|---|
init(ReferencedString &, ReferencedString &, IntegritySpec &, uint8_t, UpdatePriority, UpdateCondition, bool)
|
使用提供的值明確初始化 ImageQueryResponse 物件。
|
operator==(const ImageQueryResponse &) const
|
bool
等號運算子。
|
pack(PacketBuffer *)
|
將 ImageQueryResponse 序列化至提供的 PacketBuffer。
|
print(void)
|
void
|
公開的靜態函式 |
|
---|---|
parse(PacketBuffer *, ImageQueryResponse &)
|
將 PacketBuffer 中提供的圖片查詢回應訊息反序列化至提供的 ImageQueryResponse。
|
公開屬性
reportStatus
bool reportStatus
要求以「Download 此」和「Update Notifications」訊息,通知伺服器關於軟體更新進度。
uri
ReferencedString uri
長度可變的 UTF-8 字串,內含軟體圖片的位置。
這個字串的內容必須符合 RFC 3986 規格。如果是對應至明確定義網際網路通訊協定 (HTTP、HTTPS、SFTP) 的更新配置,URI 配置元素「必須」符合該通訊協定配置的標準網址編碼。字串長度不得超過 65565,且字串也必須符合單一 Weave 訊息的規定,可能會有 MTU 限制。
公用函式
ImageQueryResponse
ImageQueryResponse()
ImageQueryResponse 的預設建構函式。
init() 方法或從訊息取消序列化物件,即可填入 ImageQueryResponse。
init
WEAVE_ERROR init( ReferencedString &, ReferencedString &, IntegritySpec &, uint8_t, UpdatePriority, UpdateCondition, bool )
使用提供的值明確初始化 ImageQueryResponse 物件。
詳細說明 | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
參數 |
|
||||||||||||||
傳回 |
WEAVE_NO_ERROR (無條件限制)。
|
運算子==
bool operator==( const ImageQueryResponse & ) const
等號運算子。
詳細說明 | |||
---|---|---|---|
參數 |
|
||
傳回 |
如果兩個物件中的所有欄位都相同,則傳回 true,否則傳回 false
|
包
WEAVE_ERROR pack( PacketBuffer * )
將 ImageQueryResponse 序列化至提供的 PacketBuffer。
詳細說明 | |||||
---|---|---|---|---|---|
參數 |
|
||||
傳回值 |
|
顯示
void print( void )
公開的靜態函式
parse
WEAVE_ERROR parse( PacketBuffer *, ImageQueryResponse & )
將 PacketBuffer 中提供的圖片查詢回應訊息反序列化至提供的 ImageQueryResponse。
詳細說明 | |||||
---|---|---|---|---|---|
參數 |
|
||||
傳回 |
WEAVE_NO_ERROR 成功後
|
||||
傳回 |
WEAVE_ERROR_BUFFER_TOO_SMALL 如果訊息太小,無法納入 ImageQuery 的所有欄位
|
||||
傳回 |
WEAVE_ERROR_INVALID_INTEGRITY_TYPE 如果提供的完整性類型不是 IntegrityTypes 中指定的值之一
|