DeviceController class
A DeviceController handles runtime management of all devices and services available to this phone, including the phone itself.
Each specific device is handled by a DeviceManager which are available as a map of devices.
- Inheritance
-
- Object
- DeviceDataCollectorFactory
- DeviceController
Constructors
- DeviceController()
-
Get the singleton DeviceController.
factory
Properties
-
connectedDevices
→ List<
DeviceManager< DeviceConfiguration< >DeviceRegistration> , DeviceRegistration> -
The list of connected devices on runtime.
no setter
-
devices
→ Map<
String, DeviceManager< DeviceConfiguration< >DeviceRegistration> , DeviceRegistration> -
The map of device managers registered in this controller.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- localDataCollector ↔ DeviceDataCollector
-
The data collector for the primary device.
getter/setter pairinherited-setteroverride-getter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- smartphoneDeviceManager → SmartphoneDeviceManager
-
The smartphone (primary device) manager.
no setter
Methods
-
createConnectedDataCollector(
String deviceType, DeviceRegistration deviceRegistration) → DeviceManager< DeviceConfiguration< ?DeviceRegistration> , DeviceRegistration> -
Create a
ConnectedDeviceDataCollectorfor a connecteddeviceTypeusing connection options specified indeviceRegistration.override -
devicesToString(
) → String - A string representation of all devices.
-
disconnectAllConnectedDevices(
) → Future< void> - A convenient method for disconnecting all connected devices.
-
getDeviceManager(
String deviceType) → DeviceManager< DeviceConfiguration< ?DeviceRegistration> , DeviceRegistration> -
Get a device manger for the specified
deviceType. If a device manager is not yet available, it is created from the sampling packages. Returns null if no device manager fordeviceTypeis found. -
hasDevice(
String deviceType) → bool -
Do this controller support the specified device
deviceType? -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerAllAvailableDevices(
) → void - A convenient method for creating and registering all devices which are available in each SamplingPackage that has been registered in the SamplingPackageRegistry.
-
registerDevice(
String deviceType, DeviceManager< DeviceConfiguration< manager) → voidDeviceRegistration> , DeviceRegistration> -
Register
manageras a device manager for a device of typedeviceType. -
supportsDevice(
String deviceType) → bool -
Do this controller support the specified device
deviceType? -
toString(
) → String -
A string representation of this object.
override
-
unregisterDevice(
String deviceType) → void -
Unregister the manager for
deviceType.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- HEARTBEAT_PERIOD → const int
- The period of sending Heartbeat measurements, in minutes.