DeviceManager<TDeviceConfiguration extends DeviceConfiguration<DeviceRegistration> > class
abstract
A DeviceManager handles a hardware device or online service on runtime.
- Inheritance
-
- Object
- DeviceDataCollector<
TDeviceConfiguration> - DeviceManager
- Implementers
Constructors
- DeviceManager(String type, [TDeviceConfiguration? configuration, bool _restartOnReconnect = true])
Properties
- configuration ↔ TDeviceConfiguration?
-
The configuration for this device.
getter/setter pairinherited
- displayName → String?
-
no setterinherited
-
executors
→ Set<
TaskControlExecutor> -
The set of task control executors that use this device manager.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Get a unique id for this device.
no setterinherited
- isConnected → bool
-
Is this device manager connected to the real device?
no setter
- isConnecting → bool
-
Is this device manager connecting or connected to the real device?
no setter
- isInitialized → bool
-
Has this device manager been initialized?
no setter
- restartOnReconnect → bool
-
Is data sampling resumed when this device is (re)connected?
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- status ↔ DeviceStatus
-
The runtime status of this device.
getter/setter pair
-
statusEvents
→ Stream<
DeviceStatus> -
The stream of status events for this device.
no setter
-
supportedDataTypes
→ Set<
String> -
The set of data types defining which data can be collected on this device.
no setteroverride
- type ↔ String
-
The type of this device
getter/setter pairinherited
- typeName → String
-
The name of the
type
without the namespace.no setter
Methods
-
canConnect(
) → Future< bool> -
Determines whether a connection can be made at this point in time to
the device.
inherited
-
connect(
) → Future< DeviceStatus> - Ask this DeviceManager to start connecting to the device.
-
disconnect(
) → Future< bool> - Ask this DeviceManager to disconnect from the device.
-
hasPermissions(
) → Future< bool> -
Does this device manager have the
permissions
to run? -
initialize(
TDeviceConfiguration configuration) → void -
Initialize the device manager by specifying its
configuration
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onConnect(
) → Future< DeviceStatus> - Callback on connect. Returns the DeviceStatus of the device.
-
onDisconnect(
) → Future< bool> - Callback on disconnect.
-
onHasPermissions(
) → Future< bool> - Callback on hasPermissions.
-
onInitialize(
TDeviceConfiguration configuration) → void - Callback on initialize.
-
onRequestPermissions(
) → Future< void> - Callback on requestPermissions.
-
requestPermissions(
) → Future< void> -
Request all
permissions
for this device manager. -
restart(
) → void - Restart sampling of the measures using this device.
-
startHeartbeatMonitoring(
SmartphoneDeploymentController controller) → void -
Start heartbeat monitoring for this device for the deployment controlled
by
controller
. -
stop(
) → void - Stop sampling the measures using this device.
-
stopHeartbeatMonitoring(
) → void - Stop heartbeat monitoring for this device.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited