class Orocos::InputPort
This class represents output ports on remote task contexts.
They are obtained from Orocos::TaskContext#port or Orocos::TaskContextBase#each_port
Public Class Methods
new(task, name, orocos_type_name, model)
click to toggle source
Calls superclass method
Orocos::PortBase.new
# File lib/orocos/input_port.rb, line 14 def initialize(task, name, orocos_type_name, model) super @blocking_read = false end
writer_class()
click to toggle source
Used by InputPortWriteAccess to determine which class should be used to create the writer
# File lib/orocos/input_port.rb, line 21 def self.writer_class InputWriter end
Public Instance Methods
subscribe_to_ros(topic_name = default_ros_topic_name, policy = Hash.new)
click to toggle source
Subscribes this port on a ROS topic
# File lib/orocos/ros/ports.rb, line 25 def subscribe_to_ros(topic_name = default_ros_topic_name, policy = Hash.new) if topic_name.kind_of?(Hash) topic_name, policy = default_ros_topic_name, topic_name end create_stream(Orocos::TRANSPORT_ROS, topic_name, policy) end
to_async(options = Hash.new)
click to toggle source
# File lib/orocos/async/orocos.rb, line 53 def to_async(options = Hash.new) if use = options.delete(:use) Orocos::Async::CORBA::InputPort.new(use,self,options) else to_async(Hash[:use => task.to_async].merge(options)) end end
to_proxy(options = Hash.new)
click to toggle source
# File lib/orocos/async/orocos.rb, line 60 def to_proxy(options = Hash.new) task.to_proxy(options).port(name,:type => type) end
unsubscribe_from_ros(topic_name = "
click to toggle source
Subscribes this port from a ROS topic
# File lib/orocos/ros/ports.rb, line 33 def unsubscribe_from_ros(topic_name = "#{task.name}/#{self.name}") remove_stream(topic_name) end