module Roby::TaskStructure::PlannedBy::Extension
Public Instance Methods
planned_by(task, replace: false, optional: false, plan_early: true)
click to toggle source
Set
task
as the planning task of self
# File lib/roby/task_structure/planned_by.rb, line 19 def planned_by(task, replace: false, optional: false, plan_early: true) if task.respond_to?(:as_plan) task = task.as_plan end if old = planning_task if replace remove_planning_task(old) else raise ArgumentError, "this task already has a planner" end end add_planning_task(task, optional: optional, plan_early: true) if !plan_early task.schedule_as(self) end task end
planned_task()
click to toggle source
Returns the first child enumerated by planned_tasks. This is a convenience method that can be used if it is known that the planning task is only planning for one single task (a pretty common case)
# File lib/roby/task_structure/planned_by.rb, line 13 def planned_task each_in_neighbour_merged(PlannedBy, intrusive: true).first end
planned_tasks()
click to toggle source
The set of tasks which are planned by this one
# File lib/roby/task_structure/planned_by.rb, line 17 def planned_tasks; parent_objects(PlannedBy) end