$search
00001 """autogenerated by genmsg_py from StopAppRequest.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class StopAppRequest(roslib.message.Message): 00007 _md5sum = "c1f3d28f1b044c871e6eff2e9fc3c667" 00008 _type = "app_manager/StopAppRequest" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """ 00011 string name 00012 00013 """ 00014 __slots__ = ['name'] 00015 _slot_types = ['string'] 00016 00017 def __init__(self, *args, **kwds): 00018 """ 00019 Constructor. Any message fields that are implicitly/explicitly 00020 set to None will be assigned a default value. The recommend 00021 use is keyword arguments as this is more robust to future message 00022 changes. You cannot mix in-order arguments and keyword arguments. 00023 00024 The available fields are: 00025 name 00026 00027 @param args: complete set of field values, in .msg order 00028 @param kwds: use keyword arguments corresponding to message field names 00029 to set specific fields. 00030 """ 00031 if args or kwds: 00032 super(StopAppRequest, self).__init__(*args, **kwds) 00033 #message fields cannot be None, assign default values for those that are 00034 if self.name is None: 00035 self.name = '' 00036 else: 00037 self.name = '' 00038 00039 def _get_types(self): 00040 """ 00041 internal API method 00042 """ 00043 return self._slot_types 00044 00045 def serialize(self, buff): 00046 """ 00047 serialize message into buffer 00048 @param buff: buffer 00049 @type buff: StringIO 00050 """ 00051 try: 00052 _x = self.name 00053 length = len(_x) 00054 buff.write(struct.pack('<I%ss'%length, length, _x)) 00055 except struct.error as se: self._check_types(se) 00056 except TypeError as te: self._check_types(te) 00057 00058 def deserialize(self, str): 00059 """ 00060 unpack serialized message in str into this message instance 00061 @param str: byte array of serialized message 00062 @type str: str 00063 """ 00064 try: 00065 end = 0 00066 start = end 00067 end += 4 00068 (length,) = _struct_I.unpack(str[start:end]) 00069 start = end 00070 end += length 00071 self.name = str[start:end] 00072 return self 00073 except struct.error as e: 00074 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00075 00076 00077 def serialize_numpy(self, buff, numpy): 00078 """ 00079 serialize message with numpy array types into buffer 00080 @param buff: buffer 00081 @type buff: StringIO 00082 @param numpy: numpy python module 00083 @type numpy module 00084 """ 00085 try: 00086 _x = self.name 00087 length = len(_x) 00088 buff.write(struct.pack('<I%ss'%length, length, _x)) 00089 except struct.error as se: self._check_types(se) 00090 except TypeError as te: self._check_types(te) 00091 00092 def deserialize_numpy(self, str, numpy): 00093 """ 00094 unpack serialized message in str into this message instance using numpy for array types 00095 @param str: byte array of serialized message 00096 @type str: str 00097 @param numpy: numpy python module 00098 @type numpy: module 00099 """ 00100 try: 00101 end = 0 00102 start = end 00103 end += 4 00104 (length,) = _struct_I.unpack(str[start:end]) 00105 start = end 00106 end += length 00107 self.name = str[start:end] 00108 return self 00109 except struct.error as e: 00110 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00111 00112 _struct_I = roslib.message.struct_I 00113 """autogenerated by genmsg_py from StopAppResponse.msg. Do not edit.""" 00114 import roslib.message 00115 import struct 00116 00117 00118 class StopAppResponse(roslib.message.Message): 00119 _md5sum = "1f94f0ff0fc0fde186f728634f98a3cb" 00120 _type = "app_manager/StopAppResponse" 00121 _has_header = False #flag to mark the presence of a Header object 00122 _full_text = """ 00123 bool stopped 00124 00125 00126 int32 error_code 00127 string message 00128 00129 00130 """ 00131 __slots__ = ['stopped','error_code','message'] 00132 _slot_types = ['bool','int32','string'] 00133 00134 def __init__(self, *args, **kwds): 00135 """ 00136 Constructor. Any message fields that are implicitly/explicitly 00137 set to None will be assigned a default value. The recommend 00138 use is keyword arguments as this is more robust to future message 00139 changes. You cannot mix in-order arguments and keyword arguments. 00140 00141 The available fields are: 00142 stopped,error_code,message 00143 00144 @param args: complete set of field values, in .msg order 00145 @param kwds: use keyword arguments corresponding to message field names 00146 to set specific fields. 00147 """ 00148 if args or kwds: 00149 super(StopAppResponse, self).__init__(*args, **kwds) 00150 #message fields cannot be None, assign default values for those that are 00151 if self.stopped is None: 00152 self.stopped = False 00153 if self.error_code is None: 00154 self.error_code = 0 00155 if self.message is None: 00156 self.message = '' 00157 else: 00158 self.stopped = False 00159 self.error_code = 0 00160 self.message = '' 00161 00162 def _get_types(self): 00163 """ 00164 internal API method 00165 """ 00166 return self._slot_types 00167 00168 def serialize(self, buff): 00169 """ 00170 serialize message into buffer 00171 @param buff: buffer 00172 @type buff: StringIO 00173 """ 00174 try: 00175 _x = self 00176 buff.write(_struct_Bi.pack(_x.stopped, _x.error_code)) 00177 _x = self.message 00178 length = len(_x) 00179 buff.write(struct.pack('<I%ss'%length, length, _x)) 00180 except struct.error as se: self._check_types(se) 00181 except TypeError as te: self._check_types(te) 00182 00183 def deserialize(self, str): 00184 """ 00185 unpack serialized message in str into this message instance 00186 @param str: byte array of serialized message 00187 @type str: str 00188 """ 00189 try: 00190 end = 0 00191 _x = self 00192 start = end 00193 end += 5 00194 (_x.stopped, _x.error_code,) = _struct_Bi.unpack(str[start:end]) 00195 self.stopped = bool(self.stopped) 00196 start = end 00197 end += 4 00198 (length,) = _struct_I.unpack(str[start:end]) 00199 start = end 00200 end += length 00201 self.message = str[start:end] 00202 return self 00203 except struct.error as e: 00204 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00205 00206 00207 def serialize_numpy(self, buff, numpy): 00208 """ 00209 serialize message with numpy array types into buffer 00210 @param buff: buffer 00211 @type buff: StringIO 00212 @param numpy: numpy python module 00213 @type numpy module 00214 """ 00215 try: 00216 _x = self 00217 buff.write(_struct_Bi.pack(_x.stopped, _x.error_code)) 00218 _x = self.message 00219 length = len(_x) 00220 buff.write(struct.pack('<I%ss'%length, length, _x)) 00221 except struct.error as se: self._check_types(se) 00222 except TypeError as te: self._check_types(te) 00223 00224 def deserialize_numpy(self, str, numpy): 00225 """ 00226 unpack serialized message in str into this message instance using numpy for array types 00227 @param str: byte array of serialized message 00228 @type str: str 00229 @param numpy: numpy python module 00230 @type numpy: module 00231 """ 00232 try: 00233 end = 0 00234 _x = self 00235 start = end 00236 end += 5 00237 (_x.stopped, _x.error_code,) = _struct_Bi.unpack(str[start:end]) 00238 self.stopped = bool(self.stopped) 00239 start = end 00240 end += 4 00241 (length,) = _struct_I.unpack(str[start:end]) 00242 start = end 00243 end += length 00244 self.message = str[start:end] 00245 return self 00246 except struct.error as e: 00247 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00248 00249 _struct_I = roslib.message.struct_I 00250 _struct_Bi = struct.Struct("<Bi") 00251 class StopApp(roslib.message.ServiceDefinition): 00252 _type = 'app_manager/StopApp' 00253 _md5sum = '57711838d4a1faddc5043a742845018b' 00254 _request_class = StopAppRequest 00255 _response_class = StopAppResponse