ConsoleDataManager class
A data manager that prints each Measurement as JSON to the console.
Used for testing and debugging. Selected when the protocol's data endpoint has type DataEndPointTypes.PRINT. Nothing is stored, so all data is lost when the app stops.
- Inheritance
-
- Object
- AbstractDataManager
- ConsoleDataManager
Constructors
Properties
- dataEndPoint → DataEndPoint?
-
The DataEndPoint that this data manager is handling.
no setterinherited
- deployment → SmartphoneDeployment
-
The deployment using this data manager.
no setterinherited
-
events
→ Stream<
DataManagerEvent> -
Stream of data manager events, see DataManagerEventTypes.
no setterinherited
- 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 setterinherited
- type → String
-
The type of this data manager as enumerated in DataEndPointTypes.
no setteroverride
Methods
-
addEvent(
DataManagerEvent event) → void -
Adds
eventto the events stream.inherited -
close(
) → Future< void> -
Flushes any buffered data and closes this data manager.
inherited
-
configure(
{required DataEndPoint dataEndPoint, required SmartphoneDeployment deployment, required Stream< Measurement> measurements}) → Future<void> -
Configures the data manager with the study
deployment, thedataEndPoint, and the stream ofmeasurementsto handle.inherited -
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.
inherited
-
onError(
Object? error) → Future< void> -
Saves
erroras anErrormeasurement via onMeasurement.inherited -
onMeasurement(
Measurement measurement) → Future< void> -
On each measurement collected, the onMeasurement handler is called.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited