Class: ROS::ParameterSubscriber
- Inherits:
-
Object
- Object
- ROS::ParameterSubscriber
- Defined in:
- lib/ros/parameter_subscriber.rb
Overview
callback object for paramUpdate
Instance Attribute Summary collapse
-
#key ⇒ Object
key of parameter for subscription.
Instance Method Summary collapse
-
#call(value) ⇒ Object
callback with param value.
-
#initialize(key, callback) ⇒ ParameterSubscriber
constructor
do not make instance directory.
-
#set_manager(manager) ⇒ Object
set GraphManager for management.
-
#shutdown ⇒ Object
shutdown this subscription.
Constructor Details
#initialize(key, callback) ⇒ ParameterSubscriber
do not make instance directory. Plese use Node#subscribe_parameter.
21 22 23 24 |
# File 'lib/ros/parameter_subscriber.rb', line 21 def initialize(key, callback) @key = key @callback = callback end |
Instance Attribute Details
#key ⇒ Object
key of parameter for subscription
44 45 46 |
# File 'lib/ros/parameter_subscriber.rb', line 44 def key @key end |
Instance Method Details
#call(value) ⇒ Object
callback with param value
28 29 30 |
# File 'lib/ros/parameter_subscriber.rb', line 28 def call(value) @callback.call(value) end |
#set_manager(manager) ⇒ Object
set GraphManager for management
34 35 36 |
# File 'lib/ros/parameter_subscriber.rb', line 34 def set_manager(manager) #:nodoc @manager = manager end |
#shutdown ⇒ Object
shutdown this subscription
39 40 41 |
# File 'lib/ros/parameter_subscriber.rb', line 39 def shutdown @manager.shutdown_parameter_subscriber(self) end |