class Syskit::OutputReader
A data source for a port attached to a component
Attributes
reader[R]
The actual data reader itself @return [Orocos::OutputReader]
Public Instance Methods
connected?()
click to toggle source
# File lib/syskit/port.rb, line 310 def connected? reader && reader.connected? end
disconnect()
click to toggle source
# File lib/syskit/port.rb, line 287 def disconnect @disconnected = true if actual_reader = self.reader actual_port.component.execution_engine.promise(description: "disconnect #{self}") do begin actual_reader.disconnect rescue Orocos::ComError end end.on_success { @reader = nil }.execute end end
model()
click to toggle source
# File lib/syskit/port.rb, line 276 def model Models::OutputReader.new(port.model, policy) end
read()
click to toggle source
# File lib/syskit/port.rb, line 302 def read reader.read if reader end
read_new()
click to toggle source
# File lib/syskit/port.rb, line 298 def read_new reader.read_new if reader end
ready?()
click to toggle source
# File lib/syskit/port.rb, line 306 def ready? reader && actual_port.component.running? end
resolve(main, port)
click to toggle source
@api private
Resolves the underlying reader object
Calls superclass method
# File lib/syskit/port.rb, line 283 def resolve(main, port) super(main, port, :reader) { |r| @reader = r } end