addStudy method
Add a study which needs to be executed on this client. This involves registering this device for the specified study deployment.
studyDeploymentId
- The ID of a study which has been deployed already and for which to collect data.deviceRoleName
- The role which the client device this runtime is intended for plays as part of the deployment identified bystudyDeploymentId
.
Returns the StudyStatus
of the newly added study.
Implementation
@override
Future<StudyStatus> addStudy(Study study) async {
StudyStatus status = await super.addStudy(study);
info('Adding study to $runtimeType - $study');
// always create a new controller
final controller =
SmartphoneDeploymentController(deploymentService!, deviceController);
repository[study] = controller;
await controller.initialize(
study,
registration!,
);
return status;
}