_GetAppDetails.py
Go to the documentation of this file.
00001 """autogenerated by genpy from turtlebot_app_manager/GetAppDetailsRequest.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 GetAppDetailsRequest(genpy.Message):
00009   _md5sum = "c1f3d28f1b044c871e6eff2e9fc3c667"
00010   _type = "turtlebot_app_manager/GetAppDetailsRequest"
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(GetAppDetailsRequest, 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/GetAppDetailsResponse.msg. Do not edit."""
00122 import sys
00123 python3 = True if sys.hexversion > 0x03000000 else False
00124 import genpy
00125 import struct
00126 
00127 import turtlebot_app_manager.msg
00128 
00129 class GetAppDetailsResponse(genpy.Message):
00130   _md5sum = "404cd76612a719d24ac22fba2d495de8"
00131   _type = "turtlebot_app_manager/GetAppDetailsResponse"
00132   _has_header = False #flag to mark the presence of a Header object
00133   _full_text = """ExchangeApp app
00134 
00135 
00136 
00137 ================================================================================
00138 MSG: turtlebot_app_manager/ExchangeApp
00139 # app name
00140 string name
00141 # user-friendly display name of application
00142 string display_name
00143 # the version of the package currently installed
00144 string version
00145 # latest version of the package avaliable
00146 string latest_version
00147 # the detailed description of the app
00148 string description
00149 # icon for showing app
00150 Icon icon
00151 # hidden apps are not show - used for cases where multiple apps are in a deb
00152 bool hidden
00153 ================================================================================
00154 MSG: turtlebot_app_manager/Icon
00155 # Image data format.  "jpeg" or "png"
00156 string format
00157 
00158 # Image data.
00159 uint8[] data
00160 
00161 """
00162   __slots__ = ['app']
00163   _slot_types = ['turtlebot_app_manager/ExchangeApp']
00164 
00165   def __init__(self, *args, **kwds):
00166     """
00167     Constructor. Any message fields that are implicitly/explicitly
00168     set to None will be assigned a default value. The recommend
00169     use is keyword arguments as this is more robust to future message
00170     changes.  You cannot mix in-order arguments and keyword arguments.
00171 
00172     The available fields are:
00173        app
00174 
00175     :param args: complete set of field values, in .msg order
00176     :param kwds: use keyword arguments corresponding to message field names
00177     to set specific fields.
00178     """
00179     if args or kwds:
00180       super(GetAppDetailsResponse, self).__init__(*args, **kwds)
00181       #message fields cannot be None, assign default values for those that are
00182       if self.app is None:
00183         self.app = turtlebot_app_manager.msg.ExchangeApp()
00184     else:
00185       self.app = turtlebot_app_manager.msg.ExchangeApp()
00186 
00187   def _get_types(self):
00188     """
00189     internal API method
00190     """
00191     return self._slot_types
00192 
00193   def serialize(self, buff):
00194     """
00195     serialize message into buffer
00196     :param buff: buffer, ``StringIO``
00197     """
00198     try:
00199       _x = self.app.name
00200       length = len(_x)
00201       if python3 or type(_x) == unicode:
00202         _x = _x.encode('utf-8')
00203         length = len(_x)
00204       buff.write(struct.pack('<I%ss'%length, length, _x))
00205       _x = self.app.display_name
00206       length = len(_x)
00207       if python3 or type(_x) == unicode:
00208         _x = _x.encode('utf-8')
00209         length = len(_x)
00210       buff.write(struct.pack('<I%ss'%length, length, _x))
00211       _x = self.app.version
00212       length = len(_x)
00213       if python3 or type(_x) == unicode:
00214         _x = _x.encode('utf-8')
00215         length = len(_x)
00216       buff.write(struct.pack('<I%ss'%length, length, _x))
00217       _x = self.app.latest_version
00218       length = len(_x)
00219       if python3 or type(_x) == unicode:
00220         _x = _x.encode('utf-8')
00221         length = len(_x)
00222       buff.write(struct.pack('<I%ss'%length, length, _x))
00223       _x = self.app.description
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       _x = self.app.icon.format
00230       length = len(_x)
00231       if python3 or type(_x) == unicode:
00232         _x = _x.encode('utf-8')
00233         length = len(_x)
00234       buff.write(struct.pack('<I%ss'%length, length, _x))
00235       _x = self.app.icon.data
00236       length = len(_x)
00237       # - if encoded as a list instead, serialize as bytes instead of string
00238       if type(_x) in [list, tuple]:
00239         buff.write(struct.pack('<I%sB'%length, length, *_x))
00240       else:
00241         buff.write(struct.pack('<I%ss'%length, length, _x))
00242       buff.write(_struct_B.pack(self.app.hidden))
00243     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00244     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00245 
00246   def deserialize(self, str):
00247     """
00248     unpack serialized message in str into this message instance
00249     :param str: byte array of serialized message, ``str``
00250     """
00251     try:
00252       if self.app is None:
00253         self.app = turtlebot_app_manager.msg.ExchangeApp()
00254       end = 0
00255       start = end
00256       end += 4
00257       (length,) = _struct_I.unpack(str[start:end])
00258       start = end
00259       end += length
00260       if python3:
00261         self.app.name = str[start:end].decode('utf-8')
00262       else:
00263         self.app.name = str[start:end]
00264       start = end
00265       end += 4
00266       (length,) = _struct_I.unpack(str[start:end])
00267       start = end
00268       end += length
00269       if python3:
00270         self.app.display_name = str[start:end].decode('utf-8')
00271       else:
00272         self.app.display_name = str[start:end]
00273       start = end
00274       end += 4
00275       (length,) = _struct_I.unpack(str[start:end])
00276       start = end
00277       end += length
00278       if python3:
00279         self.app.version = str[start:end].decode('utf-8')
00280       else:
00281         self.app.version = str[start:end]
00282       start = end
00283       end += 4
00284       (length,) = _struct_I.unpack(str[start:end])
00285       start = end
00286       end += length
00287       if python3:
00288         self.app.latest_version = str[start:end].decode('utf-8')
00289       else:
00290         self.app.latest_version = str[start:end]
00291       start = end
00292       end += 4
00293       (length,) = _struct_I.unpack(str[start:end])
00294       start = end
00295       end += length
00296       if python3:
00297         self.app.description = str[start:end].decode('utf-8')
00298       else:
00299         self.app.description = str[start:end]
00300       start = end
00301       end += 4
00302       (length,) = _struct_I.unpack(str[start:end])
00303       start = end
00304       end += length
00305       if python3:
00306         self.app.icon.format = str[start:end].decode('utf-8')
00307       else:
00308         self.app.icon.format = str[start:end]
00309       start = end
00310       end += 4
00311       (length,) = _struct_I.unpack(str[start:end])
00312       start = end
00313       end += length
00314       self.app.icon.data = str[start:end]
00315       start = end
00316       end += 1
00317       (self.app.hidden,) = _struct_B.unpack(str[start:end])
00318       self.app.hidden = bool(self.app.hidden)
00319       return self
00320     except struct.error as e:
00321       raise genpy.DeserializationError(e) #most likely buffer underfill
00322 
00323 
00324   def serialize_numpy(self, buff, numpy):
00325     """
00326     serialize message with numpy array types into buffer
00327     :param buff: buffer, ``StringIO``
00328     :param numpy: numpy python module
00329     """
00330     try:
00331       _x = self.app.name
00332       length = len(_x)
00333       if python3 or type(_x) == unicode:
00334         _x = _x.encode('utf-8')
00335         length = len(_x)
00336       buff.write(struct.pack('<I%ss'%length, length, _x))
00337       _x = self.app.display_name
00338       length = len(_x)
00339       if python3 or type(_x) == unicode:
00340         _x = _x.encode('utf-8')
00341         length = len(_x)
00342       buff.write(struct.pack('<I%ss'%length, length, _x))
00343       _x = self.app.version
00344       length = len(_x)
00345       if python3 or type(_x) == unicode:
00346         _x = _x.encode('utf-8')
00347         length = len(_x)
00348       buff.write(struct.pack('<I%ss'%length, length, _x))
00349       _x = self.app.latest_version
00350       length = len(_x)
00351       if python3 or type(_x) == unicode:
00352         _x = _x.encode('utf-8')
00353         length = len(_x)
00354       buff.write(struct.pack('<I%ss'%length, length, _x))
00355       _x = self.app.description
00356       length = len(_x)
00357       if python3 or type(_x) == unicode:
00358         _x = _x.encode('utf-8')
00359         length = len(_x)
00360       buff.write(struct.pack('<I%ss'%length, length, _x))
00361       _x = self.app.icon.format
00362       length = len(_x)
00363       if python3 or type(_x) == unicode:
00364         _x = _x.encode('utf-8')
00365         length = len(_x)
00366       buff.write(struct.pack('<I%ss'%length, length, _x))
00367       _x = self.app.icon.data
00368       length = len(_x)
00369       # - if encoded as a list instead, serialize as bytes instead of string
00370       if type(_x) in [list, tuple]:
00371         buff.write(struct.pack('<I%sB'%length, length, *_x))
00372       else:
00373         buff.write(struct.pack('<I%ss'%length, length, _x))
00374       buff.write(_struct_B.pack(self.app.hidden))
00375     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00376     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00377 
00378   def deserialize_numpy(self, str, numpy):
00379     """
00380     unpack serialized message in str into this message instance using numpy for array types
00381     :param str: byte array of serialized message, ``str``
00382     :param numpy: numpy python module
00383     """
00384     try:
00385       if self.app is None:
00386         self.app = turtlebot_app_manager.msg.ExchangeApp()
00387       end = 0
00388       start = end
00389       end += 4
00390       (length,) = _struct_I.unpack(str[start:end])
00391       start = end
00392       end += length
00393       if python3:
00394         self.app.name = str[start:end].decode('utf-8')
00395       else:
00396         self.app.name = str[start:end]
00397       start = end
00398       end += 4
00399       (length,) = _struct_I.unpack(str[start:end])
00400       start = end
00401       end += length
00402       if python3:
00403         self.app.display_name = str[start:end].decode('utf-8')
00404       else:
00405         self.app.display_name = str[start:end]
00406       start = end
00407       end += 4
00408       (length,) = _struct_I.unpack(str[start:end])
00409       start = end
00410       end += length
00411       if python3:
00412         self.app.version = str[start:end].decode('utf-8')
00413       else:
00414         self.app.version = str[start:end]
00415       start = end
00416       end += 4
00417       (length,) = _struct_I.unpack(str[start:end])
00418       start = end
00419       end += length
00420       if python3:
00421         self.app.latest_version = str[start:end].decode('utf-8')
00422       else:
00423         self.app.latest_version = str[start:end]
00424       start = end
00425       end += 4
00426       (length,) = _struct_I.unpack(str[start:end])
00427       start = end
00428       end += length
00429       if python3:
00430         self.app.description = str[start:end].decode('utf-8')
00431       else:
00432         self.app.description = str[start:end]
00433       start = end
00434       end += 4
00435       (length,) = _struct_I.unpack(str[start:end])
00436       start = end
00437       end += length
00438       if python3:
00439         self.app.icon.format = str[start:end].decode('utf-8')
00440       else:
00441         self.app.icon.format = str[start:end]
00442       start = end
00443       end += 4
00444       (length,) = _struct_I.unpack(str[start:end])
00445       start = end
00446       end += length
00447       self.app.icon.data = str[start:end]
00448       start = end
00449       end += 1
00450       (self.app.hidden,) = _struct_B.unpack(str[start:end])
00451       self.app.hidden = bool(self.app.hidden)
00452       return self
00453     except struct.error as e:
00454       raise genpy.DeserializationError(e) #most likely buffer underfill
00455 
00456 _struct_I = genpy.struct_I
00457 _struct_B = struct.Struct("<B")
00458 class GetAppDetails(object):
00459   _type          = 'turtlebot_app_manager/GetAppDetails'
00460   _md5sum = '982707be65dd9bb38c19f6e18cb18db5'
00461   _request_class  = GetAppDetailsRequest
00462   _response_class = GetAppDetailsResponse


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