_GetInstallationState.py
Go to the documentation of this file.
00001 """autogenerated by genpy from app_manager/GetInstallationStateRequest.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 GetInstallationStateRequest(genpy.Message):
00009   _md5sum = "f7e64723808960ca985ba81f45f1b8a7"
00010   _type = "app_manager/GetInstallationStateRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """bool remote_update
00013 
00014 """
00015   __slots__ = ['remote_update']
00016   _slot_types = ['bool']
00017 
00018   def __init__(self, *args, **kwds):
00019     """
00020     Constructor. Any message fields that are implicitly/explicitly
00021     set to None will be assigned a default value. The recommend
00022     use is keyword arguments as this is more robust to future message
00023     changes.  You cannot mix in-order arguments and keyword arguments.
00024 
00025     The available fields are:
00026        remote_update
00027 
00028     :param args: complete set of field values, in .msg order
00029     :param kwds: use keyword arguments corresponding to message field names
00030     to set specific fields.
00031     """
00032     if args or kwds:
00033       super(GetInstallationStateRequest, self).__init__(*args, **kwds)
00034       #message fields cannot be None, assign default values for those that are
00035       if self.remote_update is None:
00036         self.remote_update = False
00037     else:
00038       self.remote_update = False
00039 
00040   def _get_types(self):
00041     """
00042     internal API method
00043     """
00044     return self._slot_types
00045 
00046   def serialize(self, buff):
00047     """
00048     serialize message into buffer
00049     :param buff: buffer, ``StringIO``
00050     """
00051     try:
00052       buff.write(_struct_B.pack(self.remote_update))
00053     except struct.error as se: self._check_types(se)
00054     except TypeError as te: self._check_types(te)
00055 
00056   def deserialize(self, str):
00057     """
00058     unpack serialized message in str into this message instance
00059     :param str: byte array of serialized message, ``str``
00060     """
00061     try:
00062       end = 0
00063       start = end
00064       end += 1
00065       (self.remote_update,) = _struct_B.unpack(str[start:end])
00066       self.remote_update = bool(self.remote_update)
00067       return self
00068     except struct.error as e:
00069       raise genpy.DeserializationError(e) #most likely buffer underfill
00070 
00071 
00072   def serialize_numpy(self, buff, numpy):
00073     """
00074     serialize message with numpy array types into buffer
00075     :param buff: buffer, ``StringIO``
00076     :param numpy: numpy python module
00077     """
00078     try:
00079       buff.write(_struct_B.pack(self.remote_update))
00080     except struct.error as se: self._check_types(se)
00081     except TypeError as te: self._check_types(te)
00082 
00083   def deserialize_numpy(self, str, numpy):
00084     """
00085     unpack serialized message in str into this message instance using numpy for array types
00086     :param str: byte array of serialized message, ``str``
00087     :param numpy: numpy python module
00088     """
00089     try:
00090       end = 0
00091       start = end
00092       end += 1
00093       (self.remote_update,) = _struct_B.unpack(str[start:end])
00094       self.remote_update = bool(self.remote_update)
00095       return self
00096     except struct.error as e:
00097       raise genpy.DeserializationError(e) #most likely buffer underfill
00098 
00099 _struct_I = genpy.struct_I
00100 _struct_B = struct.Struct("<B")
00101 """autogenerated by genpy from app_manager/GetInstallationStateResponse.msg. Do not edit."""
00102 import sys
00103 python3 = True if sys.hexversion > 0x03000000 else False
00104 import genpy
00105 import struct
00106 
00107 import app_manager.msg
00108 
00109 class GetInstallationStateResponse(genpy.Message):
00110   _md5sum = "46d45bbda08250199267aff8c0ee8c41"
00111   _type = "app_manager/GetInstallationStateResponse"
00112   _has_header = False #flag to mark the presence of a Header object
00113   _full_text = """ExchangeApp[] installed_apps
00114 ExchangeApp[] available_apps
00115 
00116 ================================================================================
00117 MSG: app_manager/ExchangeApp
00118 # app name
00119 string name
00120 # user-friendly display name of application
00121 string display_name
00122 # the version of the package currently installed
00123 string version
00124 # latest version of the package avaliable
00125 string latest_version
00126 # the detailed description of the app
00127 string description
00128 # icon for showing app
00129 Icon icon
00130 # hidden apps are not show - used for cases where multiple apps are in a deb
00131 bool hidden
00132 ================================================================================
00133 MSG: app_manager/Icon
00134 # Image data format.  "jpeg" or "png"
00135 string format
00136 
00137 # Image data.
00138 uint8[] data
00139 
00140 """
00141   __slots__ = ['installed_apps','available_apps']
00142   _slot_types = ['app_manager/ExchangeApp[]','app_manager/ExchangeApp[]']
00143 
00144   def __init__(self, *args, **kwds):
00145     """
00146     Constructor. Any message fields that are implicitly/explicitly
00147     set to None will be assigned a default value. The recommend
00148     use is keyword arguments as this is more robust to future message
00149     changes.  You cannot mix in-order arguments and keyword arguments.
00150 
00151     The available fields are:
00152        installed_apps,available_apps
00153 
00154     :param args: complete set of field values, in .msg order
00155     :param kwds: use keyword arguments corresponding to message field names
00156     to set specific fields.
00157     """
00158     if args or kwds:
00159       super(GetInstallationStateResponse, self).__init__(*args, **kwds)
00160       #message fields cannot be None, assign default values for those that are
00161       if self.installed_apps is None:
00162         self.installed_apps = []
00163       if self.available_apps is None:
00164         self.available_apps = []
00165     else:
00166       self.installed_apps = []
00167       self.available_apps = []
00168 
00169   def _get_types(self):
00170     """
00171     internal API method
00172     """
00173     return self._slot_types
00174 
00175   def serialize(self, buff):
00176     """
00177     serialize message into buffer
00178     :param buff: buffer, ``StringIO``
00179     """
00180     try:
00181       length = len(self.installed_apps)
00182       buff.write(_struct_I.pack(length))
00183       for val1 in self.installed_apps:
00184         _x = val1.name
00185         length = len(_x)
00186         if python3 or type(_x) == unicode:
00187           _x = _x.encode('utf-8')
00188           length = len(_x)
00189         buff.write(struct.pack('<I%ss'%length, length, _x))
00190         _x = val1.display_name
00191         length = len(_x)
00192         if python3 or type(_x) == unicode:
00193           _x = _x.encode('utf-8')
00194           length = len(_x)
00195         buff.write(struct.pack('<I%ss'%length, length, _x))
00196         _x = val1.version
00197         length = len(_x)
00198         if python3 or type(_x) == unicode:
00199           _x = _x.encode('utf-8')
00200           length = len(_x)
00201         buff.write(struct.pack('<I%ss'%length, length, _x))
00202         _x = val1.latest_version
00203         length = len(_x)
00204         if python3 or type(_x) == unicode:
00205           _x = _x.encode('utf-8')
00206           length = len(_x)
00207         buff.write(struct.pack('<I%ss'%length, length, _x))
00208         _x = val1.description
00209         length = len(_x)
00210         if python3 or type(_x) == unicode:
00211           _x = _x.encode('utf-8')
00212           length = len(_x)
00213         buff.write(struct.pack('<I%ss'%length, length, _x))
00214         _v1 = val1.icon
00215         _x = _v1.format
00216         length = len(_x)
00217         if python3 or type(_x) == unicode:
00218           _x = _x.encode('utf-8')
00219           length = len(_x)
00220         buff.write(struct.pack('<I%ss'%length, length, _x))
00221         _x = _v1.data
00222         length = len(_x)
00223         # - if encoded as a list instead, serialize as bytes instead of string
00224         if type(_x) in [list, tuple]:
00225           buff.write(struct.pack('<I%sB'%length, length, *_x))
00226         else:
00227           buff.write(struct.pack('<I%ss'%length, length, _x))
00228         buff.write(_struct_B.pack(val1.hidden))
00229       length = len(self.available_apps)
00230       buff.write(_struct_I.pack(length))
00231       for val1 in self.available_apps:
00232         _x = val1.name
00233         length = len(_x)
00234         if python3 or type(_x) == unicode:
00235           _x = _x.encode('utf-8')
00236           length = len(_x)
00237         buff.write(struct.pack('<I%ss'%length, length, _x))
00238         _x = val1.display_name
00239         length = len(_x)
00240         if python3 or type(_x) == unicode:
00241           _x = _x.encode('utf-8')
00242           length = len(_x)
00243         buff.write(struct.pack('<I%ss'%length, length, _x))
00244         _x = val1.version
00245         length = len(_x)
00246         if python3 or type(_x) == unicode:
00247           _x = _x.encode('utf-8')
00248           length = len(_x)
00249         buff.write(struct.pack('<I%ss'%length, length, _x))
00250         _x = val1.latest_version
00251         length = len(_x)
00252         if python3 or type(_x) == unicode:
00253           _x = _x.encode('utf-8')
00254           length = len(_x)
00255         buff.write(struct.pack('<I%ss'%length, length, _x))
00256         _x = val1.description
00257         length = len(_x)
00258         if python3 or type(_x) == unicode:
00259           _x = _x.encode('utf-8')
00260           length = len(_x)
00261         buff.write(struct.pack('<I%ss'%length, length, _x))
00262         _v2 = val1.icon
00263         _x = _v2.format
00264         length = len(_x)
00265         if python3 or type(_x) == unicode:
00266           _x = _x.encode('utf-8')
00267           length = len(_x)
00268         buff.write(struct.pack('<I%ss'%length, length, _x))
00269         _x = _v2.data
00270         length = len(_x)
00271         # - if encoded as a list instead, serialize as bytes instead of string
00272         if type(_x) in [list, tuple]:
00273           buff.write(struct.pack('<I%sB'%length, length, *_x))
00274         else:
00275           buff.write(struct.pack('<I%ss'%length, length, _x))
00276         buff.write(_struct_B.pack(val1.hidden))
00277     except struct.error as se: self._check_types(se)
00278     except TypeError as te: self._check_types(te)
00279 
00280   def deserialize(self, str):
00281     """
00282     unpack serialized message in str into this message instance
00283     :param str: byte array of serialized message, ``str``
00284     """
00285     try:
00286       if self.installed_apps is None:
00287         self.installed_apps = None
00288       if self.available_apps is None:
00289         self.available_apps = None
00290       end = 0
00291       start = end
00292       end += 4
00293       (length,) = _struct_I.unpack(str[start:end])
00294       self.installed_apps = []
00295       for i in range(0, length):
00296         val1 = app_manager.msg.ExchangeApp()
00297         start = end
00298         end += 4
00299         (length,) = _struct_I.unpack(str[start:end])
00300         start = end
00301         end += length
00302         if python3:
00303           val1.name = str[start:end].decode('utf-8')
00304         else:
00305           val1.name = str[start:end]
00306         start = end
00307         end += 4
00308         (length,) = _struct_I.unpack(str[start:end])
00309         start = end
00310         end += length
00311         if python3:
00312           val1.display_name = str[start:end].decode('utf-8')
00313         else:
00314           val1.display_name = str[start:end]
00315         start = end
00316         end += 4
00317         (length,) = _struct_I.unpack(str[start:end])
00318         start = end
00319         end += length
00320         if python3:
00321           val1.version = str[start:end].decode('utf-8')
00322         else:
00323           val1.version = str[start:end]
00324         start = end
00325         end += 4
00326         (length,) = _struct_I.unpack(str[start:end])
00327         start = end
00328         end += length
00329         if python3:
00330           val1.latest_version = str[start:end].decode('utf-8')
00331         else:
00332           val1.latest_version = str[start:end]
00333         start = end
00334         end += 4
00335         (length,) = _struct_I.unpack(str[start:end])
00336         start = end
00337         end += length
00338         if python3:
00339           val1.description = str[start:end].decode('utf-8')
00340         else:
00341           val1.description = str[start:end]
00342         _v3 = val1.icon
00343         start = end
00344         end += 4
00345         (length,) = _struct_I.unpack(str[start:end])
00346         start = end
00347         end += length
00348         if python3:
00349           _v3.format = str[start:end].decode('utf-8')
00350         else:
00351           _v3.format = str[start:end]
00352         start = end
00353         end += 4
00354         (length,) = _struct_I.unpack(str[start:end])
00355         start = end
00356         end += length
00357         _v3.data = str[start:end]
00358         start = end
00359         end += 1
00360         (val1.hidden,) = _struct_B.unpack(str[start:end])
00361         val1.hidden = bool(val1.hidden)
00362         self.installed_apps.append(val1)
00363       start = end
00364       end += 4
00365       (length,) = _struct_I.unpack(str[start:end])
00366       self.available_apps = []
00367       for i in range(0, length):
00368         val1 = app_manager.msg.ExchangeApp()
00369         start = end
00370         end += 4
00371         (length,) = _struct_I.unpack(str[start:end])
00372         start = end
00373         end += length
00374         if python3:
00375           val1.name = str[start:end].decode('utf-8')
00376         else:
00377           val1.name = str[start:end]
00378         start = end
00379         end += 4
00380         (length,) = _struct_I.unpack(str[start:end])
00381         start = end
00382         end += length
00383         if python3:
00384           val1.display_name = str[start:end].decode('utf-8')
00385         else:
00386           val1.display_name = str[start:end]
00387         start = end
00388         end += 4
00389         (length,) = _struct_I.unpack(str[start:end])
00390         start = end
00391         end += length
00392         if python3:
00393           val1.version = str[start:end].decode('utf-8')
00394         else:
00395           val1.version = str[start:end]
00396         start = end
00397         end += 4
00398         (length,) = _struct_I.unpack(str[start:end])
00399         start = end
00400         end += length
00401         if python3:
00402           val1.latest_version = str[start:end].decode('utf-8')
00403         else:
00404           val1.latest_version = str[start:end]
00405         start = end
00406         end += 4
00407         (length,) = _struct_I.unpack(str[start:end])
00408         start = end
00409         end += length
00410         if python3:
00411           val1.description = str[start:end].decode('utf-8')
00412         else:
00413           val1.description = str[start:end]
00414         _v4 = val1.icon
00415         start = end
00416         end += 4
00417         (length,) = _struct_I.unpack(str[start:end])
00418         start = end
00419         end += length
00420         if python3:
00421           _v4.format = str[start:end].decode('utf-8')
00422         else:
00423           _v4.format = str[start:end]
00424         start = end
00425         end += 4
00426         (length,) = _struct_I.unpack(str[start:end])
00427         start = end
00428         end += length
00429         _v4.data = str[start:end]
00430         start = end
00431         end += 1
00432         (val1.hidden,) = _struct_B.unpack(str[start:end])
00433         val1.hidden = bool(val1.hidden)
00434         self.available_apps.append(val1)
00435       return self
00436     except struct.error as e:
00437       raise genpy.DeserializationError(e) #most likely buffer underfill
00438 
00439 
00440   def serialize_numpy(self, buff, numpy):
00441     """
00442     serialize message with numpy array types into buffer
00443     :param buff: buffer, ``StringIO``
00444     :param numpy: numpy python module
00445     """
00446     try:
00447       length = len(self.installed_apps)
00448       buff.write(_struct_I.pack(length))
00449       for val1 in self.installed_apps:
00450         _x = val1.name
00451         length = len(_x)
00452         if python3 or type(_x) == unicode:
00453           _x = _x.encode('utf-8')
00454           length = len(_x)
00455         buff.write(struct.pack('<I%ss'%length, length, _x))
00456         _x = val1.display_name
00457         length = len(_x)
00458         if python3 or type(_x) == unicode:
00459           _x = _x.encode('utf-8')
00460           length = len(_x)
00461         buff.write(struct.pack('<I%ss'%length, length, _x))
00462         _x = val1.version
00463         length = len(_x)
00464         if python3 or type(_x) == unicode:
00465           _x = _x.encode('utf-8')
00466           length = len(_x)
00467         buff.write(struct.pack('<I%ss'%length, length, _x))
00468         _x = val1.latest_version
00469         length = len(_x)
00470         if python3 or type(_x) == unicode:
00471           _x = _x.encode('utf-8')
00472           length = len(_x)
00473         buff.write(struct.pack('<I%ss'%length, length, _x))
00474         _x = val1.description
00475         length = len(_x)
00476         if python3 or type(_x) == unicode:
00477           _x = _x.encode('utf-8')
00478           length = len(_x)
00479         buff.write(struct.pack('<I%ss'%length, length, _x))
00480         _v5 = val1.icon
00481         _x = _v5.format
00482         length = len(_x)
00483         if python3 or type(_x) == unicode:
00484           _x = _x.encode('utf-8')
00485           length = len(_x)
00486         buff.write(struct.pack('<I%ss'%length, length, _x))
00487         _x = _v5.data
00488         length = len(_x)
00489         # - if encoded as a list instead, serialize as bytes instead of string
00490         if type(_x) in [list, tuple]:
00491           buff.write(struct.pack('<I%sB'%length, length, *_x))
00492         else:
00493           buff.write(struct.pack('<I%ss'%length, length, _x))
00494         buff.write(_struct_B.pack(val1.hidden))
00495       length = len(self.available_apps)
00496       buff.write(_struct_I.pack(length))
00497       for val1 in self.available_apps:
00498         _x = val1.name
00499         length = len(_x)
00500         if python3 or type(_x) == unicode:
00501           _x = _x.encode('utf-8')
00502           length = len(_x)
00503         buff.write(struct.pack('<I%ss'%length, length, _x))
00504         _x = val1.display_name
00505         length = len(_x)
00506         if python3 or type(_x) == unicode:
00507           _x = _x.encode('utf-8')
00508           length = len(_x)
00509         buff.write(struct.pack('<I%ss'%length, length, _x))
00510         _x = val1.version
00511         length = len(_x)
00512         if python3 or type(_x) == unicode:
00513           _x = _x.encode('utf-8')
00514           length = len(_x)
00515         buff.write(struct.pack('<I%ss'%length, length, _x))
00516         _x = val1.latest_version
00517         length = len(_x)
00518         if python3 or type(_x) == unicode:
00519           _x = _x.encode('utf-8')
00520           length = len(_x)
00521         buff.write(struct.pack('<I%ss'%length, length, _x))
00522         _x = val1.description
00523         length = len(_x)
00524         if python3 or type(_x) == unicode:
00525           _x = _x.encode('utf-8')
00526           length = len(_x)
00527         buff.write(struct.pack('<I%ss'%length, length, _x))
00528         _v6 = val1.icon
00529         _x = _v6.format
00530         length = len(_x)
00531         if python3 or type(_x) == unicode:
00532           _x = _x.encode('utf-8')
00533           length = len(_x)
00534         buff.write(struct.pack('<I%ss'%length, length, _x))
00535         _x = _v6.data
00536         length = len(_x)
00537         # - if encoded as a list instead, serialize as bytes instead of string
00538         if type(_x) in [list, tuple]:
00539           buff.write(struct.pack('<I%sB'%length, length, *_x))
00540         else:
00541           buff.write(struct.pack('<I%ss'%length, length, _x))
00542         buff.write(_struct_B.pack(val1.hidden))
00543     except struct.error as se: self._check_types(se)
00544     except TypeError as te: self._check_types(te)
00545 
00546   def deserialize_numpy(self, str, numpy):
00547     """
00548     unpack serialized message in str into this message instance using numpy for array types
00549     :param str: byte array of serialized message, ``str``
00550     :param numpy: numpy python module
00551     """
00552     try:
00553       if self.installed_apps is None:
00554         self.installed_apps = None
00555       if self.available_apps is None:
00556         self.available_apps = None
00557       end = 0
00558       start = end
00559       end += 4
00560       (length,) = _struct_I.unpack(str[start:end])
00561       self.installed_apps = []
00562       for i in range(0, length):
00563         val1 = app_manager.msg.ExchangeApp()
00564         start = end
00565         end += 4
00566         (length,) = _struct_I.unpack(str[start:end])
00567         start = end
00568         end += length
00569         if python3:
00570           val1.name = str[start:end].decode('utf-8')
00571         else:
00572           val1.name = str[start:end]
00573         start = end
00574         end += 4
00575         (length,) = _struct_I.unpack(str[start:end])
00576         start = end
00577         end += length
00578         if python3:
00579           val1.display_name = str[start:end].decode('utf-8')
00580         else:
00581           val1.display_name = str[start:end]
00582         start = end
00583         end += 4
00584         (length,) = _struct_I.unpack(str[start:end])
00585         start = end
00586         end += length
00587         if python3:
00588           val1.version = str[start:end].decode('utf-8')
00589         else:
00590           val1.version = str[start:end]
00591         start = end
00592         end += 4
00593         (length,) = _struct_I.unpack(str[start:end])
00594         start = end
00595         end += length
00596         if python3:
00597           val1.latest_version = str[start:end].decode('utf-8')
00598         else:
00599           val1.latest_version = str[start:end]
00600         start = end
00601         end += 4
00602         (length,) = _struct_I.unpack(str[start:end])
00603         start = end
00604         end += length
00605         if python3:
00606           val1.description = str[start:end].decode('utf-8')
00607         else:
00608           val1.description = str[start:end]
00609         _v7 = val1.icon
00610         start = end
00611         end += 4
00612         (length,) = _struct_I.unpack(str[start:end])
00613         start = end
00614         end += length
00615         if python3:
00616           _v7.format = str[start:end].decode('utf-8')
00617         else:
00618           _v7.format = str[start:end]
00619         start = end
00620         end += 4
00621         (length,) = _struct_I.unpack(str[start:end])
00622         start = end
00623         end += length
00624         _v7.data = str[start:end]
00625         start = end
00626         end += 1
00627         (val1.hidden,) = _struct_B.unpack(str[start:end])
00628         val1.hidden = bool(val1.hidden)
00629         self.installed_apps.append(val1)
00630       start = end
00631       end += 4
00632       (length,) = _struct_I.unpack(str[start:end])
00633       self.available_apps = []
00634       for i in range(0, length):
00635         val1 = app_manager.msg.ExchangeApp()
00636         start = end
00637         end += 4
00638         (length,) = _struct_I.unpack(str[start:end])
00639         start = end
00640         end += length
00641         if python3:
00642           val1.name = str[start:end].decode('utf-8')
00643         else:
00644           val1.name = str[start:end]
00645         start = end
00646         end += 4
00647         (length,) = _struct_I.unpack(str[start:end])
00648         start = end
00649         end += length
00650         if python3:
00651           val1.display_name = str[start:end].decode('utf-8')
00652         else:
00653           val1.display_name = str[start:end]
00654         start = end
00655         end += 4
00656         (length,) = _struct_I.unpack(str[start:end])
00657         start = end
00658         end += length
00659         if python3:
00660           val1.version = str[start:end].decode('utf-8')
00661         else:
00662           val1.version = str[start:end]
00663         start = end
00664         end += 4
00665         (length,) = _struct_I.unpack(str[start:end])
00666         start = end
00667         end += length
00668         if python3:
00669           val1.latest_version = str[start:end].decode('utf-8')
00670         else:
00671           val1.latest_version = str[start:end]
00672         start = end
00673         end += 4
00674         (length,) = _struct_I.unpack(str[start:end])
00675         start = end
00676         end += length
00677         if python3:
00678           val1.description = str[start:end].decode('utf-8')
00679         else:
00680           val1.description = str[start:end]
00681         _v8 = val1.icon
00682         start = end
00683         end += 4
00684         (length,) = _struct_I.unpack(str[start:end])
00685         start = end
00686         end += length
00687         if python3:
00688           _v8.format = str[start:end].decode('utf-8')
00689         else:
00690           _v8.format = str[start:end]
00691         start = end
00692         end += 4
00693         (length,) = _struct_I.unpack(str[start:end])
00694         start = end
00695         end += length
00696         _v8.data = str[start:end]
00697         start = end
00698         end += 1
00699         (val1.hidden,) = _struct_B.unpack(str[start:end])
00700         val1.hidden = bool(val1.hidden)
00701         self.available_apps.append(val1)
00702       return self
00703     except struct.error as e:
00704       raise genpy.DeserializationError(e) #most likely buffer underfill
00705 
00706 _struct_I = genpy.struct_I
00707 _struct_B = struct.Struct("<B")
00708 class GetInstallationState(object):
00709   _type          = 'app_manager/GetInstallationState'
00710   _md5sum = '28f0a7294f6241e2423a9382e3c76987'
00711   _request_class  = GetInstallationStateRequest
00712   _response_class = GetInstallationStateResponse


app_manager
Author(s): Jeremy Leibs, Ken Conley
autogenerated on Mon Dec 2 2013 13:03:54