DeviceInfo.Builder

Stay organized with collections Save and categorize content based on your preferences.
public static final class DeviceInfo.Builder extends Object

Builder for constructing DeviceInfo instances.

Public Method Summary

DeviceInfo
build()
Constructs a DeviceInfo as configured by this builder.
DeviceInfo.Builder
setBluetoothAddress(String bluetoothAddress)
Sets the Bluetooth device address of the target device to be commissioned.
DeviceInfo.Builder
setDiscriminator(Discriminator discriminator)
Set the 12-bit discriminator for the device to be commissioned.
DeviceInfo.Builder
setHotspotSsid(String hotspotSsid)
Sets the Wi-Fi SSID of the Soft AP hotspot of the target device to be commissioned.
DeviceInfo.Builder
setNetworkLocation(NetworkLocation networkLocation)
Sets the IP address of the target device to be commissioned.
DeviceInfo.Builder
setProductId(int productId)
Set the 16-bit product identifier of the device to be commissioned.
DeviceInfo.Builder
setVendorId(int vendorId)
Set the 16-bit vendor identifier of the device to be commissioned.

Inherited Method Summary

Public Methods

public DeviceInfo build ()

Constructs a DeviceInfo as configured by this builder.

public DeviceInfo.Builder setBluetoothAddress (String bluetoothAddress)

Sets the Bluetooth device address of the target device to be commissioned. This should be set only if the target device was detected via a CHIP Bluetooth LE advertisement.

Throws
IllegalArgumentException if the address is present and not a valid Bluetooth address

public DeviceInfo.Builder setDiscriminator (Discriminator discriminator)

Set the 12-bit discriminator for the device to be commissioned.

public DeviceInfo.Builder setHotspotSsid (String hotspotSsid)

Sets the Wi-Fi SSID of the Soft AP hotspot of the target device to be commissioned. If this request is due to discovery of a CHIP device hotspot, then this should be set to that hotspot's SSID.

public DeviceInfo.Builder setNetworkLocation (NetworkLocation networkLocation)

Sets the IP address of the target device to be commissioned. This should be set only if the target device was detected on the current Wi-Fi network via mDNS discovery.

Throws
IllegalArgumentException if the address is present and not a valid IP address

public DeviceInfo.Builder setProductId (int productId)

Set the 16-bit product identifier of the device to be commissioned.

public DeviceInfo.Builder setVendorId (int vendorId)

Set the 16-bit vendor identifier of the device to be commissioned.