nl:: Weave:: Profiles:: DeviceDescription:: WeaveDeviceDescriptor
#include <src/lib/profiles/device-description/DeviceDescription.h>
Contains descriptive information about a Weave device.
Summary
Constructors and Destructors |
|
---|---|
WeaveDeviceDescriptor(void)
|
Public types |
|
---|---|
@180{
|
enum Defines the maximum length of some attributes. |
@181{
|
enum Feature flags indicating specific device capabilities. |
@182{
|
enum Flags field definitions. |
Public attributes |
|
---|---|
Day
|
uint8_t
Day of device manufacture (0 = not present)
|
DeviceFeatures
|
uint32_t
Bit field indicating support for specific device features.
|
DeviceId
|
uint64_t
Weave device ID (0 = not present)
|
FabricId
|
uint64_t
ID of Weave fabric to which the device belongs (0 = not present)
|
Flags
|
uint8_t
Bit field containing additional information about the device.
|
ManufacturingDate
|
struct nl::Weave::Profiles::DeviceDescription::WeaveDeviceDescriptor::@183
|
Month
|
uint8_t
Month of device manufacture (1 = January)
|
PairingCode[kMaxPairingCodeLength+1]
|
char
Device pairing code (NUL terminated, 0 length = not present)
|
PairingCompatibilityVersionMajor
|
uint16_t
Major device pairing software compatibility version.
|
PairingCompatibilityVersionMinor
|
uint16_t
Minor device pairing software compatibility version.
|
Primary802154MACAddress[8]
|
uint8_t
MAC address for primary 802.15.4 interface (big-endian, all zeros = not present)
|
PrimaryWiFiMACAddress[6]
|
uint8_t
MAC address for primary WiFi interface (big-endian, all zeros = not present)
|
ProductId
|
uint16_t
Device product code (0 = not present)
|
ProductRevision
|
uint16_t
Device product revision (0 = not present)
|
RendezvousWiFiESSID[kMaxRendezvousWiFiESSID+1]
|
char
ESSID for device WiFi rendezvous network (NUL terminated, 0 length = not present)
|
SerialNumber[kMaxSerialNumberLength+1]
|
char
Serial number of device (NUL terminated, 0 length = not present)
|
SoftwareVersion[kMaxSoftwareVersionLength+1]
|
char
Active software version (NUL terminated, 0 length = not present)
|
VendorId
|
uint16_t
Device vendor code (0 = not present)
|
Year
|
uint16_t
Year of device manufacture (valid range 2001 - 2099)
|
Public functions |
|
---|---|
Clear(void)
|
void
Clears the device description.
|
Public static functions |
|
---|---|
Decode(const uint8_t *data, uint32_t dataLen, WeaveDeviceDescriptor & outDesc)
|
Decodes the contents of the provided data buffer into a Weave Device Descriptor object.
|
DecodeTLV(const uint8_t *data, uint32_t dataLen, WeaveDeviceDescriptor & outDesc)
|
Decodes the contents of the provided TLV data buffer into a Weave Device Descriptor object.
|
DecodeTLV(nl::Weave::TLV::TLVReader & reader, WeaveDeviceDescriptor & outDesc)
|
Decodes the Device Description using the provided pre-initialized TLVReader.
|
DecodeText(const char *data, uint32_t dataLen, WeaveDeviceDescriptor & outDesc)
|
Decodes the contents of the provided text data buffer into a Weave Device Descriptor object.
|
EncodeTLV(const WeaveDeviceDescriptor & desc, uint8_t *buf, uint32_t bufLen, uint32_t & outEncodedLen)
|
Encodes the provided device descriptor as Weave TLV written to the supplied buffer.
|
EncodeTLV(const WeaveDeviceDescriptor & desc, nl::Weave::TLV::TLVWriter & writer)
|
Encodes the provided device descriptor as Weave TLV written using the provided pre-initialized TLVWriter object.
|
EncodeText(const WeaveDeviceDescriptor & desc, char *buf, uint32_t bufLen, uint32_t & outEncodedLen)
|
Encodes the provided device descriptor as text written to the supplied buffer.
|
IsZeroBytes(const uint8_t *buf, uint32_t len)
|
bool
Check if the specified buffer contains only zeros.
|
Public types
@180
@180
@181
@181
@182
@182
Public attributes
Day
uint8_t Day
Day of device manufacture (0 = not present)
DeviceFeatures
uint32_t DeviceFeatures
Bit field indicating support for specific device features.
DeviceId
uint64_t DeviceId
Weave device ID (0 = not present)
FabricId
uint64_t FabricId
ID of Weave fabric to which the device belongs (0 = not present)
Flags
uint8_t Flags
Bit field containing additional information about the device.
ManufacturingDate
struct nl::Weave::Profiles::DeviceDescription::WeaveDeviceDescriptor::@183 ManufacturingDate
Month
uint8_t Month
Month of device manufacture (1 = January)
PairingCode
char PairingCode[kMaxPairingCodeLength+1]
Device pairing code (NUL terminated, 0 length = not present)
PairingCompatibilityVersionMajor
uint16_t PairingCompatibilityVersionMajor
Major device pairing software compatibility version.
PairingCompatibilityVersionMinor
uint16_t PairingCompatibilityVersionMinor
Minor device pairing software compatibility version.
Primary802154MACAddress
uint8_t Primary802154MACAddress[8]
MAC address for primary 802.15.4 interface (big-endian, all zeros = not present)
PrimaryWiFiMACAddress
uint8_t PrimaryWiFiMACAddress[6]
MAC address for primary WiFi interface (big-endian, all zeros = not present)
ProductId
uint16_t ProductId
Device product code (0 = not present)
ProductRevision
uint16_t ProductRevision
Device product revision (0 = not present)
RendezvousWiFiESSID
char RendezvousWiFiESSID[kMaxRendezvousWiFiESSID+1]
ESSID for device WiFi rendezvous network (NUL terminated, 0 length = not present)
SerialNumber
char SerialNumber[kMaxSerialNumberLength+1]
Serial number of device (NUL terminated, 0 length = not present)
SoftwareVersion
char SoftwareVersion[kMaxSoftwareVersionLength+1]
Active software version (NUL terminated, 0 length = not present)
VendorId
uint16_t VendorId
Device vendor code (0 = not present)
Year
uint16_t Year
Year of device manufacture (valid range 2001 - 2099)
Public functions
Clear
void Clear( void )
Clears the device description.
WeaveDeviceDescriptor
WeaveDeviceDescriptor( void )
Public static functions
Decode
WEAVE_ERROR Decode( const uint8_t *data, uint32_t dataLen, WeaveDeviceDescriptor & outDesc )
Decodes the contents of the provided data buffer into a Weave Device Descriptor object.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Return Values |
|
DecodeTLV
WEAVE_ERROR DecodeTLV( const uint8_t *data, uint32_t dataLen, WeaveDeviceDescriptor & outDesc )
Decodes the contents of the provided TLV data buffer into a Weave Device Descriptor object.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||
Return Values |
|
DecodeTLV
WEAVE_ERROR DecodeTLV( nl::Weave::TLV::TLVReader & reader, WeaveDeviceDescriptor & outDesc )
Decodes the Device Description using the provided pre-initialized TLVReader.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Return Values |
|
DecodeText
WEAVE_ERROR DecodeText( const char *data, uint32_t dataLen, WeaveDeviceDescriptor & outDesc )
Decodes the contents of the provided text data buffer into a Weave Device Descriptor object.
Details | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||||
Return Values |
|
EncodeTLV
WEAVE_ERROR EncodeTLV( const WeaveDeviceDescriptor & desc, uint8_t *buf, uint32_t bufLen, uint32_t & outEncodedLen )
Encodes the provided device descriptor as Weave TLV written to the supplied buffer.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||
Return Values |
|
EncodeTLV
WEAVE_ERROR EncodeTLV( const WeaveDeviceDescriptor & desc, nl::Weave::TLV::TLVWriter & writer )
Encodes the provided device descriptor as Weave TLV written using the provided pre-initialized TLVWriter object.
This is used to add the device description to larger TLV output.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
EncodeText
WEAVE_ERROR EncodeText( const WeaveDeviceDescriptor & desc, char *buf, uint32_t bufLen, uint32_t & outEncodedLen )
Encodes the provided device descriptor as text written to the supplied buffer.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||
Return Values |
|
IsZeroBytes
bool IsZeroBytes( const uint8_t *buf, uint32_t len )
Check if the specified buffer contains only zeros.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|