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


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