class Roby::Coordination::Models::TaskFromAsPlan
Definition of a state from an object that responds to instanciate
Attributes
instanciation_object[R]
@return [#instanciate] the object that will be used to generate
the state's task when needed
Public Class Methods
new(instanciation_object, task_model)
click to toggle source
@param [#instanciate] instanciation_object
this object will be
used to generate the task that will perform the state's action. It will be called with #instanciate(plan)
@param [Model<Roby::Task>] task_model the model of the task
returned by the instanciation object
Calls superclass method
# File lib/roby/coordination/models/task_from_as_plan.rb, line 15 def initialize(instanciation_object, task_model) super(task_model) @instanciation_object = instanciation_object end
Public Instance Methods
instanciate(plan, variables = Hash.new)
click to toggle source
Called by the state machine implementation to create a Roby::Task
instance that will perform the state's actions
# File lib/roby/coordination/models/task_from_as_plan.rb, line 22 def instanciate(plan, variables = Hash.new) plan.add(task = instanciation_object.as_plan) task end
to_s()
click to toggle source
# File lib/roby/coordination/models/task_from_as_plan.rb, line 27 def to_s; "#{instanciation_object}[#{model}]" end