StudyDeployment class
A single instantiation of a StudyProtocol, taking care of common concerns related to devices when 'running' a study.
I.e., a StudyDeployment is responsible for registering the physical devices described in the StudyProtocol, building the PrimaryDeviceDeployment for each primary device, and tracking device registration and deployment status. Connection monitoring and data-quality assessment (part of the Kotlin CARP Core) are not implemented here. It lives on the deployment side, i.e. in a DeploymentService implementation; a client only sees its status and the PrimaryDeviceDeployment it creates.
Key points:
- Lifecycle: registerDevice -> getDeviceDeploymentFor -> deviceDeployed -> stop, reflected in StudyDeploymentStatus.status (see StudyDeploymentStatusTypes).
- getDeviceDeploymentFor asserts (in debug mode) that the device is part of the protocol and registered, and marks all registered devices as deployed.
- This Dart version is simpler than the Kotlin one; e.g., it does not check that all devices are ready before running.
Constructors
- StudyDeployment(StudyProtocol protocol, [String? studyDeploymentId])
-
Create a new StudyDeployment based on a StudyProtocol.
studyDeploymentIdspecifies the study deployment id. If not specified, a UUID v4 id is generated.
Properties
- creationDate → DateTime
-
no setter
-
deployedDevices
→ Set<
String?> -
The set of devices (role names) which have been deployed correctly.
no setter
-
deviceRegistrationHistory
→ Map<
DeviceConfiguration< DeviceRegistration> , List<DeviceRegistration> > -
Per device, a list of all device registrations (included old registrations)
in the order they were registered.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
invalidatedDeployedDevices
→ Set<
DeviceConfiguration< DeviceRegistration> > -
no setter
- isStopped → bool
-
Whether stop has been called. This is only a flag: later calls
can still modify the deployment.
no setter
- protocol → StudyProtocol
-
no setter
-
registeredDevices
→ Map<
DeviceConfiguration< DeviceRegistration> , DeviceRegistration> -
The set of devices which are currently registered for this study deployment.
no setter
- requiredDataStreams → DataStreamsConfiguration
-
All the data streams which are required to run this study deployment.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- startTime → DateTime?
-
The time when the study deployment was ready for the first
time (all devices deployed); null otherwise.
no setter
- status → StudyDeploymentStatus
-
Get the status of this StudyDeployment, with the current status of
all primary and connected devices.
no setter
- studyDeploymentId → String
-
no setter
Methods
-
deviceDeployed(
PrimaryDeviceConfiguration< DeviceRegistration> device, DateTime deviceDeploymentLastUpdateDate) → void -
Indicate that the specified primary
devicewas deployed successfully using the deployment with the specifieddeviceDeploymentLastUpdateDate. -
getDeviceDeploymentFor(
PrimaryDeviceConfiguration< DeviceRegistration> device) → PrimaryDeviceDeployment -
Get the deployment configuration for the specified primary
devicein this study deployment. -
getDeviceStatus(
DeviceConfiguration< DeviceRegistration> device) → DeviceDeploymentStatus - Get the status of a device in this StudyDeployment.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerDevice(
DeviceConfiguration< DeviceRegistration> device, DeviceRegistration registration) → void -
Register the specified
devicefor this deployment using theregistrationoptions. -
stop(
) → void - Mark this study deployment as stopped; no more data should be collected. This does not block further changes to the deployment.
-
toString(
) → String -
A string representation of this object.
inherited
-
unregisterDevice(
DeviceConfiguration< DeviceRegistration> device) → void -
Remove the current device registration for the
devicein this deployment.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited