module Roby::EventStructure::TaskTemporalConstraints

Module defining shortcuts on tasks to use the temporal constraints

Public Instance Methods

should_start_after(task_or_event) click to toggle source

Ensures that this task is started after task_or_event has finished (if it is a task) or task_or_event is emitted (if it is an event)

# File lib/roby/event_structure/temporal_constraints.rb, line 619
def should_start_after(task_or_event)
    case task_or_event
    when Roby::Task
        start_event.should_emit_after(task_or_event.stop_event)
    when Roby::EventGenerator
        start_event.should_emit_after(task_or_event)
    else
        raise ArgumentError, "expected a task or an event generator, got #{task_or_event} of class #{task_or_event.class}"
    end
end