Method: Visualization_msgs::ImageMarker#serialize

Defined in:
lib/visualization_msgs/ImageMarker.rb

#serialize(buff) ⇒ Object

serialize message into buffer

Parameters:

  • buff (IO)

    buffer



195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
# File 'lib/visualization_msgs/ImageMarker.rb', line 195

def serialize(buff)
  begin
    buff.write(@@struct_L3.pack(@header.seq, @header.stamp.secs, @header.stamp.nsecs))
    _x = @header.frame_id
    length = _x.length
    buff.write([length, _x].pack("La#{length}"))
    _x = @ns
    length = _x.length
    buff.write([length, _x].pack("La#{length}"))
    buff.write(@@struct_l3d3f5Cf4l2.pack(@id, @type, @action, @position.x, @position.y, @position.z, @scale, @outline_color.r, @outline_color.g, @outline_color.b, @outline_color.a, @filled, @fill_color.r, @fill_color.g, @fill_color.b, @fill_color.a, @lifetime.secs, @lifetime.nsecs))
    length = @points.length
    buff.write(@@struct_L.pack(length))
    for val1 in @points
      _x = val1
      buff.write(@@struct_d3.pack(_x.x, _x.y, _x.z))
    end
    length = @outline_colors.length
    buff.write(@@struct_L.pack(length))
    for val1 in @outline_colors
      _x = val1
      buff.write(@@struct_f4.pack(_x.r, _x.g, _x.b, _x.a))
    end
  rescue => exception
    raise "some erro in serialize: #{exception}"

  end
end