$search
00001 """autogenerated by genmsg_py from AddTaskRequest.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class AddTaskRequest(roslib.message.Message): 00007 _md5sum = "2b6ff28cc01b440b5e2f50ddfe7763c3" 00008 _type = "continuous_ops_msgs/AddTaskRequest" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """string task_id 00011 00012 """ 00013 __slots__ = ['task_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 task_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(AddTaskRequest, self).__init__(*args, **kwds) 00032 #message fields cannot be None, assign default values for those that are 00033 if self.task_id is None: 00034 self.task_id = '' 00035 else: 00036 self.task_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.task_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.task_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.task_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.task_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 AddTaskResponse.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 AddTaskResponse(roslib.message.Message): 00120 _md5sum = "979d5775818765dc12366ea52f087732" 00121 _type = "continuous_ops_msgs/AddTaskResponse" 00122 _has_header = False #flag to mark the presence of a Header object 00123 _full_text = """string run_id 00124 Task[] tasks 00125 00126 ================================================================================ 00127 MSG: continuous_ops_msgs/Task 00128 string name 00129 string description 00130 string task_id 00131 string run_id 00132 string launch_file 00133 string image_file 00134 string state 00135 string action_ns 00136 duration timeout 00137 """ 00138 __slots__ = ['run_id','tasks'] 00139 _slot_types = ['string','continuous_ops_msgs/Task[]'] 00140 00141 def __init__(self, *args, **kwds): 00142 """ 00143 Constructor. Any message fields that are implicitly/explicitly 00144 set to None will be assigned a default value. The recommend 00145 use is keyword arguments as this is more robust to future message 00146 changes. You cannot mix in-order arguments and keyword arguments. 00147 00148 The available fields are: 00149 run_id,tasks 00150 00151 @param args: complete set of field values, in .msg order 00152 @param kwds: use keyword arguments corresponding to message field names 00153 to set specific fields. 00154 """ 00155 if args or kwds: 00156 super(AddTaskResponse, self).__init__(*args, **kwds) 00157 #message fields cannot be None, assign default values for those that are 00158 if self.run_id is None: 00159 self.run_id = '' 00160 if self.tasks is None: 00161 self.tasks = [] 00162 else: 00163 self.run_id = '' 00164 self.tasks = [] 00165 00166 def _get_types(self): 00167 """ 00168 internal API method 00169 """ 00170 return self._slot_types 00171 00172 def serialize(self, buff): 00173 """ 00174 serialize message into buffer 00175 @param buff: buffer 00176 @type buff: StringIO 00177 """ 00178 try: 00179 _x = self.run_id 00180 length = len(_x) 00181 buff.write(struct.pack('<I%ss'%length, length, _x)) 00182 length = len(self.tasks) 00183 buff.write(_struct_I.pack(length)) 00184 for val1 in self.tasks: 00185 _x = val1.name 00186 length = len(_x) 00187 buff.write(struct.pack('<I%ss'%length, length, _x)) 00188 _x = val1.description 00189 length = len(_x) 00190 buff.write(struct.pack('<I%ss'%length, length, _x)) 00191 _x = val1.task_id 00192 length = len(_x) 00193 buff.write(struct.pack('<I%ss'%length, length, _x)) 00194 _x = val1.run_id 00195 length = len(_x) 00196 buff.write(struct.pack('<I%ss'%length, length, _x)) 00197 _x = val1.launch_file 00198 length = len(_x) 00199 buff.write(struct.pack('<I%ss'%length, length, _x)) 00200 _x = val1.image_file 00201 length = len(_x) 00202 buff.write(struct.pack('<I%ss'%length, length, _x)) 00203 _x = val1.state 00204 length = len(_x) 00205 buff.write(struct.pack('<I%ss'%length, length, _x)) 00206 _x = val1.action_ns 00207 length = len(_x) 00208 buff.write(struct.pack('<I%ss'%length, length, _x)) 00209 _v1 = val1.timeout 00210 _x = _v1 00211 buff.write(_struct_2i.pack(_x.secs, _x.nsecs)) 00212 except struct.error as se: self._check_types(se) 00213 except TypeError as te: self._check_types(te) 00214 00215 def deserialize(self, str): 00216 """ 00217 unpack serialized message in str into this message instance 00218 @param str: byte array of serialized message 00219 @type str: str 00220 """ 00221 try: 00222 end = 0 00223 start = end 00224 end += 4 00225 (length,) = _struct_I.unpack(str[start:end]) 00226 start = end 00227 end += length 00228 self.run_id = str[start:end] 00229 start = end 00230 end += 4 00231 (length,) = _struct_I.unpack(str[start:end]) 00232 self.tasks = [] 00233 for i in range(0, length): 00234 val1 = continuous_ops_msgs.msg.Task() 00235 start = end 00236 end += 4 00237 (length,) = _struct_I.unpack(str[start:end]) 00238 start = end 00239 end += length 00240 val1.name = str[start:end] 00241 start = end 00242 end += 4 00243 (length,) = _struct_I.unpack(str[start:end]) 00244 start = end 00245 end += length 00246 val1.description = str[start:end] 00247 start = end 00248 end += 4 00249 (length,) = _struct_I.unpack(str[start:end]) 00250 start = end 00251 end += length 00252 val1.task_id = str[start:end] 00253 start = end 00254 end += 4 00255 (length,) = _struct_I.unpack(str[start:end]) 00256 start = end 00257 end += length 00258 val1.run_id = str[start:end] 00259 start = end 00260 end += 4 00261 (length,) = _struct_I.unpack(str[start:end]) 00262 start = end 00263 end += length 00264 val1.launch_file = str[start:end] 00265 start = end 00266 end += 4 00267 (length,) = _struct_I.unpack(str[start:end]) 00268 start = end 00269 end += length 00270 val1.image_file = str[start:end] 00271 start = end 00272 end += 4 00273 (length,) = _struct_I.unpack(str[start:end]) 00274 start = end 00275 end += length 00276 val1.state = str[start:end] 00277 start = end 00278 end += 4 00279 (length,) = _struct_I.unpack(str[start:end]) 00280 start = end 00281 end += length 00282 val1.action_ns = str[start:end] 00283 _v2 = val1.timeout 00284 _x = _v2 00285 start = end 00286 end += 8 00287 (_x.secs, _x.nsecs,) = _struct_2i.unpack(str[start:end]) 00288 self.tasks.append(val1) 00289 return self 00290 except struct.error as e: 00291 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00292 00293 00294 def serialize_numpy(self, buff, numpy): 00295 """ 00296 serialize message with numpy array types into buffer 00297 @param buff: buffer 00298 @type buff: StringIO 00299 @param numpy: numpy python module 00300 @type numpy module 00301 """ 00302 try: 00303 _x = self.run_id 00304 length = len(_x) 00305 buff.write(struct.pack('<I%ss'%length, length, _x)) 00306 length = len(self.tasks) 00307 buff.write(_struct_I.pack(length)) 00308 for val1 in self.tasks: 00309 _x = val1.name 00310 length = len(_x) 00311 buff.write(struct.pack('<I%ss'%length, length, _x)) 00312 _x = val1.description 00313 length = len(_x) 00314 buff.write(struct.pack('<I%ss'%length, length, _x)) 00315 _x = val1.task_id 00316 length = len(_x) 00317 buff.write(struct.pack('<I%ss'%length, length, _x)) 00318 _x = val1.run_id 00319 length = len(_x) 00320 buff.write(struct.pack('<I%ss'%length, length, _x)) 00321 _x = val1.launch_file 00322 length = len(_x) 00323 buff.write(struct.pack('<I%ss'%length, length, _x)) 00324 _x = val1.image_file 00325 length = len(_x) 00326 buff.write(struct.pack('<I%ss'%length, length, _x)) 00327 _x = val1.state 00328 length = len(_x) 00329 buff.write(struct.pack('<I%ss'%length, length, _x)) 00330 _x = val1.action_ns 00331 length = len(_x) 00332 buff.write(struct.pack('<I%ss'%length, length, _x)) 00333 _v3 = val1.timeout 00334 _x = _v3 00335 buff.write(_struct_2i.pack(_x.secs, _x.nsecs)) 00336 except struct.error as se: self._check_types(se) 00337 except TypeError as te: self._check_types(te) 00338 00339 def deserialize_numpy(self, str, numpy): 00340 """ 00341 unpack serialized message in str into this message instance using numpy for array types 00342 @param str: byte array of serialized message 00343 @type str: str 00344 @param numpy: numpy python module 00345 @type numpy: module 00346 """ 00347 try: 00348 end = 0 00349 start = end 00350 end += 4 00351 (length,) = _struct_I.unpack(str[start:end]) 00352 start = end 00353 end += length 00354 self.run_id = str[start:end] 00355 start = end 00356 end += 4 00357 (length,) = _struct_I.unpack(str[start:end]) 00358 self.tasks = [] 00359 for i in range(0, length): 00360 val1 = continuous_ops_msgs.msg.Task() 00361 start = end 00362 end += 4 00363 (length,) = _struct_I.unpack(str[start:end]) 00364 start = end 00365 end += length 00366 val1.name = str[start:end] 00367 start = end 00368 end += 4 00369 (length,) = _struct_I.unpack(str[start:end]) 00370 start = end 00371 end += length 00372 val1.description = str[start:end] 00373 start = end 00374 end += 4 00375 (length,) = _struct_I.unpack(str[start:end]) 00376 start = end 00377 end += length 00378 val1.task_id = str[start:end] 00379 start = end 00380 end += 4 00381 (length,) = _struct_I.unpack(str[start:end]) 00382 start = end 00383 end += length 00384 val1.run_id = str[start:end] 00385 start = end 00386 end += 4 00387 (length,) = _struct_I.unpack(str[start:end]) 00388 start = end 00389 end += length 00390 val1.launch_file = str[start:end] 00391 start = end 00392 end += 4 00393 (length,) = _struct_I.unpack(str[start:end]) 00394 start = end 00395 end += length 00396 val1.image_file = str[start:end] 00397 start = end 00398 end += 4 00399 (length,) = _struct_I.unpack(str[start:end]) 00400 start = end 00401 end += length 00402 val1.state = str[start:end] 00403 start = end 00404 end += 4 00405 (length,) = _struct_I.unpack(str[start:end]) 00406 start = end 00407 end += length 00408 val1.action_ns = str[start:end] 00409 _v4 = val1.timeout 00410 _x = _v4 00411 start = end 00412 end += 8 00413 (_x.secs, _x.nsecs,) = _struct_2i.unpack(str[start:end]) 00414 self.tasks.append(val1) 00415 return self 00416 except struct.error as e: 00417 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00418 00419 _struct_I = roslib.message.struct_I 00420 _struct_2i = struct.Struct("<2i") 00421 class AddTask(roslib.message.ServiceDefinition): 00422 _type = 'continuous_ops_msgs/AddTask' 00423 _md5sum = '9f006c64e7df3a3de962d4fabeb03d6e' 00424 _request_class = AddTaskRequest 00425 _response_class = AddTaskResponse