CarpDataManager class

Stores CAMS data points in the CARP backend.

Every time a CARP json data object is created, it is uploaded to CARP. Hence, this interface only works when the device is online. If offline data storage and forward is needed, use the CarpUploadMethod.FILE or CarpUploadMethod.BATCH_DATA_POINT instead. These methods will buffer files for upload, if offline.

Inheritance
  • Object
  • AbstractDataManager
  • CarpDataManager

Constructors

CarpDataManager()

Properties

carpEndPoint CarpDataEndPoint
getter/setter pair
controller StreamController<DataManagerEvent>
getter/setter pairinherited
dataEndPoint → DataEndPoint?
The DataEndPoint that this data manager is handling. Set in the initialize method.
no setterinherited
deployment → SmartphoneDeployment
The deployment using this data manager.
no setterinherited
events Stream<DataManagerEvent>
Stream of data manager events.
no setterinherited
fileDataManager ↔ FileDataManager
getter/setter pair
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
no setterinherited
type String
The type of this data manager as enumerated in DataEndPointTypes.
no setteroverride
user Future<CarpUser?>
The currently signed in user.
no setter

Methods

addEvent(DataManagerEvent event) → void
Add event to the events stream.
inherited
close() Future<void>
Flush any buffered data and close this data manager. After calling close the data manager can no longer be used.
inherited
initialize(DataEndPoint dataEndPoint, MasterDeviceDeployment deployment, Stream<DataPoint> data) Future
Initialize the data manager by specifying the dataEndPoint, study deployment, and the stream of data events to handle.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onDataPoint(DataPoint dataPoint) Future<void>
On each data event from the data stream, the onDataPoint handler is called. Implementations of this interface should handle how to save or upload the dataPoint.
override
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>
When an error event is send on the stream, the onError handler is called.
inherited
toString() String
A string representation of this object.
inherited
uploadData(DataPoint dataPoint) Future<void>
Handle upload of data depending on the specified CarpUploadMethod.

Operators

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