SmartphoneDeployment.fromSmartphoneStudyProtocol constructor
SmartphoneDeployment.fromSmartphoneStudyProtocol({})
Create a SmartphoneDeployment based on a SmartphoneStudyProtocol.
This method basically makes a 1:1 mapping from the protocol
to the
deployment using a Smartphone
as the primary device with the
specified primaryDeviceRoleName
.
Implementation
SmartphoneDeployment.fromSmartphoneStudyProtocol({
this.studyId,
String? studyDeploymentId,
this.participantId,
this.participantRoleName,
required String primaryDeviceRoleName,
required SmartphoneStudyProtocol protocol,
}) : super(
deviceConfiguration: Smartphone(roleName: primaryDeviceRoleName),
registration: DefaultDeviceRegistration(),
connectedDevices: protocol.connectedDevices ?? {},
connectedDeviceRegistrations: {},
tasks: protocol.tasks,
triggers: protocol.triggers,
taskControls: protocol.taskControls,
expectedParticipantData: protocol.expectedParticipantData ?? {},
) {
_studyDeploymentId = studyDeploymentId ?? const Uuid().v1;
_data.studyDescription = protocol.studyDescription;
_data.dataEndPoint = protocol.dataEndPoint;
_data.privacySchemaName = protocol.privacySchemaName;
_data.applicationData = protocol._data.applicationData;
}