_StartApp.py
Go to the documentation of this file.
00001 """autogenerated by genpy from appmanager_comms/StartAppRequest.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 StartAppRequest(genpy.Message):
00009   _md5sum = "c1f3d28f1b044c871e6eff2e9fc3c667"
00010   _type = "appmanager_comms/StartAppRequest"
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(StartAppRequest, 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(se)
00060     except TypeError as te: self._check_types(te)
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(se)
00097     except TypeError as te: self._check_types(te)
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 appmanager_comms/StartAppResponse.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 StartAppResponse(genpy.Message):
00129   _md5sum = "d47dedd876ba5df1daf4654018d1329b"
00130   _type = "appmanager_comms/StartAppResponse"
00131   _has_header = False #flag to mark the presence of a Header object
00132   _full_text = """
00133 bool started
00134 
00135 
00136 int32 error_code
00137 
00138 string message
00139 
00140 string app_namespace
00141 
00142 
00143 """
00144   __slots__ = ['started','error_code','message','app_namespace']
00145   _slot_types = ['bool','int32','string','string']
00146 
00147   def __init__(self, *args, **kwds):
00148     """
00149     Constructor. Any message fields that are implicitly/explicitly
00150     set to None will be assigned a default value. The recommend
00151     use is keyword arguments as this is more robust to future message
00152     changes.  You cannot mix in-order arguments and keyword arguments.
00153 
00154     The available fields are:
00155        started,error_code,message,app_namespace
00156 
00157     :param args: complete set of field values, in .msg order
00158     :param kwds: use keyword arguments corresponding to message field names
00159     to set specific fields.
00160     """
00161     if args or kwds:
00162       super(StartAppResponse, self).__init__(*args, **kwds)
00163       #message fields cannot be None, assign default values for those that are
00164       if self.started is None:
00165         self.started = False
00166       if self.error_code is None:
00167         self.error_code = 0
00168       if self.message is None:
00169         self.message = ''
00170       if self.app_namespace is None:
00171         self.app_namespace = ''
00172     else:
00173       self.started = False
00174       self.error_code = 0
00175       self.message = ''
00176       self.app_namespace = ''
00177 
00178   def _get_types(self):
00179     """
00180     internal API method
00181     """
00182     return self._slot_types
00183 
00184   def serialize(self, buff):
00185     """
00186     serialize message into buffer
00187     :param buff: buffer, ``StringIO``
00188     """
00189     try:
00190       _x = self
00191       buff.write(_struct_Bi.pack(_x.started, _x.error_code))
00192       _x = self.message
00193       length = len(_x)
00194       if python3 or type(_x) == unicode:
00195         _x = _x.encode('utf-8')
00196         length = len(_x)
00197       buff.write(struct.pack('<I%ss'%length, length, _x))
00198       _x = self.app_namespace
00199       length = len(_x)
00200       if python3 or type(_x) == unicode:
00201         _x = _x.encode('utf-8')
00202         length = len(_x)
00203       buff.write(struct.pack('<I%ss'%length, length, _x))
00204     except struct.error as se: self._check_types(se)
00205     except TypeError as te: self._check_types(te)
00206 
00207   def deserialize(self, str):
00208     """
00209     unpack serialized message in str into this message instance
00210     :param str: byte array of serialized message, ``str``
00211     """
00212     try:
00213       end = 0
00214       _x = self
00215       start = end
00216       end += 5
00217       (_x.started, _x.error_code,) = _struct_Bi.unpack(str[start:end])
00218       self.started = bool(self.started)
00219       start = end
00220       end += 4
00221       (length,) = _struct_I.unpack(str[start:end])
00222       start = end
00223       end += length
00224       if python3:
00225         self.message = str[start:end].decode('utf-8')
00226       else:
00227         self.message = str[start:end]
00228       start = end
00229       end += 4
00230       (length,) = _struct_I.unpack(str[start:end])
00231       start = end
00232       end += length
00233       if python3:
00234         self.app_namespace = str[start:end].decode('utf-8')
00235       else:
00236         self.app_namespace = str[start:end]
00237       return self
00238     except struct.error as e:
00239       raise genpy.DeserializationError(e) #most likely buffer underfill
00240 
00241 
00242   def serialize_numpy(self, buff, numpy):
00243     """
00244     serialize message with numpy array types into buffer
00245     :param buff: buffer, ``StringIO``
00246     :param numpy: numpy python module
00247     """
00248     try:
00249       _x = self
00250       buff.write(_struct_Bi.pack(_x.started, _x.error_code))
00251       _x = self.message
00252       length = len(_x)
00253       if python3 or type(_x) == unicode:
00254         _x = _x.encode('utf-8')
00255         length = len(_x)
00256       buff.write(struct.pack('<I%ss'%length, length, _x))
00257       _x = self.app_namespace
00258       length = len(_x)
00259       if python3 or type(_x) == unicode:
00260         _x = _x.encode('utf-8')
00261         length = len(_x)
00262       buff.write(struct.pack('<I%ss'%length, length, _x))
00263     except struct.error as se: self._check_types(se)
00264     except TypeError as te: self._check_types(te)
00265 
00266   def deserialize_numpy(self, str, numpy):
00267     """
00268     unpack serialized message in str into this message instance using numpy for array types
00269     :param str: byte array of serialized message, ``str``
00270     :param numpy: numpy python module
00271     """
00272     try:
00273       end = 0
00274       _x = self
00275       start = end
00276       end += 5
00277       (_x.started, _x.error_code,) = _struct_Bi.unpack(str[start:end])
00278       self.started = bool(self.started)
00279       start = end
00280       end += 4
00281       (length,) = _struct_I.unpack(str[start:end])
00282       start = end
00283       end += length
00284       if python3:
00285         self.message = str[start:end].decode('utf-8')
00286       else:
00287         self.message = str[start:end]
00288       start = end
00289       end += 4
00290       (length,) = _struct_I.unpack(str[start:end])
00291       start = end
00292       end += length
00293       if python3:
00294         self.app_namespace = str[start:end].decode('utf-8')
00295       else:
00296         self.app_namespace = str[start:end]
00297       return self
00298     except struct.error as e:
00299       raise genpy.DeserializationError(e) #most likely buffer underfill
00300 
00301 _struct_I = genpy.struct_I
00302 _struct_Bi = struct.Struct("<Bi")
00303 class StartApp(object):
00304   _type          = 'appmanager_comms/StartApp'
00305   _md5sum = '6dd493d3068fb4f05b6fd5f062476a00'
00306   _request_class  = StartAppRequest
00307   _response_class = StartAppResponse
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends


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