_InstallApp.py
Go to the documentation of this file.
00001 """autogenerated by genpy from turtlebot_app_manager/InstallAppRequest.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006 
00007 
00008 class InstallAppRequest(genpy.Message):
00009   _md5sum = "c1f3d28f1b044c871e6eff2e9fc3c667"
00010   _type = "turtlebot_app_manager/InstallAppRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """
00013 string name
00014 
00015 """
00016   __slots__ = ['name']
00017   _slot_types = ['string']
00018 
00019   def __init__(self, *args, **kwds):
00020     """
00021     Constructor. Any message fields that are implicitly/explicitly
00022     set to None will be assigned a default value. The recommend
00023     use is keyword arguments as this is more robust to future message
00024     changes.  You cannot mix in-order arguments and keyword arguments.
00025 
00026     The available fields are:
00027        name
00028 
00029     :param args: complete set of field values, in .msg order
00030     :param kwds: use keyword arguments corresponding to message field names
00031     to set specific fields.
00032     """
00033     if args or kwds:
00034       super(InstallAppRequest, self).__init__(*args, **kwds)
00035       #message fields cannot be None, assign default values for those that are
00036       if self.name is None:
00037         self.name = ''
00038     else:
00039       self.name = ''
00040 
00041   def _get_types(self):
00042     """
00043     internal API method
00044     """
00045     return self._slot_types
00046 
00047   def serialize(self, buff):
00048     """
00049     serialize message into buffer
00050     :param buff: buffer, ``StringIO``
00051     """
00052     try:
00053       _x = self.name
00054       length = len(_x)
00055       if python3 or type(_x) == unicode:
00056         _x = _x.encode('utf-8')
00057         length = len(_x)
00058       buff.write(struct.pack('<I%ss'%length, length, _x))
00059     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00060     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00061 
00062   def deserialize(self, str):
00063     """
00064     unpack serialized message in str into this message instance
00065     :param str: byte array of serialized message, ``str``
00066     """
00067     try:
00068       end = 0
00069       start = end
00070       end += 4
00071       (length,) = _struct_I.unpack(str[start:end])
00072       start = end
00073       end += length
00074       if python3:
00075         self.name = str[start:end].decode('utf-8')
00076       else:
00077         self.name = str[start:end]
00078       return self
00079     except struct.error as e:
00080       raise genpy.DeserializationError(e) #most likely buffer underfill
00081 
00082 
00083   def serialize_numpy(self, buff, numpy):
00084     """
00085     serialize message with numpy array types into buffer
00086     :param buff: buffer, ``StringIO``
00087     :param numpy: numpy python module
00088     """
00089     try:
00090       _x = self.name
00091       length = len(_x)
00092       if python3 or type(_x) == unicode:
00093         _x = _x.encode('utf-8')
00094         length = len(_x)
00095       buff.write(struct.pack('<I%ss'%length, length, _x))
00096     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00097     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00098 
00099   def deserialize_numpy(self, str, numpy):
00100     """
00101     unpack serialized message in str into this message instance using numpy for array types
00102     :param str: byte array of serialized message, ``str``
00103     :param numpy: numpy python module
00104     """
00105     try:
00106       end = 0
00107       start = end
00108       end += 4
00109       (length,) = _struct_I.unpack(str[start:end])
00110       start = end
00111       end += length
00112       if python3:
00113         self.name = str[start:end].decode('utf-8')
00114       else:
00115         self.name = str[start:end]
00116       return self
00117     except struct.error as e:
00118       raise genpy.DeserializationError(e) #most likely buffer underfill
00119 
00120 _struct_I = genpy.struct_I
00121 """autogenerated by genpy from turtlebot_app_manager/InstallAppResponse.msg. Do not edit."""
00122 import sys
00123 python3 = True if sys.hexversion > 0x03000000 else False
00124 import genpy
00125 import struct
00126 
00127 
00128 class InstallAppResponse(genpy.Message):
00129   _md5sum = "08871bc6dbc6813537edf236ff26a1e2"
00130   _type = "turtlebot_app_manager/InstallAppResponse"
00131   _has_header = False #flag to mark the presence of a Header object
00132   _full_text = """
00133 bool installed
00134 
00135 string message
00136 
00137 
00138 
00139 """
00140   __slots__ = ['installed','message']
00141   _slot_types = ['bool','string']
00142 
00143   def __init__(self, *args, **kwds):
00144     """
00145     Constructor. Any message fields that are implicitly/explicitly
00146     set to None will be assigned a default value. The recommend
00147     use is keyword arguments as this is more robust to future message
00148     changes.  You cannot mix in-order arguments and keyword arguments.
00149 
00150     The available fields are:
00151        installed,message
00152 
00153     :param args: complete set of field values, in .msg order
00154     :param kwds: use keyword arguments corresponding to message field names
00155     to set specific fields.
00156     """
00157     if args or kwds:
00158       super(InstallAppResponse, self).__init__(*args, **kwds)
00159       #message fields cannot be None, assign default values for those that are
00160       if self.installed is None:
00161         self.installed = False
00162       if self.message is None:
00163         self.message = ''
00164     else:
00165       self.installed = False
00166       self.message = ''
00167 
00168   def _get_types(self):
00169     """
00170     internal API method
00171     """
00172     return self._slot_types
00173 
00174   def serialize(self, buff):
00175     """
00176     serialize message into buffer
00177     :param buff: buffer, ``StringIO``
00178     """
00179     try:
00180       buff.write(_struct_B.pack(self.installed))
00181       _x = self.message
00182       length = len(_x)
00183       if python3 or type(_x) == unicode:
00184         _x = _x.encode('utf-8')
00185         length = len(_x)
00186       buff.write(struct.pack('<I%ss'%length, length, _x))
00187     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00188     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00189 
00190   def deserialize(self, str):
00191     """
00192     unpack serialized message in str into this message instance
00193     :param str: byte array of serialized message, ``str``
00194     """
00195     try:
00196       end = 0
00197       start = end
00198       end += 1
00199       (self.installed,) = _struct_B.unpack(str[start:end])
00200       self.installed = bool(self.installed)
00201       start = end
00202       end += 4
00203       (length,) = _struct_I.unpack(str[start:end])
00204       start = end
00205       end += length
00206       if python3:
00207         self.message = str[start:end].decode('utf-8')
00208       else:
00209         self.message = str[start:end]
00210       return self
00211     except struct.error as e:
00212       raise genpy.DeserializationError(e) #most likely buffer underfill
00213 
00214 
00215   def serialize_numpy(self, buff, numpy):
00216     """
00217     serialize message with numpy array types into buffer
00218     :param buff: buffer, ``StringIO``
00219     :param numpy: numpy python module
00220     """
00221     try:
00222       buff.write(_struct_B.pack(self.installed))
00223       _x = self.message
00224       length = len(_x)
00225       if python3 or type(_x) == unicode:
00226         _x = _x.encode('utf-8')
00227         length = len(_x)
00228       buff.write(struct.pack('<I%ss'%length, length, _x))
00229     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00230     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00231 
00232   def deserialize_numpy(self, str, numpy):
00233     """
00234     unpack serialized message in str into this message instance using numpy for array types
00235     :param str: byte array of serialized message, ``str``
00236     :param numpy: numpy python module
00237     """
00238     try:
00239       end = 0
00240       start = end
00241       end += 1
00242       (self.installed,) = _struct_B.unpack(str[start:end])
00243       self.installed = bool(self.installed)
00244       start = end
00245       end += 4
00246       (length,) = _struct_I.unpack(str[start:end])
00247       start = end
00248       end += length
00249       if python3:
00250         self.message = str[start:end].decode('utf-8')
00251       else:
00252         self.message = str[start:end]
00253       return self
00254     except struct.error as e:
00255       raise genpy.DeserializationError(e) #most likely buffer underfill
00256 
00257 _struct_I = genpy.struct_I
00258 _struct_B = struct.Struct("<B")
00259 class InstallApp(object):
00260   _type          = 'turtlebot_app_manager/InstallApp'
00261   _md5sum = '244a230f15ee33d3fe16b523058ae43f'
00262   _request_class  = InstallAppRequest
00263   _response_class = InstallAppResponse


turtlebot_app_manager
Author(s): Jeremy Leibs, Ken Conley
autogenerated on Mon Oct 6 2014 08:00:31