SmartphoneDeployment.fromSmartphoneStudyProtocol constructor

SmartphoneDeployment.fromSmartphoneStudyProtocol({
  1. String? studyDeploymentId,
  2. required String masterDeviceRoleName,
  3. required SmartphoneStudyProtocol protocol,
})

Create a SmartphoneDeployment based on a SmartphoneStudyProtocol. This method basically makes a 1:1 mapping between a protocol and a deployment.

Implementation

SmartphoneDeployment.fromSmartphoneStudyProtocol({
  String? studyDeploymentId,
  required String masterDeviceRoleName,
  required SmartphoneStudyProtocol protocol,
}) : this(
        studyDeploymentId: studyDeploymentId,
        deviceDescriptor: Smartphone(roleName: masterDeviceRoleName),
        configuration: DeviceRegistration(),
        connectedDevices: protocol.connectedDevices,
        connectedDeviceConfigurations: {},
        tasks: protocol.tasks.toList(),
        triggers: protocol.triggers,
        triggeredTasks: protocol.triggeredTasks,
        studyDescription: protocol.studyDescription,
        dataEndPoint: protocol.dataEndPoint,
      );