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


appmanager_comms
Author(s): Jihoon
autogenerated on Wed Nov 21 2012 15:01:46