DeviceController class

A DeviceController handles runtime management of all devices and services connected to this phone, including the phone itself.

Constructors

DeviceController()
Get the singleton DeviceController.
factory

Properties

connectedDevices List<DeviceManager<DeviceRegistration, DeviceDescriptor>>
Get the list of connected devices defined in the study deployment.
no setter
devices Map<String, DeviceManager<DeviceRegistration, DeviceDescriptor>>
The devices available in this DeviceDataCollectorFactory mapped to their device type.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

connectAllConnectableDevices() Future<void>
A convenient method for connecting all connectable devices available in each SamplingPackage that has been registered in the SamplingPackageRegistry.
createDevice(String deviceType) Future<DeviceManager<DeviceRegistration, DeviceDescriptor>?>
Create and register a DeviceDataCollector based on a deviceType. Returns null if a device cannot be created.
override
devicesToString() String
A string representation of all devices.
disconnectAllConnectedDevices() Future<void>
A convenient method for disconnecting all connected devices.
getDevice(String deviceType) DeviceManager<DeviceRegistration, DeviceDescriptor>?
Returns the DeviceDataCollector of the given deviceType. Returns null if no device is found.
override
hasDevice(String deviceType) bool
Returns true if this factory contain a device manager of the given deviceType.
override
initializeDevice(DeviceDescriptor descriptor) → void
Initialize the device specified in the descriptor.
override
initializeDevices(MasterDeviceDeployment masterDeviceDeployment) → void
Initialize all devices in a masterDeviceDeployment.
override
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, DeviceDataCollector manager) → void
Register and initialize a DeviceDataCollector for a deviceType.
override
supportsDevice(String type) bool
Returns true if this factory supports a device of the given deviceType. Note that even though a certain type of device is supported, its device DeviceDataCollector is not loaded until registerDevice is called.
override
toString() String
A string representation of this object.
override
unregisterDevice(String deviceType) → void
override

Operators

operator ==(Object other) bool
The equality operator.
inherited