Study<TDeviceDeployment extends PrimaryDeviceDeployment> class

A study deployment that this client device takes part in with one role.

The study deployment is identified by studyDeploymentId, and the device takes part as deviceRoleName. A study is created by the app and added with ClientManager.addStudy; it then holds what the client knows about the deployment: its deploymentStatus and, once received, its deployment.

Key points:

See also StudyDeploymentProxy, which updates a study during deployment. CARP Mobile Sensing extends this class as SmartphoneStudy.

Constructors

Study(String studyDeploymentId, String deviceRoleName, [DateTime? createdOn, StudyDeploymentStatus? deploymentStatus, TDeviceDeployment? deployment])
Create a study uniquely identified by its studyDeploymentId and deviceRoleName.

Properties

createdOn → DateTime
The date and time when this study was created and added to the ClientManager.
no setter
deployment → TDeviceDeployment?
The deployment for this study; null until received from the deployment service.
no setter
deploymentStatus → StudyDeploymentStatus?
The deployment status of this study; null until received from the deployment service.
no setter
deviceRoleName → String
The role name of the primary device in the deployment this study runtime participates in.
no setter
events → Stream<StudyStatusEvent<Study<PrimaryDeviceDeployment>>>
Stream of study status events.
no setter
hashCode → int
The hash code for this object.
no setteroverride
participantId ↔ String?
The ID of the participant in this study, if known.
getter/setter pair
participantRoleName ↔ String?
The role of the participant in this study, if known.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
status → StudyStatus
The status of this study, derived from deploymentStatus.
no setter
studyDeploymentId → String
The ID of the deployed study for which to collect data.
no setter
studyId ↔ String?
The unique id of the study in the deployment service, if known.
getter/setter pair

Methods

createEvent(StudyStatusEvent<Study<PrimaryDeviceDeployment>> event) → void
Emits event on the events stream.
deploymentError([String? message]) → void
The deployment is in an error state. Print the optional message and emit a deployment error event.
deploymentStatusReceived([StudyDeploymentStatus? deploymentStatus]) → void
An updated deploymentStatus has been received.
deploymentUpdated([String? message]) → void
Mark the deployment as updated. Print the optional message and emit a deployment update event. If deployment is null, nothing happens.
deviceDeploymentReceived([TDeviceDeployment? deployment]) → void
A new primary device deployment determining what data to collect for this study has been received.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

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