parameters: (self, buff)
docstring: serialize message into buffer
      :param buff: buffer, ``StringIO``
docstring_summary: serialize message into buffer
      :param buff: buffer, ``StringIO``
docstring_tokens: serialize message into buffer : param buff : buffer StringIO
function: def serialize(self, buff):
      """
      serialize message into buffer
      :param buff: buffer, ``StringIO``
      """
      try:
        _x = self
        buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
        _x = self.header.frame_id
        length = len(_x)
        if python3 or type(_x) == unicode:
          _x = _x.encode('utf-8')
          length = len(_x)
        if python3:
          buff.write(struct.pack('<I%sB'%length, length, *_x))
        else:
          buff.write(struct.pack('<I%ss'%length, length, _x))
        _x = self
        buff.write(_struct_2B.pack(_x.channel, _x.type))
        _x = self.data
        length = len(_x)
        # - if encoded as a list instead, serialize as bytes instead of string
        if type(_x) in [list, tuple]:
          buff.write(struct.pack('<I%sB'%length, length, *_x))
        else:
          buff.write(struct.pack('<I%ss'%length, length, _x))
      except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
      except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
function_tokens: def serialize ( self , buff ) : try : _x = self buff . write ( _struct_3I . pack ( _x . header . seq , _x . header . stamp . secs , _x . header . stamp . nsecs ) ) _x = self . header . frame_id length = len ( _x ) if python3 or type ( _x ) == unicode : _x = _x . encode ( 'utf-8' ) length = len ( _x ) if python3 : buff . write ( struct . pack ( '<I%sB' % length , length , * _x ) ) else : buff . write ( struct . pack ( '<I%ss' % length , length , _x ) ) _x = self buff . write ( _struct_2B . pack ( _x . channel , _x . type ) ) _x = self . data length = len ( _x ) # - if encoded as a list instead, serialize as bytes instead of string if type ( _x ) in [ list , tuple ] : buff . write ( struct . pack ( '<I%sB' % length , length , * _x ) ) else : buff . write ( struct . pack ( '<I%ss' % length , length , _x ) ) except struct . error as se : self . _check_types ( struct . error ( "%s: '%s' when writing '%s'" % ( type ( se ) , str ( se ) , str ( _x ) ) ) ) except TypeError as te : self . _check_types ( ValueError ( "%s: '%s' when writing '%s'" % ( type ( te ) , str ( te ) , str ( _x ) ) ) )