DeviceDescriptor.Builder

public static final class DeviceDescriptor.Builder extends Object

Builder class to generate DeviceDescriptor instances.

Public Constructor Summary

Public Method Summary

DeviceDescriptor
build()
Builds a new instance of DeviceDescriptor.
DeviceDescriptor.Builder
setDeviceType(int deviceType)
This method is deprecated. this field is not expected to be populated; the vendor ID and product ID can be used to map to a device type
DeviceDescriptor.Builder
setProductId(int productId)
Sets the Product ID of the device.
DeviceDescriptor.Builder
setVendorId(int vendorId)
Sets the Vendor ID of the device.

Inherited Method Summary

Public Constructors

public Builder ()

Public Methods

public DeviceDescriptor build ()

Builds a new instance of DeviceDescriptor.

Throws
IllegalStateException if a product ID is specified without specifying a vendor ID

public DeviceDescriptor.Builder setDeviceType (int deviceType)

This method is deprecated.
this field is not expected to be populated; the vendor ID and product ID can be used to map to a device type

Set the Matter device type to indicate the device's primary functionality. If the device type is unknown, this may be left as zero.

Returns
  • this builder

public DeviceDescriptor.Builder setProductId (int productId)

Sets the Product ID of the device. Note that if a product ID is specified, then the vendor ID *must* also be specified via setVendorId(int).

Parameters
productId the product ID of the device, specific to the vendor
Returns
  • this builder

public DeviceDescriptor.Builder setVendorId (int vendorId)

Sets the Vendor ID of the device. Valid vendor IDs are either zero (for unspecified), or are in the range of 0x1 - 0xFFFF, inclusive.

Returns
  • this builder