nl::
  #include <src/lib/profiles/software-update/SoftwareUpdateProfile.h>
  保有完整性類型和軟體更新圖片實際雜湊的輔助類別。
摘要
這個物件會保留 IntegrityTypes 欄位,用於指定雜湊類型以及軟體更新圖片的實際雜湊。雜湊長度視雜湊類型而定。物件會調整大小,以容納最大的雜湊值。
| 建構函式和解構函式 | |
|---|---|
| IntegritySpec()IntegritySpec 的預設建構函式。 | 
| 公開屬性 | |
|---|---|
| type | uint8_t雜湊類型,要從 IntegrityTypes 擷取的值。 | 
| value[64] | uint8_t長度不定的位元組序列,內含 URI 欄位所識別軟體圖片的完整性值。 | 
| 公開函式 | |
|---|---|
| init(uint8_t, uint8_t *) | 使用提供的值明確初始化 IntegritySpec 物件。 | 
| operator==(const IntegritySpec &) const  | bool等號運算子。 | 
| pack(MessageIterator &) | 將 IntegritySpec 序列化到提供的 MessageIterator。 | 
| 公開的靜態函式 | |
|---|---|
| parse(MessageIterator &, IntegritySpec &) | 將物件從提供的 MessageIterator 反序列化到提供的 IntegritySpec。 | 
公開屬性
值
uint8_t value[64]
長度不定的位元組序列,內含 URI 欄位所識別軟體圖片的完整性值。
計算完整性值時,系統會對透過上述 URI 存取的軟體更新映像檔的內容套用完整性類型指定的完整性函式。完整性規格可讓用戶端確認下載的圖片與此回應中指定的圖片相符。
公開函式
init
WEAVE_ERROR init( uint8_t, uint8_t * )
使用提供的值明確初始化 IntegritySpec 物件。
| 詳細資料 | |||||
|---|---|---|---|---|---|
| 參數 | 
 | ||||
| 傳回 | WEAVE_NO_ERROR 成功時 | ||||
| 傳回 | WEAVE_ERROR_INVALID_INTEGRITY_TYPE 如果提供的完整性類型並非 IntegrityTypes 中指定的值 | ||||
運算子==
bool operator==( const IntegritySpec & ) const
包
WEAVE_ERROR pack( MessageIterator & )
將 IntegritySpec 序列化到提供的 MessageIterator。
| 詳細資料 | |||||
|---|---|---|---|---|---|
| 參數 | 
 | ||||
| 傳回值 | 
 | ||||
公開的靜態函式
parse
WEAVE_ERROR parse( MessageIterator &, IntegritySpec & )
將物件從提供的 MessageIterator 反序列化到提供的 IntegritySpec。
| 詳細資料 | |||||
|---|---|---|---|---|---|
| 參數 | 
 | ||||
| 傳回值 | 
 | ||||
| 傳回值 | 
 | ||||
| 傳回 | WEAVE_ERROR_INVALID_INTEGRITY_TYPE 如果提供的完整性類型並非 IntegrityTypes 中指定的值 | ||||