DeviceDescriptor.Builder

Stay organized with collections Save and categorize content based on your preferences.
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)
Set the Matter device type to indicate the device's primary functionality.
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)

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