Class: Tf::FrameGraphResponse
- Inherits:
-
ROS::Message
- Object
- ROS::Message
- Tf::FrameGraphResponse
- Defined in:
- lib/tf/FrameGraph.rb
Constant Summary collapse
- @@struct_L =
::ROS::Struct.new("L")
- @@slot_types =
['string']
Instance Attribute Summary collapse
-
#dot_graph ⇒ Object
Returns the value of attribute dot_graph.
Class Method Summary collapse
Instance Method Summary collapse
-
#_get_types ⇒ String
internal API method.
-
#deserialize(str) ⇒ Object
unpack serialized message in str into this message instance @param [String] str: byte array of serialized message.
- #has_header? ⇒ Boolean
-
#initialize(args = {}) ⇒ FrameGraphResponse
constructor
Constructor.
- #message_definition ⇒ Object
-
#serialize(buff) ⇒ Object
serialize message into buffer.
Constructor Details
#initialize(args = {}) ⇒ FrameGraphResponse
Constructor. You can set the default values using keyword operators.
101 102 103 104 105 106 107 108 |
# File 'lib/tf/FrameGraph.rb', line 101 def initialize(args={}) # message fields cannot be None, assign default values for those that are if args[:dot_graph] @dot_graph = args[:dot_graph] else @dot_graph = '' end end |
Instance Attribute Details
#dot_graph ⇒ Object
Returns the value of attribute dot_graph.
91 92 93 |
# File 'lib/tf/FrameGraph.rb', line 91 def dot_graph @dot_graph end |
Class Method Details
.md5sum ⇒ Object
73 74 75 |
# File 'lib/tf/FrameGraph.rb', line 73 def self.md5sum "c4af9ac907e58e906eb0b6e3c58478c0" end |
.type ⇒ Object
77 78 79 |
# File 'lib/tf/FrameGraph.rb', line 77 def self.type "tf/FrameGraphResponse" end |
Instance Method Details
#_get_types ⇒ String
internal API method
112 113 114 |
# File 'lib/tf/FrameGraph.rb', line 112 def _get_types @slot_types end |
#deserialize(str) ⇒ Object
unpack serialized message in str into this message instance
@param [String] str: byte array of serialized message
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
# File 'lib/tf/FrameGraph.rb', line 131 def deserialize(str) begin end_point = 0 start = end_point end_point += 4 (length,) = @@struct_L.unpack(str[start..(end_point-1)]) start = end_point end_point += length @dot_graph = str[start..(end_point-1)] return self rescue => exception raise "message DeserializationError: #{exception}" #most likely buffer underfill end end |
#has_header? ⇒ Boolean
81 82 83 |
# File 'lib/tf/FrameGraph.rb', line 81 def has_header? false end |
#message_definition ⇒ Object
85 86 87 88 89 90 |
# File 'lib/tf/FrameGraph.rb', line 85 def "string dot_graph " end |
#serialize(buff) ⇒ Object
serialize message into buffer
118 119 120 121 122 123 124 125 126 127 |
# File 'lib/tf/FrameGraph.rb', line 118 def serialize(buff) begin _x = @dot_graph length = _x.length buff.write([length, _x].pack("La#{length}")) rescue => exception raise "some erro in serialize: #{exception}" end end |