module Roby::TaskStructure::ExecutionAgent::ModelExtension

This module defines model-level definition of execution agent, for instance to Roby::Task

Public Instance Methods

executed_by(agent_model, arguments = Hash.new) click to toggle source

Defines a model of execution agent. Doing

TaskModel.executed_by ExecutionAgentModel

is equivalent to

task = TaskModel.new
exec = <find a suitable ExecutionAgentModel instance in the plan or
       create a new one>
task.executed_by exec

for all instances of TaskModel. The actual job is done in the ExecutionAgentSpawn module

# File lib/roby/task_structure/executed_by.rb, line 99
def executed_by(agent_model, arguments = Hash.new)
    @execution_agent = [agent_model, arguments]
end
execution_agent() click to toggle source

The model of execution agent for this class

# File lib/roby/task_structure/executed_by.rb, line 77
def execution_agent
    for klass in ancestors
        if klass.instance_variable_defined?(:@execution_agent)
            return klass.instance_variable_get(:@execution_agent)
        end
    end
    nil
end