class Orocos::RobyPlugin::EngineRequirement

Represents a requirement created by Orocos::RobyPlugin::Engine#add or Orocos::RobyPlugin::Engine#define

Attributes

replaces[RW]
state_copies[R]

A set of ports on the task that should be automatically copied to the State object

task[RW]

The actual task. It is set after #resolve has been called

Public Class Methods

new(name, models) click to toggle source
Calls superclass method
# File lib/orocos/roby/engine.rb, line 124
def initialize(name, models)
    super(models)
    @name = name
    @state_copies = Array.new
end

Public Instance Methods

copy_to_state(port_name, *state_path, &filter_block) click to toggle source

Requires that the values that are output on port_name on this deployed component are copied onto the State object

For instance, if a pose estimation is setup with

add(Cmp::PoseEstimator).
    copy_to_state('pose_samples', 'pose')

then the pose samples generated by the composition are copied on State.pose as soon as the composition runs

# File lib/orocos/roby/engine.rb, line 153
def copy_to_state(port_name, *state_path, &filter_block)
    @state_copies << [port_name, state_path, filter_block]
    self
end
initialize_copy(old) click to toggle source
Calls superclass method
# File lib/orocos/roby/engine.rb, line 130
def initialize_copy(old)
    super
    @state_copies = old.state_copies.dup
end
instanciate(engine, context) click to toggle source
Calls superclass method
# File lib/orocos/roby/engine.rb, line 135
def instanciate(engine, context)
    task = super
    @state_copies.each do |port_name, state_path, filter_block|
        @task.copy_to_state(port_name, *state_path, &filter_block)
    end
    task
end
mission?() click to toggle source

True if the component should be marked as a mission in the plan manager. It is set to true by Orocos::RobyPlugin::Engine#add_mission

# File lib/orocos/roby/engine.rb, line 120
attr_predicate :mission, true