nl:: Weave:: Profiles:: DeviceDescription:: WeaveDeviceDescriptor
#include <src/lib/profiles/device-description/DeviceDescription.h>
內含有關 Weave 裝置的描述性資訊。
總結
建構函式和解構程式 |
|
---|---|
WeaveDeviceDescriptor(void)
|
公開類型 |
|
---|---|
@180{
|
列舉 定義部分屬性的長度上限。 |
@181{
|
列舉 可指出特定裝置功能的功能旗標。 |
@182{
|
列舉 標記欄位定義。 |
公開屬性 |
|
---|---|
Day
|
uint8_t
裝置製造日 (0 = 不存在)
|
DeviceFeatures
|
uint32_t
用來指出特定裝置功能的 Bit 欄位。
|
DeviceId
|
uint64_t
裝置 ID (0 = 不存在)
|
FabricId
|
uint64_t
裝置所屬的編織布料 ID (0 = 不存在)
|
Flags
|
uint8_t
包含裝置的額外資訊的位元欄位。
|
ManufacturingDate
|
struct nl::Weave::Profiles::DeviceDescription::WeaveDeviceDescriptor::@183
|
Month
|
uint8_t
裝置製造月份 (1 = 1 月)
|
PairingCode[kMaxPairingCodeLength+1]
|
char
裝置配對碼 (NUL 終止,0 個長度 = 不存在)
|
PairingCompatibilityVersionMajor
|
uint16_t
主要裝置配對軟體相容性版本。
|
PairingCompatibilityVersionMinor
|
uint16_t
小型裝置配對軟體相容性版本。
|
Primary802154MACAddress[8]
|
uint8_t
主 802.15.4 接口的 MAC 地址(大端序,所有零 = 不存在)
|
PrimaryWiFiMACAddress[6]
|
uint8_t
主要 WiFi 介面的 MAC 位址 (大端序,全零 = 不存在)
|
ProductId
|
uint16_t
裝置產品代碼 (0 = 不存在)
|
ProductRevision
|
uint16_t
裝置產品修訂版本 (0 = 不存在)
|
RendezvousWiFiESSID[kMaxRendezvousWiFiESSID+1]
|
char
裝置 Wi-Fi 可連線網路的 ESSID (NUL 已終止,0 長度 = 不存在)
|
SerialNumber[kMaxSerialNumberLength+1]
|
char
裝置序號 (NUL 終止,0 長度 = 不存在)
|
SoftwareVersion[kMaxSoftwareVersionLength+1]
|
char
有效軟體版本 (NUL 終止,0 長度 = 不存在)
|
VendorId
|
uint16_t
裝置供應商代碼 (0 = 不存在)
|
Year
|
uint16_t
裝置年份 (有效範圍:2001 至 2099 年)
|
公開函式 |
|
---|---|
Clear(void)
|
void
清除裝置說明。
|
公開的靜態函式 |
|
---|---|
Decode(const uint8_t *data, uint32_t dataLen, WeaveDeviceDescriptor & outDesc)
|
將所提供的資料緩衝區內容解碼為 Weave 裝置描述元物件。
|
DecodeTLV(const uint8_t *data, uint32_t dataLen, WeaveDeviceDescriptor & outDesc)
|
將提供的 TLV 資料緩衝區內容解碼為 Weave 裝置描述元物件。
|
DecodeTLV(nl::Weave::TLV::TLVReader & reader, WeaveDeviceDescriptor & outDesc)
|
使用提供的預先初始化 TLVreader 來解碼裝置說明。
|
DecodeText(const char *data, uint32_t dataLen, WeaveDeviceDescriptor & outDesc)
|
將所提供的文字資料緩衝區內容解碼為 Weave 裝置描述元物件。
|
EncodeTLV(const WeaveDeviceDescriptor & desc, uint8_t *buf, uint32_t bufLen, uint32_t & outEncodedLen)
|
將提供的裝置描述元編碼為寫入提供的緩衝區中的 Weave TLV。
|
EncodeTLV(const WeaveDeviceDescriptor & desc, nl::Weave::TLV::TLVWriter & writer)
|
使用所提供的預先初始化 TLVWriter 物件,將提供的裝置描述元編碼為 Weave TLV。
|
EncodeText(const WeaveDeviceDescriptor & desc, char *buf, uint32_t bufLen, uint32_t & outEncodedLen)
|
將提供的裝置描述元編碼為寫入所提供緩衝區的文字。
|
IsZeroBytes(const uint8_t *buf, uint32_t len)
|
bool
檢查指定的緩衝區是否只包含零。
|
公開類型
@180
@180
定義部分屬性的長度上限。
屬性 | |
---|---|
kMaxPairingCodeLength
|
配對碼長度上限。 |
kMaxRendezvousWiFiESSID
|
Rendezvous 長度的 WiFi ESSID 上限。 |
kMaxSerialNumberLength
|
序號的長度上限。 |
kMaxSoftwareVersionLength
|
軟體版本長度上限。 |
@181
@181
可指出特定裝置功能的功能旗標。
屬性 | |
---|---|
kFeature_HomeAlarmLinkCapable
|
表示支援 Nest 警報器面板的 Nest Protect。 |
kFeature_LinePowered
|
表示需要接上電源線的裝置。 |
@182
@182
標記欄位定義。
屬性 | |
---|---|
kFlag_IsRendezvousWiFiESSIDSuffix
|
表示 RendezvousWiFiESSID 值是後置字串,出現在裝置的 WiFi 網路的 ESSID 結尾。 |
公開屬性
天數
uint8_t Day
裝置製造日 (0 = 不存在)
裝置功能
uint32_t DeviceFeatures
用來指出特定裝置功能的 Bit 欄位。
裝置 ID
uint64_t DeviceId
裝置 ID (0 = 不存在)
Fabric 編號
uint64_t FabricId
裝置所屬的編織布料 ID (0 = 不存在)
旗標
uint8_t Flags
包含裝置的額外資訊的位元欄位。
製造日期
struct nl::Weave::Profiles::DeviceDescription::WeaveDeviceDescriptor::@183 ManufacturingDate
月份
uint8_t Month
裝置製造月份 (1 = 1 月)
配對代碼
char PairingCode[kMaxPairingCodeLength+1]
裝置配對碼 (NUL 終止,0 個長度 = 不存在)
配對相容性版本主要
uint16_t PairingCompatibilityVersionMajor
主要裝置配對軟體相容性版本。
配對相容性版本次要
uint16_t PairingCompatibilityVersionMinor
小型裝置配對軟體相容性版本。
主要 802154MAC 位址
uint8_t Primary802154MACAddress[8]
主 802.15.4 接口的 MAC 地址(大端序,所有零 = 不存在)
主要 WiFiMAC 位址
uint8_t PrimaryWiFiMACAddress[6]
主要 WiFi 介面的 MAC 位址 (大端序,全零 = 不存在)
ProductId
uint16_t ProductId
裝置產品代碼 (0 = 不存在)
產品修訂版本
uint16_t ProductRevision
裝置產品修訂版本 (0 = 不存在)
倫多夫
char RendezvousWiFiESSID[kMaxRendezvousWiFiESSID+1]
裝置 Wi-Fi 可連線網路的 ESSID (NUL 已終止,0 長度 = 不存在)
序號
char SerialNumber[kMaxSerialNumberLength+1]
裝置序號 (NUL 終止,0 長度 = 不存在)
軟體版本
char SoftwareVersion[kMaxSoftwareVersionLength+1]
有效軟體版本 (NUL 終止,0 長度 = 不存在)
供應商 ID
uint16_t VendorId
裝置供應商代碼 (0 = 不存在)
年
uint16_t Year
裝置年份 (有效範圍:2001 至 2099 年)
公開函式
清除
void Clear( void )
清除裝置說明。
網路裝置描述元
WeaveDeviceDescriptor( void )
公開的靜態函式
解碼
WEAVE_ERROR Decode( const uint8_t *data, uint32_t dataLen, WeaveDeviceDescriptor & outDesc )
解碼代碼
WEAVE_ERROR DecodeTLV( const uint8_t *data, uint32_t dataLen, WeaveDeviceDescriptor & outDesc )
將提供的 TLV 資料緩衝區內容解碼為 Weave 裝置描述元物件。
詳細資料 | |||||||||
---|---|---|---|---|---|---|---|---|---|
參數 |
|
||||||||
傳回值 |
|
解碼代碼
WEAVE_ERROR DecodeTLV( nl::Weave::TLV::TLVReader & reader, WeaveDeviceDescriptor & outDesc )
解碼文字
WEAVE_ERROR DecodeText( const char *data, uint32_t dataLen, WeaveDeviceDescriptor & outDesc )
將所提供的文字資料緩衝區內容解碼為 Weave 裝置描述元物件。
詳細資料 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
參數 |
|
||||||||||
傳回值 |
|
編碼 LLV
WEAVE_ERROR EncodeTLV( const WeaveDeviceDescriptor & desc, uint8_t *buf, uint32_t bufLen, uint32_t & outEncodedLen )
編碼 LLV
WEAVE_ERROR EncodeTLV( const WeaveDeviceDescriptor & desc, nl::Weave::TLV::TLVWriter & writer )
編碼文字
WEAVE_ERROR EncodeText( const WeaveDeviceDescriptor & desc, char *buf, uint32_t bufLen, uint32_t & outEncodedLen )
將提供的裝置描述元編碼為寫入所提供緩衝區的文字。
詳細資料 | |||||||||
---|---|---|---|---|---|---|---|---|---|
參數 |
|
||||||||
傳回值 |
|
零位元組
bool IsZeroBytes( const uint8_t *buf, uint32_t len )
檢查指定的緩衝區是否只包含零。
詳細資料 | |||||
---|---|---|---|---|---|
參數 |
|
||||
傳回值 |
|