_StartApp.py
Go to the documentation of this file.
00001 """autogenerated by genpy from appmanager_msgs/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 import appmanager_msgs.msg
00008 
00009 class StartAppRequest(genpy.Message):
00010   _md5sum = "52a705a1e5933de18edbae79e2aafe49"
00011   _type = "appmanager_msgs/StartAppRequest"
00012   _has_header = False #flag to mark the presence of a Header object
00013   _full_text = """
00014 string name
00015 Remapping[] remappings
00016 
00017 ================================================================================
00018 MSG: appmanager_msgs/Remapping
00019 # Describes your typical ros remapping
00020 
00021 string remap_from
00022 string remap_to
00023 
00024 """
00025   __slots__ = ['name','remappings']
00026   _slot_types = ['string','appmanager_msgs/Remapping[]']
00027 
00028   def __init__(self, *args, **kwds):
00029     """
00030     Constructor. Any message fields that are implicitly/explicitly
00031     set to None will be assigned a default value. The recommend
00032     use is keyword arguments as this is more robust to future message
00033     changes.  You cannot mix in-order arguments and keyword arguments.
00034 
00035     The available fields are:
00036        name,remappings
00037 
00038     :param args: complete set of field values, in .msg order
00039     :param kwds: use keyword arguments corresponding to message field names
00040     to set specific fields.
00041     """
00042     if args or kwds:
00043       super(StartAppRequest, self).__init__(*args, **kwds)
00044       #message fields cannot be None, assign default values for those that are
00045       if self.name is None:
00046         self.name = ''
00047       if self.remappings is None:
00048         self.remappings = []
00049     else:
00050       self.name = ''
00051       self.remappings = []
00052 
00053   def _get_types(self):
00054     """
00055     internal API method
00056     """
00057     return self._slot_types
00058 
00059   def serialize(self, buff):
00060     """
00061     serialize message into buffer
00062     :param buff: buffer, ``StringIO``
00063     """
00064     try:
00065       _x = self.name
00066       length = len(_x)
00067       if python3 or type(_x) == unicode:
00068         _x = _x.encode('utf-8')
00069         length = len(_x)
00070       buff.write(struct.pack('<I%ss'%length, length, _x))
00071       length = len(self.remappings)
00072       buff.write(_struct_I.pack(length))
00073       for val1 in self.remappings:
00074         _x = val1.remap_from
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 = val1.remap_to
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     except struct.error as se: self._check_types(se)
00087     except TypeError as te: self._check_types(te)
00088 
00089   def deserialize(self, str):
00090     """
00091     unpack serialized message in str into this message instance
00092     :param str: byte array of serialized message, ``str``
00093     """
00094     try:
00095       if self.remappings is None:
00096         self.remappings = None
00097       end = 0
00098       start = end
00099       end += 4
00100       (length,) = _struct_I.unpack(str[start:end])
00101       start = end
00102       end += length
00103       if python3:
00104         self.name = str[start:end].decode('utf-8')
00105       else:
00106         self.name = str[start:end]
00107       start = end
00108       end += 4
00109       (length,) = _struct_I.unpack(str[start:end])
00110       self.remappings = []
00111       for i in range(0, length):
00112         val1 = appmanager_msgs.msg.Remapping()
00113         start = end
00114         end += 4
00115         (length,) = _struct_I.unpack(str[start:end])
00116         start = end
00117         end += length
00118         if python3:
00119           val1.remap_from = str[start:end].decode('utf-8')
00120         else:
00121           val1.remap_from = str[start:end]
00122         start = end
00123         end += 4
00124         (length,) = _struct_I.unpack(str[start:end])
00125         start = end
00126         end += length
00127         if python3:
00128           val1.remap_to = str[start:end].decode('utf-8')
00129         else:
00130           val1.remap_to = str[start:end]
00131         self.remappings.append(val1)
00132       return self
00133     except struct.error as e:
00134       raise genpy.DeserializationError(e) #most likely buffer underfill
00135 
00136 
00137   def serialize_numpy(self, buff, numpy):
00138     """
00139     serialize message with numpy array types into buffer
00140     :param buff: buffer, ``StringIO``
00141     :param numpy: numpy python module
00142     """
00143     try:
00144       _x = self.name
00145       length = len(_x)
00146       if python3 or type(_x) == unicode:
00147         _x = _x.encode('utf-8')
00148         length = len(_x)
00149       buff.write(struct.pack('<I%ss'%length, length, _x))
00150       length = len(self.remappings)
00151       buff.write(_struct_I.pack(length))
00152       for val1 in self.remappings:
00153         _x = val1.remap_from
00154         length = len(_x)
00155         if python3 or type(_x) == unicode:
00156           _x = _x.encode('utf-8')
00157           length = len(_x)
00158         buff.write(struct.pack('<I%ss'%length, length, _x))
00159         _x = val1.remap_to
00160         length = len(_x)
00161         if python3 or type(_x) == unicode:
00162           _x = _x.encode('utf-8')
00163           length = len(_x)
00164         buff.write(struct.pack('<I%ss'%length, length, _x))
00165     except struct.error as se: self._check_types(se)
00166     except TypeError as te: self._check_types(te)
00167 
00168   def deserialize_numpy(self, str, numpy):
00169     """
00170     unpack serialized message in str into this message instance using numpy for array types
00171     :param str: byte array of serialized message, ``str``
00172     :param numpy: numpy python module
00173     """
00174     try:
00175       if self.remappings is None:
00176         self.remappings = None
00177       end = 0
00178       start = end
00179       end += 4
00180       (length,) = _struct_I.unpack(str[start:end])
00181       start = end
00182       end += length
00183       if python3:
00184         self.name = str[start:end].decode('utf-8')
00185       else:
00186         self.name = str[start:end]
00187       start = end
00188       end += 4
00189       (length,) = _struct_I.unpack(str[start:end])
00190       self.remappings = []
00191       for i in range(0, length):
00192         val1 = appmanager_msgs.msg.Remapping()
00193         start = end
00194         end += 4
00195         (length,) = _struct_I.unpack(str[start:end])
00196         start = end
00197         end += length
00198         if python3:
00199           val1.remap_from = str[start:end].decode('utf-8')
00200         else:
00201           val1.remap_from = str[start:end]
00202         start = end
00203         end += 4
00204         (length,) = _struct_I.unpack(str[start:end])
00205         start = end
00206         end += length
00207         if python3:
00208           val1.remap_to = str[start:end].decode('utf-8')
00209         else:
00210           val1.remap_to = str[start:end]
00211         self.remappings.append(val1)
00212       return self
00213     except struct.error as e:
00214       raise genpy.DeserializationError(e) #most likely buffer underfill
00215 
00216 _struct_I = genpy.struct_I
00217 """autogenerated by genpy from appmanager_msgs/StartAppResponse.msg. Do not edit."""
00218 import sys
00219 python3 = True if sys.hexversion > 0x03000000 else False
00220 import genpy
00221 import struct
00222 
00223 
00224 class StartAppResponse(genpy.Message):
00225   _md5sum = "d47dedd876ba5df1daf4654018d1329b"
00226   _type = "appmanager_msgs/StartAppResponse"
00227   _has_header = False #flag to mark the presence of a Header object
00228   _full_text = """
00229 bool started
00230 
00231 
00232 int32 error_code
00233 
00234 string message
00235 
00236 string app_namespace
00237 
00238 
00239 """
00240   __slots__ = ['started','error_code','message','app_namespace']
00241   _slot_types = ['bool','int32','string','string']
00242 
00243   def __init__(self, *args, **kwds):
00244     """
00245     Constructor. Any message fields that are implicitly/explicitly
00246     set to None will be assigned a default value. The recommend
00247     use is keyword arguments as this is more robust to future message
00248     changes.  You cannot mix in-order arguments and keyword arguments.
00249 
00250     The available fields are:
00251        started,error_code,message,app_namespace
00252 
00253     :param args: complete set of field values, in .msg order
00254     :param kwds: use keyword arguments corresponding to message field names
00255     to set specific fields.
00256     """
00257     if args or kwds:
00258       super(StartAppResponse, self).__init__(*args, **kwds)
00259       #message fields cannot be None, assign default values for those that are
00260       if self.started is None:
00261         self.started = False
00262       if self.error_code is None:
00263         self.error_code = 0
00264       if self.message is None:
00265         self.message = ''
00266       if self.app_namespace is None:
00267         self.app_namespace = ''
00268     else:
00269       self.started = False
00270       self.error_code = 0
00271       self.message = ''
00272       self.app_namespace = ''
00273 
00274   def _get_types(self):
00275     """
00276     internal API method
00277     """
00278     return self._slot_types
00279 
00280   def serialize(self, buff):
00281     """
00282     serialize message into buffer
00283     :param buff: buffer, ``StringIO``
00284     """
00285     try:
00286       _x = self
00287       buff.write(_struct_Bi.pack(_x.started, _x.error_code))
00288       _x = self.message
00289       length = len(_x)
00290       if python3 or type(_x) == unicode:
00291         _x = _x.encode('utf-8')
00292         length = len(_x)
00293       buff.write(struct.pack('<I%ss'%length, length, _x))
00294       _x = self.app_namespace
00295       length = len(_x)
00296       if python3 or type(_x) == unicode:
00297         _x = _x.encode('utf-8')
00298         length = len(_x)
00299       buff.write(struct.pack('<I%ss'%length, length, _x))
00300     except struct.error as se: self._check_types(se)
00301     except TypeError as te: self._check_types(te)
00302 
00303   def deserialize(self, str):
00304     """
00305     unpack serialized message in str into this message instance
00306     :param str: byte array of serialized message, ``str``
00307     """
00308     try:
00309       end = 0
00310       _x = self
00311       start = end
00312       end += 5
00313       (_x.started, _x.error_code,) = _struct_Bi.unpack(str[start:end])
00314       self.started = bool(self.started)
00315       start = end
00316       end += 4
00317       (length,) = _struct_I.unpack(str[start:end])
00318       start = end
00319       end += length
00320       if python3:
00321         self.message = str[start:end].decode('utf-8')
00322       else:
00323         self.message = 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         self.app_namespace = str[start:end].decode('utf-8')
00331       else:
00332         self.app_namespace = str[start:end]
00333       return self
00334     except struct.error as e:
00335       raise genpy.DeserializationError(e) #most likely buffer underfill
00336 
00337 
00338   def serialize_numpy(self, buff, numpy):
00339     """
00340     serialize message with numpy array types into buffer
00341     :param buff: buffer, ``StringIO``
00342     :param numpy: numpy python module
00343     """
00344     try:
00345       _x = self
00346       buff.write(_struct_Bi.pack(_x.started, _x.error_code))
00347       _x = self.message
00348       length = len(_x)
00349       if python3 or type(_x) == unicode:
00350         _x = _x.encode('utf-8')
00351         length = len(_x)
00352       buff.write(struct.pack('<I%ss'%length, length, _x))
00353       _x = self.app_namespace
00354       length = len(_x)
00355       if python3 or type(_x) == unicode:
00356         _x = _x.encode('utf-8')
00357         length = len(_x)
00358       buff.write(struct.pack('<I%ss'%length, length, _x))
00359     except struct.error as se: self._check_types(se)
00360     except TypeError as te: self._check_types(te)
00361 
00362   def deserialize_numpy(self, str, numpy):
00363     """
00364     unpack serialized message in str into this message instance using numpy for array types
00365     :param str: byte array of serialized message, ``str``
00366     :param numpy: numpy python module
00367     """
00368     try:
00369       end = 0
00370       _x = self
00371       start = end
00372       end += 5
00373       (_x.started, _x.error_code,) = _struct_Bi.unpack(str[start:end])
00374       self.started = bool(self.started)
00375       start = end
00376       end += 4
00377       (length,) = _struct_I.unpack(str[start:end])
00378       start = end
00379       end += length
00380       if python3:
00381         self.message = str[start:end].decode('utf-8')
00382       else:
00383         self.message = str[start:end]
00384       start = end
00385       end += 4
00386       (length,) = _struct_I.unpack(str[start:end])
00387       start = end
00388       end += length
00389       if python3:
00390         self.app_namespace = str[start:end].decode('utf-8')
00391       else:
00392         self.app_namespace = str[start:end]
00393       return self
00394     except struct.error as e:
00395       raise genpy.DeserializationError(e) #most likely buffer underfill
00396 
00397 _struct_I = genpy.struct_I
00398 _struct_Bi = struct.Struct("<Bi")
00399 class StartApp(object):
00400   _type          = 'appmanager_msgs/StartApp'
00401   _md5sum = '874c7bc77072181994bed643cfd4d8d5'
00402   _request_class  = StartAppRequest
00403   _response_class = StartAppResponse
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends


appmanager_msgs
Author(s): Jihoon
autogenerated on Tue Jan 15 2013 20:38:24