AbstractDataManager class abstract

A base DataManager to extend when you write your own data manager.

configure subscribes to the measurement stream and calls onMeasurement for each measurement; you implement onMeasurement to store or upload it. Errors on the stream are saved as Error measurements. Emits the DataManagerEventTypes.configured and DataManagerEventTypes.closed events.

Implemented types
Implementers

Constructors

AbstractDataManager()

Properties

dataEndPoint → DataEndPoint?
The DataEndPoint that this data manager is handling.
no setter
deployment → SmartphoneDeployment
The deployment using this data manager.
no setteroverride
events → Stream<DataManagerEvent>
Stream of data manager events, see DataManagerEventTypes.
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
studyDeploymentId → String
The ID of the study deployment that this manager is handling.
no setteroverride
type → String
The type of this data manager as enumerated in DataEndPointTypes.
no setterinherited

Methods

addEvent(DataManagerEvent event) → void
Adds event to the events stream.
close() → Future<void>
Flushes any buffered data and closes this data manager.
override
configure({required DataEndPoint dataEndPoint, required SmartphoneDeployment deployment, required Stream<Measurement> measurements}) → Future<void>
Configures the data manager with the study deployment, the dataEndPoint, and the stream of measurements to handle.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onDone() → Future<void>
When the data stream closes, the onDone handler is called. Default implementation is a no-op function. If another behavior is wanted, implementations of this abstract data manager should handle closing of the data stream.
override
onError(Object? error) → Future<void>
Saves error as an Error measurement via onMeasurement.
override
onMeasurement(Measurement measurement) → Future<void>
On each measurement collected, the onMeasurement handler is called.
inherited
toString() → String
A string representation of this object.
override

Operators

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