getDeviceStatus method

Get the status of a device in this StudyDeployment.

Implementation

DeviceDeploymentStatus getDeviceStatus(DeviceConfiguration device) {
  DeviceDeploymentStatus deviceStatus =
      DeviceDeploymentStatus(device: device);

  deviceStatus.status = DeviceDeploymentStatusTypes.Unregistered;
  if (_registeredDevices.containsKey(device.roleName)) {
    deviceStatus.status = DeviceDeploymentStatusTypes.Registered;
  }
  if (_deployedDevices.contains(device.roleName)) {
    deviceStatus.status = DeviceDeploymentStatusTypes.Deployed;
  }

  return deviceStatus;
}