Class: Orocos::Async::ROS::Node
- Inherits:
-
TaskContextBase
- Object
- ObjectBase
- TaskContextBase
- Orocos::Async::ROS::Node
- Defined in:
- lib/orocos/ros/async.rb
Overview
Async access to ROS nodes
Instance Attribute Summary
Attributes inherited from TaskContextBase
Attributes included from ObjectBase::Periodic::ClassMethods
Attributes inherited from ObjectBase
#emitting, #event_loop, #name, #options, #pending_adds
Instance Method Summary collapse
- #access_remote_task_context ⇒ Object
- #configure_delegation(options) ⇒ Object
-
#initialize(name_service, server, name, options = Hash.new) ⇒ Node
constructor
A new instance of Node.
Methods inherited from TaskContextBase
#attribute, #call_with_async, #clear_interface, #each_attribute, #each_port, #each_property, #name, #port, #property, #reachable!, #reachable?, #really_add_listener, #ruby_task_context?, #to_async, #to_proxy, to_ruby, #to_ruby, #unreachable!
Methods included from ObjectBase::Periodic
#default_period, #period, #period=
Methods inherited from ObjectBase
#add_listener, define_event, define_events, #disable_emitting, #event, event_names, #event_names, #invalidate_delegator!, #listener?, #listeners, #number_of_listeners, #on_event, #proxy_event, #reachable!, #reachable?, #really_add_listener, #remove_all_listeners, #remove_listener, #remove_proxy_event, #unreachable!, #valid_delegator?, valid_event?, #valid_event?, validate_event, #validate_event, #wait
Constructor Details
#initialize(name_service, server, name, options = Hash.new) ⇒ Node
Returns a new instance of Node
21 22 23 |
# File 'lib/orocos/ros/async.rb', line 21 def initialize(name_service, server, name, = Hash.new) super(name, .merge(:name_service => name_service, :server => server, :name => name)) end |
Instance Method Details
#access_remote_task_context ⇒ Object
40 41 42 |
# File 'lib/orocos/ros/async.rb', line 40 def access_remote_task_context Orocos::ROS::Node.new(@name_service, @server, @name) end |
#configure_delegation(options) ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/orocos/ros/async.rb', line 25 def configure_delegation() = Kernel. , :name_service, :server, :name @name_service, @server, @name = if !valid_delegator? [[:name_service], [:server], [:name]] else [@delegator_obj.name_service, @delegator_obj.server, @delegator_obj.name] end if !@name_service || !@server || !@name raise ArgumentError, "cannot resolve a proper name_service/ROS master/name tuple" end end |