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


class NodeletLoadRequest(roslib.message.Message):
  _md5sum = "0866b1f3682c4bd9d445dbfeb7448b7b"
  _type = "nodelet/NodeletLoadRequest"
  _has_header = False #flag to mark the presence of a Header object
  _full_text = """string name
string type
string[] remap_source_args
string[] remap_target_args
string[] my_argv

"""
  __slots__ = ['name','type','remap_source_args','remap_target_args','my_argv']
  _slot_types = ['string','string','string[]','string[]','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:
       name,type,remap_source_args,remap_target_args,my_argv
    
    @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(NodeletLoadRequest, self).__init__(*args, **kwds)
      #message fields cannot be None, assign default values for those that are
      if self.name is None:
        self.name = ''
      if self.type is None:
        self.type = ''
      if self.remap_source_args is None:
        self.remap_source_args = []
      if self.remap_target_args is None:
        self.remap_target_args = []
      if self.my_argv is None:
        self.my_argv = []
    else:
      self.name = ''
      self.type = ''
      self.remap_source_args = []
      self.remap_target_args = []
      self.my_argv = []

  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.name
      length = len(_x)
      buff.write(struct.pack('<I%ss'%length, length, _x))
      _x = self.type
      length = len(_x)
      buff.write(struct.pack('<I%ss'%length, length, _x))
      length = len(self.remap_source_args)
      buff.write(_struct_I.pack(length))
      for val1 in self.remap_source_args:
        length = len(val1)
        buff.write(struct.pack('<I%ss'%length, length, val1))
      length = len(self.remap_target_args)
      buff.write(_struct_I.pack(length))
      for val1 in self.remap_target_args:
        length = len(val1)
        buff.write(struct.pack('<I%ss'%length, length, val1))
      length = len(self.my_argv)
      buff.write(_struct_I.pack(length))
      for val1 in self.my_argv:
        length = len(val1)
        buff.write(struct.pack('<I%ss'%length, length, val1))
    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 += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      self.name = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      self.type = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      self.remap_source_args = []
      for i in xrange(0, length):
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        start = end
        end += length
        val1 = str[start:end]
        self.remap_source_args.append(val1)
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      self.remap_target_args = []
      for i in xrange(0, length):
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        start = end
        end += length
        val1 = str[start:end]
        self.remap_target_args.append(val1)
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      self.my_argv = []
      for i in xrange(0, length):
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        start = end
        end += length
        val1 = str[start:end]
        self.my_argv.append(val1)
      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.name
      length = len(_x)
      buff.write(struct.pack('<I%ss'%length, length, _x))
      _x = self.type
      length = len(_x)
      buff.write(struct.pack('<I%ss'%length, length, _x))
      length = len(self.remap_source_args)
      buff.write(_struct_I.pack(length))
      for val1 in self.remap_source_args:
        length = len(val1)
        buff.write(struct.pack('<I%ss'%length, length, val1))
      length = len(self.remap_target_args)
      buff.write(_struct_I.pack(length))
      for val1 in self.remap_target_args:
        length = len(val1)
        buff.write(struct.pack('<I%ss'%length, length, val1))
      length = len(self.my_argv)
      buff.write(_struct_I.pack(length))
      for val1 in self.my_argv:
        length = len(val1)
        buff.write(struct.pack('<I%ss'%length, length, val1))
    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 += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      self.name = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      self.type = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      self.remap_source_args = []
      for i in xrange(0, length):
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        start = end
        end += length
        val1 = str[start:end]
        self.remap_source_args.append(val1)
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      self.remap_target_args = []
      for i in xrange(0, length):
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        start = end
        end += length
        val1 = str[start:end]
        self.remap_target_args.append(val1)
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      self.my_argv = []
      for i in xrange(0, length):
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        start = end
        end += length
        val1 = str[start:end]
        self.my_argv.append(val1)
      return self
    except struct.error, e:
      raise roslib.message.DeserializationError(e) #most likely buffer underfill

_struct_I = roslib.message.struct_I
"""autogenerated by genmsg_py from NodeletLoadResponse.msg. Do not edit."""
import roslib.message
import struct


class NodeletLoadResponse(roslib.message.Message):
  _md5sum = "358e233cde0c8a8bcfea4ce193f8fc15"
  _type = "nodelet/NodeletLoadResponse"
  _has_header = False #flag to mark the presence of a Header object
  _full_text = """bool success


"""
  __slots__ = ['success']
  _slot_types = ['bool']

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

  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.success))
    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.success,) = _struct_B.unpack(str[start:end])
      self.success = bool(self.success)
      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.success))
    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.success,) = _struct_B.unpack(str[start:end])
      self.success = bool(self.success)
      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")
class NodeletLoad(roslib.message.ServiceDefinition):
  _type          = 'nodelet/NodeletLoad'
  _md5sum = '640816e8197cc04933674927c1ddcc6c'
  _request_class  = NodeletLoadRequest
  _response_class = NodeletLoadResponse
