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