# This Python file uses the following encoding: utf-8
"""autogenerated by genpy from uavatt_ros/set_gtmrp_geomRequest.msg. Do not edit."""
import codecs
import sys
python3 = True if sys.hexversion > 0x03000000 else False
import genpy
import struct


class set_gtmrp_geomRequest(genpy.Message):
  _md5sum = "5f373a78315ca8616f72d487967b2c0f"
  _type = "uavatt_ros/set_gtmrp_geomRequest"
  _has_header = False  # flag to mark the presence of a Header object
  _full_text = """# service set_gtmrp_geom
uint16 rotors
float64 cx
float64 cy
float64 cz
float64 armlen
float64 mass
float64 rx
float64 ry
int16 rz
float64 cf
float64 ct
"""
  __slots__ = ['rotors','cx','cy','cz','armlen','mass','rx','ry','rz','cf','ct']
  _slot_types = ['uint16','float64','float64','float64','float64','float64','float64','float64','int16','float64','float64']

  def __init__(self, *args, **kwds):
    """
    Constructor. Any message fields that are implicitly/explicitly
    set to None will be assigned a default value. The recommend
    use is keyword arguments as this is more robust to future message
    changes.  You cannot mix in-order arguments and keyword arguments.

    The available fields are:
       rotors,cx,cy,cz,armlen,mass,rx,ry,rz,cf,ct

    :param args: complete set of field values, in .msg order
    :param kwds: use keyword arguments corresponding to message field names
    to set specific fields.
    """
    if args or kwds:
      super(set_gtmrp_geomRequest, self).__init__(*args, **kwds)
      # message fields cannot be None, assign default values for those that are
      if self.rotors is None:
        self.rotors = 0
      if self.cx is None:
        self.cx = 0.
      if self.cy is None:
        self.cy = 0.
      if self.cz is None:
        self.cz = 0.
      if self.armlen is None:
        self.armlen = 0.
      if self.mass is None:
        self.mass = 0.
      if self.rx is None:
        self.rx = 0.
      if self.ry is None:
        self.ry = 0.
      if self.rz is None:
        self.rz = 0
      if self.cf is None:
        self.cf = 0.
      if self.ct is None:
        self.ct = 0.
    else:
      self.rotors = 0
      self.cx = 0.
      self.cy = 0.
      self.cz = 0.
      self.armlen = 0.
      self.mass = 0.
      self.rx = 0.
      self.ry = 0.
      self.rz = 0
      self.cf = 0.
      self.ct = 0.

  def _get_types(self):
    """
    internal API method
    """
    return self._slot_types

  def serialize(self, buff):
    """
    serialize message into buffer
    :param buff: buffer, ``StringIO``
    """
    try:
      _x = self
      buff.write(_get_struct_H7dh2d().pack(_x.rotors, _x.cx, _x.cy, _x.cz, _x.armlen, _x.mass, _x.rx, _x.ry, _x.rz, _x.cf, _x.ct))
    except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
    except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))

  def deserialize(self, str):
    """
    unpack serialized message in str into this message instance
    :param str: byte array of serialized message, ``str``
    """
    if python3:
      codecs.lookup_error("rosmsg").msg_type = self._type
    try:
      end = 0
      _x = self
      start = end
      end += 76
      (_x.rotors, _x.cx, _x.cy, _x.cz, _x.armlen, _x.mass, _x.rx, _x.ry, _x.rz, _x.cf, _x.ct,) = _get_struct_H7dh2d().unpack(str[start:end])
      return self
    except struct.error as e:
      raise genpy.DeserializationError(e)  # most likely buffer underfill


  def serialize_numpy(self, buff, numpy):
    """
    serialize message with numpy array types into buffer
    :param buff: buffer, ``StringIO``
    :param numpy: numpy python module
    """
    try:
      _x = self
      buff.write(_get_struct_H7dh2d().pack(_x.rotors, _x.cx, _x.cy, _x.cz, _x.armlen, _x.mass, _x.rx, _x.ry, _x.rz, _x.cf, _x.ct))
    except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
    except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))

  def deserialize_numpy(self, str, numpy):
    """
    unpack serialized message in str into this message instance using numpy for array types
    :param str: byte array of serialized message, ``str``
    :param numpy: numpy python module
    """
    if python3:
      codecs.lookup_error("rosmsg").msg_type = self._type
    try:
      end = 0
      _x = self
      start = end
      end += 76
      (_x.rotors, _x.cx, _x.cy, _x.cz, _x.armlen, _x.mass, _x.rx, _x.ry, _x.rz, _x.cf, _x.ct,) = _get_struct_H7dh2d().unpack(str[start:end])
      return self
    except struct.error as e:
      raise genpy.DeserializationError(e)  # most likely buffer underfill

_struct_I = genpy.struct_I
def _get_struct_I():
    global _struct_I
    return _struct_I
_struct_H7dh2d = None
def _get_struct_H7dh2d():
    global _struct_H7dh2d
    if _struct_H7dh2d is None:
        _struct_H7dh2d = struct.Struct("<H7dh2d")
    return _struct_H7dh2d
# This Python file uses the following encoding: utf-8
"""autogenerated by genpy from uavatt_ros/set_gtmrp_geomResponse.msg. Do not edit."""
import codecs
import sys
python3 = True if sys.hexversion > 0x03000000 else False
import genpy
import struct


class set_gtmrp_geomResponse(genpy.Message):
  _md5sum = "0d79450287345aef3f3e331856b25242"
  _type = "uavatt_ros/set_gtmrp_geomResponse"
  _has_header = False  # flag to mark the presence of a Header object
  _full_text = """bool genom_success
string genom_exdetail

"""
  __slots__ = ['genom_success','genom_exdetail']
  _slot_types = ['bool','string']

  def __init__(self, *args, **kwds):
    """
    Constructor. Any message fields that are implicitly/explicitly
    set to None will be assigned a default value. The recommend
    use is keyword arguments as this is more robust to future message
    changes.  You cannot mix in-order arguments and keyword arguments.

    The available fields are:
       genom_success,genom_exdetail

    :param args: complete set of field values, in .msg order
    :param kwds: use keyword arguments corresponding to message field names
    to set specific fields.
    """
    if args or kwds:
      super(set_gtmrp_geomResponse, self).__init__(*args, **kwds)
      # message fields cannot be None, assign default values for those that are
      if self.genom_success is None:
        self.genom_success = False
      if self.genom_exdetail is None:
        self.genom_exdetail = ''
    else:
      self.genom_success = False
      self.genom_exdetail = ''

  def _get_types(self):
    """
    internal API method
    """
    return self._slot_types

  def serialize(self, buff):
    """
    serialize message into buffer
    :param buff: buffer, ``StringIO``
    """
    try:
      _x = self.genom_success
      buff.write(_get_struct_B().pack(_x))
      _x = self.genom_exdetail
      length = len(_x)
      if python3 or type(_x) == unicode:
        _x = _x.encode('utf-8')
        length = len(_x)
      buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
    except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
    except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))

  def deserialize(self, str):
    """
    unpack serialized message in str into this message instance
    :param str: byte array of serialized message, ``str``
    """
    if python3:
      codecs.lookup_error("rosmsg").msg_type = self._type
    try:
      end = 0
      start = end
      end += 1
      (self.genom_success,) = _get_struct_B().unpack(str[start:end])
      self.genom_success = bool(self.genom_success)
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.genom_exdetail = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.genom_exdetail = str[start:end]
      return self
    except struct.error as e:
      raise genpy.DeserializationError(e)  # most likely buffer underfill


  def serialize_numpy(self, buff, numpy):
    """
    serialize message with numpy array types into buffer
    :param buff: buffer, ``StringIO``
    :param numpy: numpy python module
    """
    try:
      _x = self.genom_success
      buff.write(_get_struct_B().pack(_x))
      _x = self.genom_exdetail
      length = len(_x)
      if python3 or type(_x) == unicode:
        _x = _x.encode('utf-8')
        length = len(_x)
      buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
    except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
    except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))

  def deserialize_numpy(self, str, numpy):
    """
    unpack serialized message in str into this message instance using numpy for array types
    :param str: byte array of serialized message, ``str``
    :param numpy: numpy python module
    """
    if python3:
      codecs.lookup_error("rosmsg").msg_type = self._type
    try:
      end = 0
      start = end
      end += 1
      (self.genom_success,) = _get_struct_B().unpack(str[start:end])
      self.genom_success = bool(self.genom_success)
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.genom_exdetail = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.genom_exdetail = str[start:end]
      return self
    except struct.error as e:
      raise genpy.DeserializationError(e)  # most likely buffer underfill

_struct_I = genpy.struct_I
def _get_struct_I():
    global _struct_I
    return _struct_I
_struct_B = None
def _get_struct_B():
    global _struct_B
    if _struct_B is None:
        _struct_B = struct.Struct("<B")
    return _struct_B
class set_gtmrp_geom(object):
  _type          = 'uavatt_ros/set_gtmrp_geom'
  _md5sum = '9dd68fab62adbc7c1e97bf38e1abbfe3'
  _request_class  = set_gtmrp_geomRequest
  _response_class = set_gtmrp_geomResponse
