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


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