registerPrimaryDevice method
Register this device as the primary device for this deployment at the CARP server.
Returns the updated study deployment status if the registration is successful. Throws a CarpServiceException if not.
Implementation
Future<StudyDeploymentStatus> registerPrimaryDevice() async {
assert(
status != null,
'The status of a deployment must be know before a primary device can be registered. '
'Use the getStatus() method to get the deployment status');
return registerDevice(
deviceRoleName: status!.primaryDeviceStatus!.device.roleName,
registration: DefaultDeviceRegistration(
deviceId: DeviceInfo().deviceID,
deviceDisplayName: DeviceInfo().toString(),
));
}