"""autogenerated by genmsg_py from ConstantsMultiplexRequest.msg. Do not edit."""
import roslib.message
import struct


class ConstantsMultiplexRequest(roslib.message.Message):
  _md5sum = "3e3b2ecf5f3e7d25830bd97a7fd13b17"
  _type = "test_rospy/ConstantsMultiplexRequest"
  _has_header = False #flag to mark the presence of a Header object
  _full_text = """byte BYTE_X=0
byte BYTE_Y=15
byte BYTE_Z=5
int32 INT32_X=0
int32 INT32_Y=-12345678
int32 INT32_Z=12345678
uint32 UINT32_X=0
uint32 UINT32_Y=12345678
uint32 UINT32_Z=1
float32 FLOAT32_X=0.0
float32 FLOAT32_Y=-3.14159
float32 FLOAT32_Z=12345.78
byte SELECT_X=1
byte SELECT_Y=2
byte SELECT_Z=3
byte selection

"""
  # Pseudo-constants
  BYTE_X = 0
  BYTE_Y = 15
  BYTE_Z = 5
  INT32_X = 0
  INT32_Y = -12345678
  INT32_Z = 12345678
  UINT32_X = 0
  UINT32_Y = 12345678
  UINT32_Z = 1
  FLOAT32_X = 0.0
  FLOAT32_Y = -3.14159
  FLOAT32_Z = 12345.78
  SELECT_X = 1
  SELECT_Y = 2
  SELECT_Z = 3

  __slots__ = ['selection']
  _slot_types = ['byte']

  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:
       selection
    
    @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(ConstantsMultiplexRequest, self).__init__(*args, **kwds)
      #message fields cannot be None, assign default values for those that are
      if self.selection is None:
        self.selection = 0
    else:
      self.selection = 0

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

  def serialize(self, buff):
    """
    serialize message into buffer
    @param buff: buffer
    @type  buff: StringIO
    """
    try:
      buff.write(_struct_b.pack(self.selection))
    except struct.error, se: self._check_types(se)
    except TypeError, te: self._check_types(te)

  def deserialize(self, str):
    """
    unpack serialized message in str into this message instance
    @param str: byte array of serialized message
    @type  str: str
    """
    try:
      end = 0
      start = end
      end += 1
      (self.selection,) = _struct_b.unpack(str[start:end])
      return self
    except struct.error, e:
      raise roslib.message.DeserializationError(e) #most likely buffer underfill


  def serialize_numpy(self, buff, numpy):
    """
    serialize message with numpy array types into buffer
    @param buff: buffer
    @type  buff: StringIO
    @param numpy: numpy python module
    @type  numpy module
    """
    try:
      buff.write(_struct_b.pack(self.selection))
    except struct.error, se: self._check_types(se)
    except TypeError, te: self._check_types(te)

  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
    @type  str: str
    @param numpy: numpy python module
    @type  numpy: module
    """
    try:
      end = 0
      start = end
      end += 1
      (self.selection,) = _struct_b.unpack(str[start:end])
      return self
    except struct.error, e:
      raise roslib.message.DeserializationError(e) #most likely buffer underfill

_struct_I = roslib.message.struct_I
_struct_b = struct.Struct("<b")
"""autogenerated by genmsg_py from ConstantsMultiplexResponse.msg. Do not edit."""
import roslib.message
import struct


class ConstantsMultiplexResponse(roslib.message.Message):
  _md5sum = "012320975f41b58dcffb5b0e7a154691"
  _type = "test_rospy/ConstantsMultiplexResponse"
  _has_header = False #flag to mark the presence of a Header object
  _full_text = """
byte CONFIRM_X=1
byte CONFIRM_Y=2
byte CONFIRM_Z=3
byte select_confirm
byte ret_byte
int32 ret_int32
uint32 ret_uint32
float32 ret_float32

"""
  # Pseudo-constants
  CONFIRM_X = 1
  CONFIRM_Y = 2
  CONFIRM_Z = 3

  __slots__ = ['select_confirm','ret_byte','ret_int32','ret_uint32','ret_float32']
  _slot_types = ['byte','byte','int32','uint32','float32']

  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:
       select_confirm,ret_byte,ret_int32,ret_uint32,ret_float32
    
    @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(ConstantsMultiplexResponse, self).__init__(*args, **kwds)
      #message fields cannot be None, assign default values for those that are
      if self.select_confirm is None:
        self.select_confirm = 0
      if self.ret_byte is None:
        self.ret_byte = 0
      if self.ret_int32 is None:
        self.ret_int32 = 0
      if self.ret_uint32 is None:
        self.ret_uint32 = 0
      if self.ret_float32 is None:
        self.ret_float32 = 0.
    else:
      self.select_confirm = 0
      self.ret_byte = 0
      self.ret_int32 = 0
      self.ret_uint32 = 0
      self.ret_float32 = 0.

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

  def serialize(self, buff):
    """
    serialize message into buffer
    @param buff: buffer
    @type  buff: StringIO
    """
    try:
      _x = self
      buff.write(_struct_2biIf.pack(_x.select_confirm, _x.ret_byte, _x.ret_int32, _x.ret_uint32, _x.ret_float32))
    except struct.error, se: self._check_types(se)
    except TypeError, te: self._check_types(te)

  def deserialize(self, str):
    """
    unpack serialized message in str into this message instance
    @param str: byte array of serialized message
    @type  str: str
    """
    try:
      end = 0
      _x = self
      start = end
      end += 14
      (_x.select_confirm, _x.ret_byte, _x.ret_int32, _x.ret_uint32, _x.ret_float32,) = _struct_2biIf.unpack(str[start:end])
      return self
    except struct.error, e:
      raise roslib.message.DeserializationError(e) #most likely buffer underfill


  def serialize_numpy(self, buff, numpy):
    """
    serialize message with numpy array types into buffer
    @param buff: buffer
    @type  buff: StringIO
    @param numpy: numpy python module
    @type  numpy module
    """
    try:
      _x = self
      buff.write(_struct_2biIf.pack(_x.select_confirm, _x.ret_byte, _x.ret_int32, _x.ret_uint32, _x.ret_float32))
    except struct.error, se: self._check_types(se)
    except TypeError, te: self._check_types(te)

  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
    @type  str: str
    @param numpy: numpy python module
    @type  numpy: module
    """
    try:
      end = 0
      _x = self
      start = end
      end += 14
      (_x.select_confirm, _x.ret_byte, _x.ret_int32, _x.ret_uint32, _x.ret_float32,) = _struct_2biIf.unpack(str[start:end])
      return self
    except struct.error, e:
      raise roslib.message.DeserializationError(e) #most likely buffer underfill

_struct_I = roslib.message.struct_I
_struct_2biIf = struct.Struct("<2biIf")
class ConstantsMultiplex(roslib.message.ServiceDefinition):
  _type          = 'test_rospy/ConstantsMultiplex'
  _md5sum = 'bab86066b3f7801cb25df3932f644396'
  _request_class  = ConstantsMultiplexRequest
  _response_class = ConstantsMultiplexResponse
