getTriggeredTasks method
Gets all the tasks (and the devices they are triggered to) for the
specified trigger
.
Implementation
Set<TriggeredTask> getTriggeredTasks(Trigger trigger) {
assert(triggers.values.contains(trigger),
'The passed trigger is not part of this study protocol.');
int triggerId = indexOfTrigger(trigger);
Set<TriggeredTask> tt = {};
// search the list of triggered tasks
for (var triggeredTask in triggeredTasks) {
if (triggeredTask.triggerId == triggerId) {
tt.add(triggeredTask);
}
}
return tt;
}