addTaskControls method

void addTaskControls(
  1. TriggerConfiguration trigger,
  2. List<TaskConfiguration> tasks,
  3. DeviceConfiguration<DeviceRegistration> destinationDevice, [
  4. Control control = Control.Start,
])

Add a list of tasks to be started or stopped (determined by control) on a destinationDevice once a trigger within this protocol is initiated. In case the trigger or tasks are not yet included in this study protocol, it will be added. The destinationDevice needs to be added prior to this call since it needs to be set up as either a primary device or connected device.

Implementation

void addTaskControls(
  TriggerConfiguration trigger,
  List<TaskConfiguration> tasks,
  DeviceConfiguration destinationDevice, [
  Control control = Control.Start,
]) {
  for (TaskConfiguration task in tasks) {
    addTaskControl(trigger, task, destinationDevice, control);
  }
}