Google is committed to advancing racial equity for Black communities. See how.

WeaveDeviceManager

public class WeaveDeviceManager extends Object

Nested Class Summary

interface WeaveDeviceManager.CompletionHandler  

Field Summary

protected WeaveDeviceManager.CompletionHandler mCompHandler

Public Constructor Summary

Public Method Summary

void
void
beginArmFailSafe(FailSafeArmMode armMode, int failSafeToken)
int
void
beginConnectBle(BluetoothGatt server, boolean autoClose)
void
beginConnectBle(BluetoothGatt server, boolean autoClose, String pairingCode)
void
beginConnectBle(BluetoothGatt server, boolean autoClose, byte[] accessToken)
void
beginConnectDevice(long deviceId, String ipAddr, byte[] accessToken)
void
beginConnectDevice(long deviceId, String ipAddr, String pairingCode)
void
beginConnectDevice(long deviceId, String ipAddr)
void
void
void
beginDisableNetwork(long networkId)
void
void
beginEnableConnectionMonitor(int intervalMS, int timeoutMS)
void
beginEnableNetwork(long networkId)
void
void
void
void
void
void
void
beginJoinExistingFabric(byte[] fabricConfig)
void
void
beginPairToken(byte[] pairingToken)
void
beginPing(int payloadSize)
void
void
void
beginRegisterServicePairAccount(long serviceId, String accountId, byte[] serviceConfig, String pairingToken, String pairingInitData)
void
beginRemotePassiveRendezvous(String rendezvousAddress, int rendezvousTimeoutSec, int inactivityTimeoutSec)
void
beginRemotePassiveRendezvous(byte[] accessToken, String rendezvousAddress, int rendezvousTimeoutSec, int inactivityTimeoutSec)
void
beginRemotePassiveRendezvous(String pairingCode, String rendezvousAddress, int rendezvousTimeoutSec, int inactivityTimeoutSec)
void
beginRemoveNetwork(long networkId)
void
void
beginRendezvousDevice(String pairingCode, IdentifyDeviceCriteria deviceCriteria)
void
beginRendezvousDevice(byte[] accessToken, IdentifyDeviceCriteria deviceCriteria)
void
void
void
void
beginSetRendezvousMode(int modeFlags)
void
beginStartSystemTest(long profileId, long testId)
void
void
void
void
beginUnregisterService(long serviceId)
void
void
close()
static void
WeaveDeviceDescriptor
decodeDeviceDescriptor(byte[] encodedDeviceDesc)
String
long
BluetoothGatt
BluetoothGattCallback
WeaveDeviceManager.CompletionHandler
boolean
static boolean
isValidPairingCode(String pairingCode)
void
onAddNetworkComplete(long networkId)
void
void
onCloseBleComplete(int connId)
void
void
void
void
onDeviceEnumerationResponse(WeaveDeviceDescriptor deviceDesc, String deviceAddr)
void
void
void
void
void
void
onError(Throwable err)
void
onGetCameraAuthDataComplete(String macAddress, String authData)
void
onGetFabricConfigComplete(byte[] fabricConfig)
void
void
void
onGetRendezvousModeComplete(EnumSet<RendezvousMode> rendezvousModes)
void
void
void
void
void
onPairTokenComplete(byte[] pairingTokenBundle)
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
setAutoReconnect(boolean autoReconnect)
void
void
setConnectTimeout(int timeoutMS)
static void
setLoggingEnabled(boolean enabled)
Enable or disable logging output
void
setRendezvousAddress(String rendezvousAddr)
void
setRendezvousLinkLocal(boolean rendezvousLinkLocal)
void
void

Protected Method Summary

void

Inherited Method Summary

Fields

protected WeaveDeviceManager.CompletionHandler mCompHandler

Public Constructors

public WeaveDeviceManager ()

Public Methods

public void beginAddNetwork (NetworkInfo netInfo)

Parameters
netInfo

public void beginArmFailSafe (FailSafeArmMode armMode, int failSafeToken)

Parameters
armMode
failSafeToken

public int beginArmFailSafe (FailSafeArmMode armMode)

Parameters
armMode

public void beginConnectBle (BluetoothGatt server, boolean autoClose)

Parameters
server
autoClose

public void beginConnectBle (BluetoothGatt server, boolean autoClose, String pairingCode)

Parameters
server
autoClose
pairingCode

public void beginConnectBle (BluetoothGatt server, boolean autoClose, byte[] accessToken)

Parameters
server
autoClose
accessToken

public void beginConnectDevice (long deviceId, String ipAddr, byte[] accessToken)

Parameters
deviceId
ipAddr
accessToken

public void beginConnectDevice (long deviceId, String ipAddr, String pairingCode)

Parameters
deviceId
ipAddr
pairingCode

public void beginConnectDevice (long deviceId, String ipAddr)

Parameters
deviceId
ipAddr

public void beginCreateFabric ()

public void beginDisableConnectionMonitor ()

public void beginDisableNetwork (long networkId)

Parameters
networkId

public void beginDisarmFailSafe ()

public void beginEnableConnectionMonitor (int intervalMS, int timeoutMS)

Parameters
intervalMS
timeoutMS

public void beginEnableNetwork (long networkId)

Parameters
networkId

public void beginGetCameraAuthData (String nonce)

Parameters
nonce

public void beginGetFabricConfig ()

public void beginGetLastNetworkProvisioningResult ()

public void beginGetNetworks (GetNetworkFlags getFlags)

Parameters
getFlags

public void beginGetRendezvousMode ()

public void beginIdentifyDevice ()

public void beginJoinExistingFabric (byte[] fabricConfig)

Parameters
fabricConfig

public void beginLeaveFabric ()

public void beginPairToken (byte[] pairingToken)

Parameters
pairingToken

public void beginPing (int payloadSize)

Parameters
payloadSize

public void beginPing ()

public void beginReconnectDevice ()

public void beginRegisterServicePairAccount (long serviceId, String accountId, byte[] serviceConfig, String pairingToken, String pairingInitData)

Parameters
serviceId
accountId
serviceConfig
pairingToken
pairingInitData

public void beginRemotePassiveRendezvous (String rendezvousAddress, int rendezvousTimeoutSec, int inactivityTimeoutSec)

Parameters
rendezvousAddress
rendezvousTimeoutSec
inactivityTimeoutSec

public void beginRemotePassiveRendezvous (byte[] accessToken, String rendezvousAddress, int rendezvousTimeoutSec, int inactivityTimeoutSec)

Parameters
accessToken
rendezvousAddress
rendezvousTimeoutSec
inactivityTimeoutSec

public void beginRemotePassiveRendezvous (String pairingCode, String rendezvousAddress, int rendezvousTimeoutSec, int inactivityTimeoutSec)

Parameters
pairingCode
rendezvousAddress
rendezvousTimeoutSec
inactivityTimeoutSec

public void beginRemoveNetwork (long networkId)

Parameters
networkId

public void beginRendezvousDevice (IdentifyDeviceCriteria deviceCriteria)

Parameters
deviceCriteria

public void beginRendezvousDevice (String pairingCode, IdentifyDeviceCriteria deviceCriteria)

Parameters
pairingCode
deviceCriteria

public void beginRendezvousDevice (byte[] accessToken, IdentifyDeviceCriteria deviceCriteria)

Parameters
accessToken
deviceCriteria

public void beginResetConfig (ResetFlags resetFlags)

Parameters
resetFlags

public void beginScanNetworks (NetworkType netType)

Parameters
netType

public void beginSetRendezvousMode (EnumSet<RendezvousMode> modeSet)

Parameters
modeSet

public void beginSetRendezvousMode (int modeFlags)

Parameters
modeFlags

public void beginStartSystemTest (long profileId, long testId)

Parameters
profileId
testId

public void beginStopSystemTest ()

public void beginTestNetworkConnectivity (long networkId)

Parameters
networkId

public void beginUnpairToken ()

public void beginUnregisterService (long serviceId)

Parameters
serviceId

public void beginUpdateNetwork (NetworkInfo netInfo)

Parameters
netInfo

public void close ()

public static void closeEndpoints ()

public WeaveDeviceDescriptor decodeDeviceDescriptor (byte[] encodedDeviceDesc)

Parameters
encodedDeviceDesc

public String deviceAddress ()

public long deviceId ()

public BluetoothGatt getBluetoothGatt ()

public BluetoothGattCallback getCallback ()

public WeaveDeviceManager.CompletionHandler getCompletionHandler ()

public boolean isConnected ()

public static boolean isValidPairingCode (String pairingCode)

Parameters
pairingCode

public void onAddNetworkComplete (long networkId)

Parameters
networkId

public void onArmFailSafeComplete ()

public void onCloseBleComplete (int connId)

Parameters
connId

public void onConnectBleComplete ()

public void onConnectDeviceComplete ()

public void onCreateFabricComplete ()

public void onDeviceEnumerationResponse (WeaveDeviceDescriptor deviceDesc, String deviceAddr)

Parameters
deviceDesc
deviceAddr

public void onDisableConnectionMonitorComplete ()

public void onDisableNetworkComplete ()

public void onDisarmFailSafeComplete ()

public void onEnableConnectionMonitorComplete ()

public void onEnableNetworkComplete ()

public void onError (Throwable err)

Parameters
err

public void onGetCameraAuthDataComplete (String macAddress, String authData)

Parameters
macAddress
authData

public void onGetFabricConfigComplete (byte[] fabricConfig)

Parameters
fabricConfig

public void onGetLastNetworkProvisioningResultComplete ()

public void onGetNetworksComplete (NetworkInfo[] networks)

Parameters
networks

public void onGetRendezvousModeComplete (EnumSet<RendezvousMode> rendezvousModes)

Parameters
rendezvousModes

public void onIdentifyDeviceComplete (WeaveDeviceDescriptor deviceDesc)

Parameters
deviceDesc

public void onJoinExistingFabricComplete ()

public void onLeaveFabricComplete ()

public void onNotifyWeaveConnectionClosed (int connId)

Parameters
connId

public void onPairTokenComplete (byte[] pairingTokenBundle)

Parameters
pairingTokenBundle

public void onPingComplete ()

public void onReconnectDeviceComplete ()

public void onRegisterServicePairAccountComplete ()

public void onRemotePassiveRendezvousComplete ()

public void onRemoveNetworkComplete ()

public void onRendezvousDeviceComplete ()

public void onResetConfigComplete ()

public void onScanNetworksComplete (NetworkInfo[] networks)

Parameters
networks

public void onSetRendezvousModeComplete ()

public void onStartSystemTestComplete ()

public void onStopSystemTestComplete ()

public void onTestNetworkConnectivityComplete ()

public void onUnpairTokenComplete ()

public void onUnregisterServiceComplete ()

public void onUpdateNetworkComplete ()

public void setAutoReconnect (boolean autoReconnect)

Parameters
autoReconnect

public void setCompletionHandler (WeaveDeviceManager.CompletionHandler compHandler)

Parameters
compHandler

public void setConnectTimeout (int timeoutMS)

Parameters
timeoutMS

public static void setLoggingEnabled (boolean enabled)

Enable or disable logging output

Parameters
enabled true if logs should be printed; false for no output

public void setRendezvousAddress (String rendezvousAddr)

Parameters
rendezvousAddr

public void setRendezvousLinkLocal (boolean rendezvousLinkLocal)

Parameters
rendezvousLinkLocal

public void startDeviceEnumeration (IdentifyDeviceCriteria deviceCriteria)

Parameters
deviceCriteria

public void stopDeviceEnumeration ()

Protected Methods

protected void finalize ()

Throws
Throwable