DeviceManager<TDeviceRegistration extends DeviceRegistration, TDeviceDescriptor extends DeviceDescriptor> class
abstract
A DeviceManager handles a hardware device or online service on runtime.
- Inheritance
-
- Object
- DeviceDataCollector<
TDeviceRegistration, TDeviceDescriptor> - DeviceManager
- Implementers
Constructors
- DeviceManager([String? type, TDeviceRegistration? deviceRegistration, TDeviceDescriptor? deviceDescriptor])
Properties
- deviceDescriptor ↔ TDeviceDescriptor?
-
The description for this device.
getter/setter pairinherited
- deviceRegistration ↔ TDeviceRegistration?
-
The registration for this device.
getter/setter pairinherited
-
executors
→ Set<
Executor> -
The set of 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
-
Has this device manager been connected?
no setter
- isInitialized → bool
-
Has this device manager been initialized?
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
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.
Returns the
DeviceStatus
of the device. -
disconnect(
) → Future< bool> - Ask this DeviceManager to disconnect from the device.
-
initialize(
TDeviceDescriptor descriptor) → void -
Initialize the device manager by specifying its device
descriptor
. -
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.
-
onInitialize(
TDeviceDescriptor descriptor) → void - Callback on initialize.
-
pause(
) → void - Pause sampling of the measures using this device.
-
restart(
) → void - Restart sampling of the measures using this device.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited