Module: Roby::EventStructure::TaskTemporalConstraints

Defined in:
lib/roby/event_structure/temporal_constraints.rb

Overview

Module defining shortcuts on tasks to use the temporal constraints

Instance Method Summary collapse

Instance Method Details

#should_start_after(task_or_event) ⇒ Object

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)



619
620
621
622
623
624
625
626
627
628
# 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