_StopApp.py
Go to the documentation of this file.
00001 """autogenerated by genpy from app_manager/StopAppRequest.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 StopAppRequest(genpy.Message):
00009   _md5sum = "c1f3d28f1b044c871e6eff2e9fc3c667"
00010   _type = "app_manager/StopAppRequest"
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(StopAppRequest, 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 app_manager/StopAppResponse.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 StopAppResponse(genpy.Message):
00129   _md5sum = "1f94f0ff0fc0fde186f728634f98a3cb"
00130   _type = "app_manager/StopAppResponse"
00131   _has_header = False #flag to mark the presence of a Header object
00132   _full_text = """
00133 bool stopped
00134 
00135 
00136 int32 error_code
00137 string message
00138 
00139 
00140 """
00141   __slots__ = ['stopped','error_code','message']
00142   _slot_types = ['bool','int32','string']
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        stopped,error_code,message
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(StopAppResponse, self).__init__(*args, **kwds)
00160       #message fields cannot be None, assign default values for those that are
00161       if self.stopped is None:
00162         self.stopped = False
00163       if self.error_code is None:
00164         self.error_code = 0
00165       if self.message is None:
00166         self.message = ''
00167     else:
00168       self.stopped = False
00169       self.error_code = 0
00170       self.message = ''
00171 
00172   def _get_types(self):
00173     """
00174     internal API method
00175     """
00176     return self._slot_types
00177 
00178   def serialize(self, buff):
00179     """
00180     serialize message into buffer
00181     :param buff: buffer, ``StringIO``
00182     """
00183     try:
00184       _x = self
00185       buff.write(_struct_Bi.pack(_x.stopped, _x.error_code))
00186       _x = self.message
00187       length = len(_x)
00188       if python3 or type(_x) == unicode:
00189         _x = _x.encode('utf-8')
00190         length = len(_x)
00191       buff.write(struct.pack('<I%ss'%length, length, _x))
00192     except struct.error as se: self._check_types(se)
00193     except TypeError as te: self._check_types(te)
00194 
00195   def deserialize(self, str):
00196     """
00197     unpack serialized message in str into this message instance
00198     :param str: byte array of serialized message, ``str``
00199     """
00200     try:
00201       end = 0
00202       _x = self
00203       start = end
00204       end += 5
00205       (_x.stopped, _x.error_code,) = _struct_Bi.unpack(str[start:end])
00206       self.stopped = bool(self.stopped)
00207       start = end
00208       end += 4
00209       (length,) = _struct_I.unpack(str[start:end])
00210       start = end
00211       end += length
00212       if python3:
00213         self.message = str[start:end].decode('utf-8')
00214       else:
00215         self.message = str[start:end]
00216       return self
00217     except struct.error as e:
00218       raise genpy.DeserializationError(e) #most likely buffer underfill
00219 
00220 
00221   def serialize_numpy(self, buff, numpy):
00222     """
00223     serialize message with numpy array types into buffer
00224     :param buff: buffer, ``StringIO``
00225     :param numpy: numpy python module
00226     """
00227     try:
00228       _x = self
00229       buff.write(_struct_Bi.pack(_x.stopped, _x.error_code))
00230       _x = self.message
00231       length = len(_x)
00232       if python3 or type(_x) == unicode:
00233         _x = _x.encode('utf-8')
00234         length = len(_x)
00235       buff.write(struct.pack('<I%ss'%length, length, _x))
00236     except struct.error as se: self._check_types(se)
00237     except TypeError as te: self._check_types(te)
00238 
00239   def deserialize_numpy(self, str, numpy):
00240     """
00241     unpack serialized message in str into this message instance using numpy for array types
00242     :param str: byte array of serialized message, ``str``
00243     :param numpy: numpy python module
00244     """
00245     try:
00246       end = 0
00247       _x = self
00248       start = end
00249       end += 5
00250       (_x.stopped, _x.error_code,) = _struct_Bi.unpack(str[start:end])
00251       self.stopped = bool(self.stopped)
00252       start = end
00253       end += 4
00254       (length,) = _struct_I.unpack(str[start:end])
00255       start = end
00256       end += length
00257       if python3:
00258         self.message = str[start:end].decode('utf-8')
00259       else:
00260         self.message = str[start:end]
00261       return self
00262     except struct.error as e:
00263       raise genpy.DeserializationError(e) #most likely buffer underfill
00264 
00265 _struct_I = genpy.struct_I
00266 _struct_Bi = struct.Struct("<Bi")
00267 class StopApp(object):
00268   _type          = 'app_manager/StopApp'
00269   _md5sum = '57711838d4a1faddc5043a742845018b'
00270   _request_class  = StopAppRequest
00271   _response_class = StopAppResponse


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