class Orocos::OutputReader
Local input port that is specifically designed to read to another task's output port
Attributes
The policy of the connection
The port this object is reading from
Public Instance Methods
Disconnects this port from the port it is reading
# File lib/orocos/output_reader.rb, line 61 def disconnect disconnect_all end
Reads a sample on the associated output port. Returns a value as soon as a sample has ever been written to the port since the data reader has been created
@raise [CORBA::ComError] if the remote process is known to be dead. This is only possible if the remote deployment has been started by this Ruby instance
# File lib/orocos/output_reader.rb, line 31 def read(sample = nil) if !policy[:pull] Orocos.allow_blocking_calls do # Non-pull readers are non-blocking super end else super end end
Helper method for read and read_new
This is overloaded in OutputReader to raise CORBA::ComError if the process supporting the remote task is known to be dead
# File lib/orocos/output_reader.rb, line 14 def read_helper(sample, copy_old_data) if process = port.task.process if !process.alive? disconnect_all raise CORBA::ComError, "remote end is dead" end end super end
Reads a sample on the associated output port, and returns nil if no new data is available
@raise [CORBA::ComError] if the remote process is known to be dead. This is only possible if the remote deployment has been started by this Ruby instance @see read
# File lib/orocos/output_reader.rb, line 49 def read_new(sample = nil) if !policy[:pull] Orocos.allow_blocking_calls do # Non-pull readers are non-blocking super end else super end end