SmartphoneDeployment class

Contains the entire description and configuration for how a smartphone master device participates in the deployment of a study on a smartphone.

Inheritance
  • Object
  • MasterDeviceDeployment
  • SmartphoneDeployment
Annotations
  • @JsonSerializable(fieldRename: FieldRename.none, includeIfNull: false)

Constructors

SmartphoneDeployment({String? studyDeploymentId, required MasterDeviceDescriptor deviceDescriptor, required DeviceRegistration configuration, List<DeviceDescriptor> connectedDevices = const [], Map<String, DeviceRegistration?> connectedDeviceConfigurations = const {}, List<TaskDescriptor> tasks = const [], Map<String, Trigger> triggers = const {}, List<TriggeredTask> triggeredTasks = const [], StudyDescription? studyDescription, DataEndPoint? dataEndPoint})
Create a new SmartphoneDeployment.
SmartphoneDeployment.fromJson(Map<String, dynamic> json)
factory
SmartphoneDeployment.fromMasterDeviceDeployment({String? studyDeploymentId, required MasterDeviceDeployment masterDeviceDeployment})
Create a SmartphoneDeployment based on a MasterDeviceDeployment.
SmartphoneDeployment.fromMasterDeviceDeploymentAndSmartphoneStudyProtocol({String? studyDeploymentId, required MasterDeviceDeployment deployment, required SmartphoneStudyProtocol protocol})
Create a SmartphoneDeployment that combines a MasterDeviceDeployment and a SmartphoneStudyProtocol.
SmartphoneDeployment.fromSmartphoneStudyProtocol({String? studyDeploymentId, required String masterDeviceRoleName, required SmartphoneStudyProtocol protocol})
Create a SmartphoneDeployment based on a SmartphoneStudyProtocol. This method basically makes a 1:1 mapping between a protocol and a deployment.

Properties

configuration ↔ DeviceRegistration
Configuration for this master device.
getter/setter pairinherited
connectedDeviceConfigurations Map<String, DeviceRegistration?>
Preregistration of connected devices, including configuration such as connection properties, stored per role name.
getter/setter pairinherited
connectedDevices List<DeviceDescriptor>
The devices this device needs to connect to.
getter/setter pairinherited
dataEndPoint ↔ DataEndPoint?
Specifies where and how to stored or upload the data collected from this deployment. If null, the sensed data is not stored, but may still be used in the app.
getter/setter pair
deployed DateTime?
The timestamp (in UTC) when this deployment was deployed on this smartphone. Returns null if not deployed yet.
getter/setter pair
deviceDescriptor ↔ MasterDeviceDescriptor
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
lastUpdateDate DateTime
The time when this device deployment was last updated.
getter/setter pairinherited
measures List<Measure>
Get the list of all measures in this study deployment.
no setter
responsible StudyResponsible?
The Primary Investigator responsible for this study.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
studyDeploymentId String
The unique id of this study deployment.
no setter
studyDescription StudyDescription?
The StudyDescription containing the title, description, purpose, and the responsible researcher for this study.
getter/setter pair
tasks List<TaskDescriptor>
All tasks which should be able to be executed on this or connected devices.
getter/setter pairinherited
triggeredTasks List<TriggeredTask>
The specification of tasks triggered and the devices they are sent to.
getter/setter pairinherited
triggers Map<String, Trigger>
All triggers originating from this device and connected devices, stored per assigned id unique within the study protocol.
getter/setter pairinherited
userId String?
The unique id of the user that this deployment collects data from.
getter/setter pair

Methods

addMeasureListener(SmartphoneDeploymentListener listener) → void
Add a MeasureListener to this Measure.
getDeviceFromRoleName(String roleName) → DeviceDescriptor?
Get the DeviceDescriptor based on the roleName. This includes both the master device and the connected devices. Returns null if no device with roleName is found.
getTaskByName(String name) → TaskDescriptor?
Get the task based on its task name in this deployment.
inherited
hasChanged([dynamic message]) Future<void>
Call this method when this deployment has changed.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeMeasureListener(SmartphoneDeploymentListener listener) → void
Remove a MeasureListener to this Measure.
toJson() Map<String, dynamic>
override
toString() String
A string representation of this object.
override

Operators

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