StudyRuntime<TRegistration extends DeviceRegistration> class

Manage data collection for a specific primary device deployment on a client device.

Constructors

StudyRuntime(DeploymentService deploymentService, DeviceDataCollectorFactory deviceRegistry)
Create a new study runtime, specifying the deploymentService to use to retrieve and manage the study deployment with studyDeploymentId and the deviceRegistry to handle the devices used in this study deployment.

Properties

deployment PrimaryDeviceDeployment?
The PrimaryDeviceDeployment for this study runtime.
getter/setter pair
deploymentService DeploymentService
The deployment service to use to retrieve and manage the study deployment.
getter/setter pair
deploymentStatus StudyDeploymentStatus?
The latest known deployment status retrieved from the deploymentService. Null if not know.
getter/setter pair
deviceRegistration → TRegistration?
The unique device registration for this device. Set in the addStudy method.
no setter
deviceRegistry DeviceDataCollectorFactory
The device registry that handles the devices used in this runtime.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
isDeployed bool
Has the device deployment been completed successfully?
no setter
isInitialized bool
Has this StudyRuntime been initialized?
no setter
isStopped bool
Has the study and data collection been stopped?
no setter
remainingDevicesToRegister List<DeviceConfiguration<DeviceRegistration>>
The list of devices that still remain to be registered before all devices in this study runtime is registered.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
status StudyStatus
The status of the study running on this StudyRuntime.
getter/setter pair
statusEvents Stream<StudyStatus>
The stream of StudyStatus events for this controller.
no setter
study Study?
The study for this study runtime. Set in the addStudy method. null if no study has been added yet.
no setter
studyDeploymentId String?
The study deployment id for the study of this controller.
no setter

Methods

addStudy(Study study, TRegistration deviceRegistration) Future<void>
Adds study this study runtime by specifying its study and deviceRegistration.
dispose() → void
Called when this StudyRuntime is disposed. This entails stopping and disposing all data sampling and storage.
getStudyDeploymentStatus() Future<StudyDeploymentStatus?>
Get the status for a study deployment for the study. Returns null if studyDeploymentId is not found.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove() Future<void>
Called when this StudyRuntime is removed from a ClientManager.
start() → void
Start collecting data for this StudyRuntime.
stop() Future<void>
Stop collecting data for this StudyRuntime.
toString() String
A string representation of this object.
inherited
tryDeployment() Future<StudyStatus>
Tries to deploy the study if it's ready to be deployed by registering the client device using deviceRegistration and verifying the study is supported on this device.
tryRegisterConnectedDevice(DeviceConfiguration<DeviceRegistration> device) Future<void>
Tries to register a connected device which is available in this device's deviceRegistry in the deploymentService
tryRegisterRemainingDevicesToRegister() Future<void>
Tries to register the connected devices which still need to be registered in the deploymentService.

Operators

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