CustomProtocolDeploymentService class

A DeploymentService that works with the CarpStudyProtocolManager to handle a MasterDeviceDeployment based on a SmartphoneStudyProtocol, which is stored as a custom protocol on the CARP server.

This deployment service basically reads a SmartphoneStudyProtocol as a custom protocol from the CARP web server, and translate this into a SmartphoneDeployment, which can be used on this phone.

The SmartphoneDeployment.userId will be set to the CarpUser.accountId of the user logged in and downloading the protocol. This id will be used as the DataPointHeader.userId when uploading data back to CARP.

Constructors

CustomProtocolDeploymentService()
factory

Properties

carpBackendEvents Stream
The stream of CarpBackendEvents reflecting the state of this service.
no setter
hashCode int
The hash code for this object.
no setterinherited
manager CarpStudyProtocolManager
getter/setter pair
protocol ↔ SmartphoneStudyProtocol
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addCarpBackendEvent(CarpBackendEvents event) → void
createStudyDeployment(StudyProtocol protocol, [String? studyDeploymentId]) Future<StudyDeploymentStatus>
Create a new StudyDeployment based on a StudyProtocol. studyDeploymentId specifies the study deployment id. If not specified, an UUID v1 id is generated.
override
deploymentSuccessfulFor(String studyDeploymentId, String masterDeviceRoleName, DateTime deviceDeploymentLastUpdateDate) Future<StudyDeploymentStatus>
Indicate to stakeholders in the study deployment with studyDeploymentId that the device with masterDeviceRoleName was deployed successfully, using the deployment with the specified deviceDeploymentLastUpdateDate, i.e., that the study deployment was loaded on the device and that the necessary runtime is available to run it.
override
getDeviceDeploymentFor(String studyDeploymentId, String masterDeviceRoleName) Future<MasterDeviceDeployment>
Get the deployment configuration for the master device with masterDeviceRoleName in the study deployment with studyDeploymentId.
override
getStudyDeploymentStatus(String studyDeploymentId) Future<StudyDeploymentStatus>
Get the status for a study deployment with the given studyDeploymentId.
override
getStudyDeploymentStatusList(List<String> studyDeploymentIds) Future<List<StudyDeploymentStatus>>
Get the statuses for a set of deployments with the specified studyDeploymentIds.
override
isConfigured() bool
Is this service configured and authenticated to CARP?
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerDevice(String studyDeploymentId, String deviceRoleName, DeviceRegistration registration) Future<StudyDeploymentStatus>
Register the device with the specified deviceRoleName for the study deployment with studyDeploymentId.
override
removeStudyDeployments(Set<String> studyDeploymentIds) Future<Set<String>>
Remove study deployments with the given studyDeploymentIds.
override
stop(String studyDeploymentId) Future<StudyDeploymentStatus>
Permanently stop the study deployment with the specified studyDeploymentId. No further changes to this deployment will be allowed and no more data will be collected.
override
toString() String
A string representation of this object.
override
unregisterDevice(String studyDeploymentId, String deviceRoleName) Future<StudyDeploymentStatus>
Unregister the device with the specified deviceRoleName for the study deployment with studyDeploymentId.
override

Operators

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