Class: $.DeviceDataModel
- Inherits:
-
Toybox.Lang.Object
-
Toybox.Lang.Object
-
Overview
Instance Member Summary collapse
- _dataModelFactory as $.DataModelFactory
- _device as BluetoothLowEnergy.Device or Null
- _environmentProfile as $.EnvironmentProfileModel or Null
- _scanResult as BluetoothLowEnergy.ScanResult
Instance Method Summary collapse
-
getActiveProfile() as $.EnvironmentProfileModel or Null
Get the active profile.
-
initialize(bleDelegate as $.ThingyDelegate, dataModelFactory as $.DataModelFactory, scanResult as BluetoothLowEnergy.ScanResult)
Constructor.
-
isConnected() as Lang.Boolean
Get whether a device is connected.
-
pair() as Void
Pair the device associated with the current scan result.
-
procConnection(device as BluetoothLowEnergy.Device) as Void
Process a new device connection.
-
procDeviceConnected() as Void
Update the profile after a is device connected.
-
unpair() as Void
Unpair the current device.
Instance Attribute Details
var _dataModelFactory as $.DataModelFactory
var _device as BluetoothLowEnergy.Device or Null
var _environmentProfile as $.EnvironmentProfileModel or Null
var _scanResult as BluetoothLowEnergy.ScanResult
Instance Method Details
getActiveProfile() as $.EnvironmentProfileModel or Null
Get the active profile
initialize(bleDelegate as $.ThingyDelegate, dataModelFactory as $.DataModelFactory, scanResult as BluetoothLowEnergy.ScanResult)
Constructor
isConnected() as Lang.Boolean
Get whether a device is connected
pair() as Void
Pair the device associated with the current scan result
procConnection(device as BluetoothLowEnergy.Device) as Void
Process a new device connection
procDeviceConnected() as Void
Update the profile after a is device connected
unpair() as Void
Unpair the current device