Module: Roby::TaskStructure::ExecutionAgentStart

Defined in:
lib/roby/task_structure/executed_by.rb

Overview

This module is hooked in Roby::TaskEventGenerator to check that a task which is being started has a suitable execution agent, and to start it if it’s not the case

Defined Under Namespace

Modules: Installer

Instance Method Summary collapse

Instance Method Details

#calling(context) ⇒ Object



219
220
221
222
223
224
225
226
227
228
229
230
# File 'lib/roby/task_structure/executed_by.rb', line 219

def calling(context)
    super

    agent = task.execution_agent
    if !agent
        if task.model.execution_agent
            raise MissingRequiredExecutionAgent.new(task), "the model of #{task} requires an execution agent, but the task has none"
        end
    elsif !agent.ready?
        raise ExecutionAgentNotReady.new(task), "cannot start #{task}, its agent is not ready"
    end
end