Class: ROS::Master::Subscriber

Inherits:
Object
  • Object
show all
Defined in:
lib/ros/master.rb

Overview

subscriber of topic

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (Subscriber) initialize(caller_id, topic_name, topic_type, api)

Returns a new instance of Subscriber

Parameters:

  • caller_id (String)

    caller_id of subscriber node

  • topic_name (String)

    name of topic

  • api (String)

    XMLRPC URI of subscriber node



103
104
105
106
107
108
# File 'lib/ros/master.rb', line 103

def initialize(caller_id, topic_name, topic_type, api)
  @caller_id = caller_id
  @name = topic_name
  @msg_type = topic_type
  @api = api
end

Instance Attribute Details

- (String) api

Get XMLRPC URI.

Returns:

  • (String)

    URI of this publisher (XMLRPC URI)



124
125
126
# File 'lib/ros/master.rb', line 124

def api
  @api
end

- (String) caller_id

Get caller_id.

Returns:

  • (String)

    caller_id



112
113
114
# File 'lib/ros/master.rb', line 112

def caller_id
  @caller_id
end

- (String) msg_type

Get type of topic.

Returns:

  • (String)

    type of topic in String.



120
121
122
# File 'lib/ros/master.rb', line 120

def msg_type
  @msg_type
end

- (String) name

Get the name of topic.

Returns:

  • (String)

    name of topic.



116
117
118
# File 'lib/ros/master.rb', line 116

def name
  @name
end