class Roby::Actions::Task

A task that calls an action interface to generate a plan

Attributes

result[R]

The planner result. It is either an exception or a task object

transaction[R]

Once the task has been started, this is the transaction object that is being used / has been used to generate before committing in the plan @return [Transaction]

Public Instance Methods

action_interface_model() click to toggle source

The action interface model used by this planner @return [Model<Interface>]

# File lib/roby/actions/task.rb, line 31
def action_interface_model
    action_model.action_interface_model
end
job_name() click to toggle source
# File lib/roby/actions/task.rb, line 35
def job_name
    formatted_arguments = (action_arguments || Hash.new).map do |k, v|
        "#{k} => #{v}"
    end.join(", ")
    "#{action_model}(#{formatted_arguments})"
end
planned_model() click to toggle source

The model of the roby task that is going to represent the action in the plan @return [Model<Roby::Task>]

# File lib/roby/actions/task.rb, line 25
def planned_model
    action_model.returned_task_type
end
planning_result_task() click to toggle source
# File lib/roby/actions/task.rb, line 49
def planning_result_task
    if success? || result
        result
    elsif task = planned_tasks.find { true }
        task
    elsif pending?
        task = planned_model.new
        task.planned_by self
        task.abstract = true
        task
    end
end
to_s() click to toggle source
# File lib/roby/actions/task.rb, line 42
def to_s
    if action_model
        "#{super}[#{action_interface_model}:#{action_model}](#{action_arguments}) -> #{action_model.returned_type}"
    else "#{super}"
    end
end