Skip to content

StudyDeploymentStatus

The status of a study deployment and of its devices and participants.

Returned by most DeploymentService calls and kept in Study.deploymentStatus on the client. A client reads deviceStatusList to see what is needed before its device can be deployed.

See StudyDeploymentStatus.kt.

Inheritance
Annotations

Constructors

StudyDeploymentStatus.fromJson

StudyDeploymentStatus.fromJson(
  1. Map<String, dynamic> json
)

StudyDeploymentStatus

StudyDeploymentStatus({
  1. required String studyDeploymentId,
  2. List<DeviceDeploymentStatus> deviceStatusList = const [],
})

Properties

createdOn

DateTime createdOn
getter/setter pair

The time when the deployment was created.

deviceStatusList

List<DeviceDeploymentStatus> deviceStatusList
getter/setter pair

The list of all devices part of this study deployment and their status.

fromJsonFunction

Function get fromJsonFunction
override

The function which can convert a JSON string to an object of this type.

jsonType

String get jsonType
override

Return the __type to be used for JSON serialization of this class. Default is runtimeType. Only specify this if you need another type.

participantStatusList

List<ParticipantStatus> participantStatusList
getter/setter pair

The list of all participants and their status in this study deployment.

startedOn

DateTime? startedOn
getter/setter pair

The time when the study deployment was ready for the first time (all devices deployed); null otherwise.

status

StudyDeploymentStatusTypes? status
getter/setter pair

The status of this study deployment:

  • Invited
  • DeployingDevices
  • Running
  • Stopped

When created from CARP Core JSON, it is read from the last part of the __type (e.g. ...StudyDeploymentStatus.Running).

studyDeploymentId

String studyDeploymentId
getter/setter pair

The CARP study deployment ID.

Methods

getDeviceStatus

Get the status of a device in this study deployment.

Throws a StateError if device is not in deviceStatusList.

getDeviceStatusByRoleName

DeviceDeploymentStatus getDeviceStatusByRoleName(
  1. String roleName
)

Get the status of a device with the given roleName in this study deployment.

Throws a StateError if no device has roleName.

toJson

Map<String, dynamic> toJson()
override

Return a JSON encoding of this object.

toString

String toString()
override

A string representation of this object.

Some classes have a default textual representation, often paired with a static parse function (like int.parse). These classes will provide the textual representation as their string representation.

Other classes have no meaningful textual representation that a program will care about. Such classes will typically override toString to provide useful information when inspecting the object, mainly for debugging or logging.