class Syskit::Coordination::OutputPort

Public Instance Methods

reader(policy = Hash.new) click to toggle source
Calls superclass method Syskit::OutputPort#reader
# File lib/syskit/coordination/port_handling.rb, line 42
def reader(policy = Hash.new)
    # The 'rescue' case is used only on first evaluation of the
    # block, when Roby instanciates it to check syntax.
    # The script blocks have to be re-instanciated for each
    # task they get applied on
    begin
        component.resolve
        root_task = component.root_task.resolve
        reader = super
        root_task.stop_event.on { |_| reader.disconnect }
        reader
    rescue Roby::Coordination::ResolvingUnboundObject
        Syskit::Models::OutputReader.new(self, policy)
    end
end