SmartphoneStudyProtocol class

A description of how a study is to be executed on a smartphone.

A SmartphoneStudyProtocol defining the master device (MasterDeviceDescriptor) responsible for aggregating data (typically this phone), the optional devices (DeviceDescriptor) connected to the master device, and the Trigger's which lead to data collection on said devices.

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

Constructors

SmartphoneStudyProtocol({required String ownerId, required String name, StudyDescription? studyDescription, DataEndPoint? dataEndPoint, Map<String, dynamic>? applicationData})
Create a new SmartphoneStudyProtocol.
SmartphoneStudyProtocol.fromJson(Map<String, dynamic> json)
factory

Properties

applicationData Map<String, dynamic>?
Application-specific data to be stored as part of the study protocol which will be included in all deployments of this study protocol.
getter/setter pair
connectedDevices List<DeviceDescriptor>
The devices this device needs to connect to.
getter/setter pairinherited
connections List<DeviceConnection>
getter/setter pairinherited
creationDate DateTime
The timestamp of the creation of this protocol in Zulu time.
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
description String
The description for the study protocol.
getter/setter pairinherited-setteroverride-getter
expectedParticipantData List<Map<String, dynamic>>?
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
masterDevice → MasterDeviceDescriptor
The first of all the masterDevices. This is a convinient method used when there is only one master device, which is most of the cases in Flutter where the master device is typically the phone.
no setterinherited
masterDevices List<MasterDeviceDescriptor>
The master devices involved in this protocol.
getter/setter pairinherited
name String
A unique descriptive name for the protocol.
getter/setter pairinherited
ownerId String
The owner id of this study protocol.
getter/setter pairinherited
responsible StudyResponsible?
The PI responsible for this protocol.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
studyDescription StudyDescription?
The description of this study protocol containing the title, description, purpose, and the responsible researcher for this study.
getter/setter pair
tasks Set<TaskDescriptor>
The set of tasks which can be triggered as part of this protocol.
getter/setter pairinherited
triggeredTasks List<TriggeredTask>
The tasks (and the devices they are triggered to) for the specified trigger.
getter/setter pairinherited
triggers Map<String, Trigger>
The set of Triggers which can trigger TaskDescriptors in this study protocol.
getter/setter pairinherited

Methods

addConnectedDevice(DeviceDescriptor device) → void
Add a device which is connected to this masterDevice. Its role name should be unique in the protocol.
inherited
addMasterDevice(MasterDeviceDescriptor masterDevice) → void
Add a masterDevice which is responsible for aggregating and synchronizing incoming data. Its role name should be unique in the protocol.
inherited
addTask(TaskDescriptor task) → void
Add the task to this protocol.
inherited
addTrigger(Trigger trigger) → void
Add the trigger to this protocol.
inherited
addTriggeredTask(Trigger trigger, TaskDescriptor task, DeviceDescriptor targetDevice) → void
Add a task to be sent to a targetDevice once a trigger within this protocol is initiated.
inherited
addTriggeredTasks(Trigger trigger, List<TaskDescriptor> tasks, DeviceDescriptor targetDevice) → void
Add a set of tasks to be sent to a targetDevice once a trigger within this protocol is initiated. In case the trigger or tasks are not yet included in this study protocol, they will be added. The targetDevice needs to be added prior to this call since it needs to be set up as either a master device or connected device.
inherited
getTasksForDevice(DeviceDescriptor device) Set<TaskDescriptor?>
Gets all the tasks triggered for the specified device. The device must be part of either masterDevices or connectedDevices.
inherited
getTasksForDeviceRoleName(String? deviceRoleName) Set<TaskDescriptor>
Gets all the tasks triggered for the specified deviceRoleName.
inherited
getTriggeredTasks(Trigger trigger) Set<TriggeredTask>
Gets all the tasks (and the devices they are triggered to) for the specified trigger.
inherited
hasMasterDevice(String rolename) bool
Does this protocol have a master device with role name rolename?
inherited
indexOfTrigger(Trigger trigger) int
Returns the index of the trigger in the triggers. Returns -1 if not found.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeTask(TaskDescriptor task) → void
Remove the task currently present in this configuration including removing it from any Trigger's which initiate it.
inherited
toJson() Map<String, dynamic>
override
toString() String
A string representation of this object.
inherited

Operators

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