SmartphoneDeploymentController class
A SmartphoneDeploymentController controls the execution of a SmartphoneDeployment.
- Inheritance
-
- Object
- StudyRuntime<
DeviceRegistration> - SmartphoneDeploymentController
Constructors
- SmartphoneDeploymentController(DeploymentService deploymentService, DeviceDataCollectorFactory deviceRegistry)
- Create a new SmartphoneDeploymentController to control the runtime behavior of a study deployment.
Properties
- dataEndPoint → DataEndPoint?
-
The configuration of the data endpoint, i.e. how data is saved or uploaded.
no setter
- dataManager → DataManager?
-
The data manager responsible for handling the data collected by this controller.
no setter
- deployment ↔ SmartphoneDeployment?
-
The
PrimaryDeviceDeployment
for this study runtime.getter/setter pairinherited-setteroverride-getter - deploymentService ↔ DeploymentService
-
The deployment service to use to retrieve and manage the study deployment.
getter/setter pairinherited
- deploymentStatus ↔ StudyDeploymentStatus?
-
The latest known deployment status retrieved from the
deploymentService
. Null if not know.getter/setter pairinherited - deviceRegistration → DeviceRegistration?
-
The unique device registration for this device.
Set in the
addStudy
method.no setterinherited - deviceRegistry ↔ DeviceController
-
The device registry that handles the devices used in this runtime.
getter/setter pairinherited-setteroverride-getter
- executor → SmartphoneDeploymentExecutor
-
The executor executing the deployment.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isDeployed → bool
-
Has the device deployment been completed successfully?
no setterinherited
- isInitialized → bool
-
Has this
StudyRuntime
been initialized?no setterinherited - isStopped → bool
-
Has the study and data collection been stopped?
no setterinherited
-
measurements
→ Stream<
Measurement> -
The stream of all sampled measurements.
no setter
-
permissions
→ Map<
Permission, PermissionStatus> -
The permissions granted to this client from the OS.
no setter
- privacySchemaName → String
-
The privacy schema used to encrypt data before upload.
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 setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- samplingSize → int
-
The sampling size of this deployment in terms of number of
Measurement
that has been collected since sampling was started. Note that this number is not persistent, and the counter hence resets across app restart.no setter - status ↔ StudyStatus
-
The status of the
study
running on thisStudyRuntime
.getter/setter pairinherited -
statusEvents
→ Stream<
StudyStatus> -
The stream of
StudyStatus
events for this controller.no setterinherited - study → SmartphoneStudy?
-
The study for this study runtime. Set in the addStudy method.
null
if no study has been added yet.no setteroverride - studyDeploymentId → String?
-
The study deployment id for the
study
of this controller.no setterinherited - transformer → DataTransformer
-
The transformer used to transform data before upload.
no setter
Methods
-
addStudy(
Study study, DeviceRegistration deviceRegistration) → Future< void> -
Adds
study
this study runtime by specifying itsstudy
anddeviceRegistration
.inherited -
askForAllPermissions(
) → Future< void> - Asking for permissions for all the measures included in this study deployment.
-
configure(
{DataEndPoint? dataEndPoint, DataTransformer? transformer}) → Future< void> - Configure this SmartphoneDeploymentController.
-
connectAllConnectableDevices(
) → Future< void> - Connect all connectable devices to be used in the deployment and which are available on this phone.
-
dispose(
) → void -
Called when this controller is disposed permanently.
override
-
eraseDeployment(
) → Future< void> - Erase study deployment information cached locally on this phone.
-
getStudyDeploymentStatus(
) → Future< StudyDeploymentStatus?> -
Get the status for a study deployment for the
study
. Returns null ifstudyDeploymentId
is not found.inherited -
initializeDevice(
DeviceConfiguration< DeviceRegistration> configuration) → void -
Initialize the device specified in the
configuration
. -
initializeDevices(
) → void - Initialize all devices in this deployment.
-
measurementsByType(
String type) → Stream< Measurement> -
A stream of all measurements of a specific data
type
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
remove(
) → Future< void> -
Remove a study from this SmartphoneDeploymentController.
override
-
restoreDeployment(
) → Future< bool> -
Restore the deployment from a local cache.
Returns
true
if successful. -
saveDeployment(
) → Future< bool> -
Save the deployment persistently to the local cache.
Returns
true
if successful. -
start(
[bool start = true]) → Future< void> -
Start this controller.
override
-
startHeartbeatMonitoring(
) → void - Start heartbeat monitoring for all devices, incl. the phone, for the deployment controlled by this controller.
-
stop(
) → Future< void> -
Stop this controller and data sampling.
override
-
toString(
) → String -
A string representation of this object.
inherited
-
tryDeployment(
{bool useCached = true}) → Future< StudyStatus> -
Verifies whether the primary device is ready for deployment and in case
it is, deploy the study previously added.
override
-
tryRegisterConnectedDevice(
DeviceConfiguration< DeviceRegistration> device) → Future<void> -
Tries to register a connected device which is available
in this device's
deviceRegistry
in thedeploymentService
inherited -
tryRegisterRemainingDevicesToRegister(
) → Future< void> -
Tries to register the connected devices which still need to be registered
in the
deploymentService
.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited