module Roby::TaskStructure::Conflicts::EventGeneratorExtension
Public Instance Methods
calling(context)
click to toggle source
Calls superclass method
# File lib/roby/task_structure/conflicts.rb, line 31 def calling(context) super return unless symbol == :start # Check for conflicting tasks result = Set.new task.each_conflicts do |conflicting_task| result << conflicting_task end models = task.class.conflicting_models for model in models for t in plan.find_tasks(model) if t.running? && t != task result << t end end end if !result.empty? plan.control.conflict(task, result) return end # Add the needed conflict relations models = task.class.conflicting_models for model in models for t in plan.find_tasks(model) t.conflicts_with task if t.pending? && t != task end end end
fired(event)
click to toggle source
Calls superclass method
# File lib/roby/task_structure/conflicts.rb, line 64 def fired(event) super if symbol == :stop task.relation_graph_for(Conflicts).remove_vertex(task) end end