_AddTask.py
Go to the documentation of this file.
00001 """autogenerated by genpy from continuous_ops_msgs/AddTaskRequest.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 AddTaskRequest(genpy.Message):
00009   _md5sum = "2b6ff28cc01b440b5e2f50ddfe7763c3"
00010   _type = "continuous_ops_msgs/AddTaskRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """string task_id
00013 
00014 """
00015   __slots__ = ['task_id']
00016   _slot_types = ['string']
00017 
00018   def __init__(self, *args, **kwds):
00019     """
00020     Constructor. Any message fields that are implicitly/explicitly
00021     set to None will be assigned a default value. The recommend
00022     use is keyword arguments as this is more robust to future message
00023     changes.  You cannot mix in-order arguments and keyword arguments.
00024 
00025     The available fields are:
00026        task_id
00027 
00028     :param args: complete set of field values, in .msg order
00029     :param kwds: use keyword arguments corresponding to message field names
00030     to set specific fields.
00031     """
00032     if args or kwds:
00033       super(AddTaskRequest, self).__init__(*args, **kwds)
00034       #message fields cannot be None, assign default values for those that are
00035       if self.task_id is None:
00036         self.task_id = ''
00037     else:
00038       self.task_id = ''
00039 
00040   def _get_types(self):
00041     """
00042     internal API method
00043     """
00044     return self._slot_types
00045 
00046   def serialize(self, buff):
00047     """
00048     serialize message into buffer
00049     :param buff: buffer, ``StringIO``
00050     """
00051     try:
00052       _x = self.task_id
00053       length = len(_x)
00054       if python3 or type(_x) == unicode:
00055         _x = _x.encode('utf-8')
00056         length = len(_x)
00057       buff.write(struct.pack('<I%ss'%length, length, _x))
00058     except struct.error as se: self._check_types(se)
00059     except TypeError as te: self._check_types(te)
00060 
00061   def deserialize(self, str):
00062     """
00063     unpack serialized message in str into this message instance
00064     :param str: byte array of serialized message, ``str``
00065     """
00066     try:
00067       end = 0
00068       start = end
00069       end += 4
00070       (length,) = _struct_I.unpack(str[start:end])
00071       start = end
00072       end += length
00073       if python3:
00074         self.task_id = str[start:end].decode('utf-8')
00075       else:
00076         self.task_id = str[start:end]
00077       return self
00078     except struct.error as e:
00079       raise genpy.DeserializationError(e) #most likely buffer underfill
00080 
00081 
00082   def serialize_numpy(self, buff, numpy):
00083     """
00084     serialize message with numpy array types into buffer
00085     :param buff: buffer, ``StringIO``
00086     :param numpy: numpy python module
00087     """
00088     try:
00089       _x = self.task_id
00090       length = len(_x)
00091       if python3 or type(_x) == unicode:
00092         _x = _x.encode('utf-8')
00093         length = len(_x)
00094       buff.write(struct.pack('<I%ss'%length, length, _x))
00095     except struct.error as se: self._check_types(se)
00096     except TypeError as te: self._check_types(te)
00097 
00098   def deserialize_numpy(self, str, numpy):
00099     """
00100     unpack serialized message in str into this message instance using numpy for array types
00101     :param str: byte array of serialized message, ``str``
00102     :param numpy: numpy python module
00103     """
00104     try:
00105       end = 0
00106       start = end
00107       end += 4
00108       (length,) = _struct_I.unpack(str[start:end])
00109       start = end
00110       end += length
00111       if python3:
00112         self.task_id = str[start:end].decode('utf-8')
00113       else:
00114         self.task_id = str[start:end]
00115       return self
00116     except struct.error as e:
00117       raise genpy.DeserializationError(e) #most likely buffer underfill
00118 
00119 _struct_I = genpy.struct_I
00120 """autogenerated by genpy from continuous_ops_msgs/AddTaskResponse.msg. Do not edit."""
00121 import sys
00122 python3 = True if sys.hexversion > 0x03000000 else False
00123 import genpy
00124 import struct
00125 
00126 import genpy
00127 import continuous_ops_msgs.msg
00128 
00129 class AddTaskResponse(genpy.Message):
00130   _md5sum = "979d5775818765dc12366ea52f087732"
00131   _type = "continuous_ops_msgs/AddTaskResponse"
00132   _has_header = False #flag to mark the presence of a Header object
00133   _full_text = """string run_id
00134 Task[] tasks
00135 
00136 ================================================================================
00137 MSG: continuous_ops_msgs/Task
00138 string name
00139 string description
00140 string task_id
00141 string run_id
00142 string launch_file
00143 string image_file
00144 string state
00145 string action_ns
00146 duration timeout
00147 """
00148   __slots__ = ['run_id','tasks']
00149   _slot_types = ['string','continuous_ops_msgs/Task[]']
00150 
00151   def __init__(self, *args, **kwds):
00152     """
00153     Constructor. Any message fields that are implicitly/explicitly
00154     set to None will be assigned a default value. The recommend
00155     use is keyword arguments as this is more robust to future message
00156     changes.  You cannot mix in-order arguments and keyword arguments.
00157 
00158     The available fields are:
00159        run_id,tasks
00160 
00161     :param args: complete set of field values, in .msg order
00162     :param kwds: use keyword arguments corresponding to message field names
00163     to set specific fields.
00164     """
00165     if args or kwds:
00166       super(AddTaskResponse, self).__init__(*args, **kwds)
00167       #message fields cannot be None, assign default values for those that are
00168       if self.run_id is None:
00169         self.run_id = ''
00170       if self.tasks is None:
00171         self.tasks = []
00172     else:
00173       self.run_id = ''
00174       self.tasks = []
00175 
00176   def _get_types(self):
00177     """
00178     internal API method
00179     """
00180     return self._slot_types
00181 
00182   def serialize(self, buff):
00183     """
00184     serialize message into buffer
00185     :param buff: buffer, ``StringIO``
00186     """
00187     try:
00188       _x = self.run_id
00189       length = len(_x)
00190       if python3 or type(_x) == unicode:
00191         _x = _x.encode('utf-8')
00192         length = len(_x)
00193       buff.write(struct.pack('<I%ss'%length, length, _x))
00194       length = len(self.tasks)
00195       buff.write(_struct_I.pack(length))
00196       for val1 in self.tasks:
00197         _x = val1.name
00198         length = len(_x)
00199         if python3 or type(_x) == unicode:
00200           _x = _x.encode('utf-8')
00201           length = len(_x)
00202         buff.write(struct.pack('<I%ss'%length, length, _x))
00203         _x = val1.description
00204         length = len(_x)
00205         if python3 or type(_x) == unicode:
00206           _x = _x.encode('utf-8')
00207           length = len(_x)
00208         buff.write(struct.pack('<I%ss'%length, length, _x))
00209         _x = val1.task_id
00210         length = len(_x)
00211         if python3 or type(_x) == unicode:
00212           _x = _x.encode('utf-8')
00213           length = len(_x)
00214         buff.write(struct.pack('<I%ss'%length, length, _x))
00215         _x = val1.run_id
00216         length = len(_x)
00217         if python3 or type(_x) == unicode:
00218           _x = _x.encode('utf-8')
00219           length = len(_x)
00220         buff.write(struct.pack('<I%ss'%length, length, _x))
00221         _x = val1.launch_file
00222         length = len(_x)
00223         if python3 or type(_x) == unicode:
00224           _x = _x.encode('utf-8')
00225           length = len(_x)
00226         buff.write(struct.pack('<I%ss'%length, length, _x))
00227         _x = val1.image_file
00228         length = len(_x)
00229         if python3 or type(_x) == unicode:
00230           _x = _x.encode('utf-8')
00231           length = len(_x)
00232         buff.write(struct.pack('<I%ss'%length, length, _x))
00233         _x = val1.state
00234         length = len(_x)
00235         if python3 or type(_x) == unicode:
00236           _x = _x.encode('utf-8')
00237           length = len(_x)
00238         buff.write(struct.pack('<I%ss'%length, length, _x))
00239         _x = val1.action_ns
00240         length = len(_x)
00241         if python3 or type(_x) == unicode:
00242           _x = _x.encode('utf-8')
00243           length = len(_x)
00244         buff.write(struct.pack('<I%ss'%length, length, _x))
00245         _v1 = val1.timeout
00246         _x = _v1
00247         buff.write(_struct_2i.pack(_x.secs, _x.nsecs))
00248     except struct.error as se: self._check_types(se)
00249     except TypeError as te: self._check_types(te)
00250 
00251   def deserialize(self, str):
00252     """
00253     unpack serialized message in str into this message instance
00254     :param str: byte array of serialized message, ``str``
00255     """
00256     try:
00257       if self.tasks is None:
00258         self.tasks = None
00259       end = 0
00260       start = end
00261       end += 4
00262       (length,) = _struct_I.unpack(str[start:end])
00263       start = end
00264       end += length
00265       if python3:
00266         self.run_id = str[start:end].decode('utf-8')
00267       else:
00268         self.run_id = str[start:end]
00269       start = end
00270       end += 4
00271       (length,) = _struct_I.unpack(str[start:end])
00272       self.tasks = []
00273       for i in range(0, length):
00274         val1 = continuous_ops_msgs.msg.Task()
00275         start = end
00276         end += 4
00277         (length,) = _struct_I.unpack(str[start:end])
00278         start = end
00279         end += length
00280         if python3:
00281           val1.name = str[start:end].decode('utf-8')
00282         else:
00283           val1.name = str[start:end]
00284         start = end
00285         end += 4
00286         (length,) = _struct_I.unpack(str[start:end])
00287         start = end
00288         end += length
00289         if python3:
00290           val1.description = str[start:end].decode('utf-8')
00291         else:
00292           val1.description = str[start:end]
00293         start = end
00294         end += 4
00295         (length,) = _struct_I.unpack(str[start:end])
00296         start = end
00297         end += length
00298         if python3:
00299           val1.task_id = str[start:end].decode('utf-8')
00300         else:
00301           val1.task_id = str[start:end]
00302         start = end
00303         end += 4
00304         (length,) = _struct_I.unpack(str[start:end])
00305         start = end
00306         end += length
00307         if python3:
00308           val1.run_id = str[start:end].decode('utf-8')
00309         else:
00310           val1.run_id = str[start:end]
00311         start = end
00312         end += 4
00313         (length,) = _struct_I.unpack(str[start:end])
00314         start = end
00315         end += length
00316         if python3:
00317           val1.launch_file = str[start:end].decode('utf-8')
00318         else:
00319           val1.launch_file = str[start:end]
00320         start = end
00321         end += 4
00322         (length,) = _struct_I.unpack(str[start:end])
00323         start = end
00324         end += length
00325         if python3:
00326           val1.image_file = str[start:end].decode('utf-8')
00327         else:
00328           val1.image_file = str[start:end]
00329         start = end
00330         end += 4
00331         (length,) = _struct_I.unpack(str[start:end])
00332         start = end
00333         end += length
00334         if python3:
00335           val1.state = str[start:end].decode('utf-8')
00336         else:
00337           val1.state = str[start:end]
00338         start = end
00339         end += 4
00340         (length,) = _struct_I.unpack(str[start:end])
00341         start = end
00342         end += length
00343         if python3:
00344           val1.action_ns = str[start:end].decode('utf-8')
00345         else:
00346           val1.action_ns = str[start:end]
00347         _v2 = val1.timeout
00348         _x = _v2
00349         start = end
00350         end += 8
00351         (_x.secs, _x.nsecs,) = _struct_2i.unpack(str[start:end])
00352         self.tasks.append(val1)
00353       return self
00354     except struct.error as e:
00355       raise genpy.DeserializationError(e) #most likely buffer underfill
00356 
00357 
00358   def serialize_numpy(self, buff, numpy):
00359     """
00360     serialize message with numpy array types into buffer
00361     :param buff: buffer, ``StringIO``
00362     :param numpy: numpy python module
00363     """
00364     try:
00365       _x = self.run_id
00366       length = len(_x)
00367       if python3 or type(_x) == unicode:
00368         _x = _x.encode('utf-8')
00369         length = len(_x)
00370       buff.write(struct.pack('<I%ss'%length, length, _x))
00371       length = len(self.tasks)
00372       buff.write(_struct_I.pack(length))
00373       for val1 in self.tasks:
00374         _x = val1.name
00375         length = len(_x)
00376         if python3 or type(_x) == unicode:
00377           _x = _x.encode('utf-8')
00378           length = len(_x)
00379         buff.write(struct.pack('<I%ss'%length, length, _x))
00380         _x = val1.description
00381         length = len(_x)
00382         if python3 or type(_x) == unicode:
00383           _x = _x.encode('utf-8')
00384           length = len(_x)
00385         buff.write(struct.pack('<I%ss'%length, length, _x))
00386         _x = val1.task_id
00387         length = len(_x)
00388         if python3 or type(_x) == unicode:
00389           _x = _x.encode('utf-8')
00390           length = len(_x)
00391         buff.write(struct.pack('<I%ss'%length, length, _x))
00392         _x = val1.run_id
00393         length = len(_x)
00394         if python3 or type(_x) == unicode:
00395           _x = _x.encode('utf-8')
00396           length = len(_x)
00397         buff.write(struct.pack('<I%ss'%length, length, _x))
00398         _x = val1.launch_file
00399         length = len(_x)
00400         if python3 or type(_x) == unicode:
00401           _x = _x.encode('utf-8')
00402           length = len(_x)
00403         buff.write(struct.pack('<I%ss'%length, length, _x))
00404         _x = val1.image_file
00405         length = len(_x)
00406         if python3 or type(_x) == unicode:
00407           _x = _x.encode('utf-8')
00408           length = len(_x)
00409         buff.write(struct.pack('<I%ss'%length, length, _x))
00410         _x = val1.state
00411         length = len(_x)
00412         if python3 or type(_x) == unicode:
00413           _x = _x.encode('utf-8')
00414           length = len(_x)
00415         buff.write(struct.pack('<I%ss'%length, length, _x))
00416         _x = val1.action_ns
00417         length = len(_x)
00418         if python3 or type(_x) == unicode:
00419           _x = _x.encode('utf-8')
00420           length = len(_x)
00421         buff.write(struct.pack('<I%ss'%length, length, _x))
00422         _v3 = val1.timeout
00423         _x = _v3
00424         buff.write(_struct_2i.pack(_x.secs, _x.nsecs))
00425     except struct.error as se: self._check_types(se)
00426     except TypeError as te: self._check_types(te)
00427 
00428   def deserialize_numpy(self, str, numpy):
00429     """
00430     unpack serialized message in str into this message instance using numpy for array types
00431     :param str: byte array of serialized message, ``str``
00432     :param numpy: numpy python module
00433     """
00434     try:
00435       if self.tasks is None:
00436         self.tasks = None
00437       end = 0
00438       start = end
00439       end += 4
00440       (length,) = _struct_I.unpack(str[start:end])
00441       start = end
00442       end += length
00443       if python3:
00444         self.run_id = str[start:end].decode('utf-8')
00445       else:
00446         self.run_id = str[start:end]
00447       start = end
00448       end += 4
00449       (length,) = _struct_I.unpack(str[start:end])
00450       self.tasks = []
00451       for i in range(0, length):
00452         val1 = continuous_ops_msgs.msg.Task()
00453         start = end
00454         end += 4
00455         (length,) = _struct_I.unpack(str[start:end])
00456         start = end
00457         end += length
00458         if python3:
00459           val1.name = str[start:end].decode('utf-8')
00460         else:
00461           val1.name = str[start:end]
00462         start = end
00463         end += 4
00464         (length,) = _struct_I.unpack(str[start:end])
00465         start = end
00466         end += length
00467         if python3:
00468           val1.description = str[start:end].decode('utf-8')
00469         else:
00470           val1.description = str[start:end]
00471         start = end
00472         end += 4
00473         (length,) = _struct_I.unpack(str[start:end])
00474         start = end
00475         end += length
00476         if python3:
00477           val1.task_id = str[start:end].decode('utf-8')
00478         else:
00479           val1.task_id = str[start:end]
00480         start = end
00481         end += 4
00482         (length,) = _struct_I.unpack(str[start:end])
00483         start = end
00484         end += length
00485         if python3:
00486           val1.run_id = str[start:end].decode('utf-8')
00487         else:
00488           val1.run_id = str[start:end]
00489         start = end
00490         end += 4
00491         (length,) = _struct_I.unpack(str[start:end])
00492         start = end
00493         end += length
00494         if python3:
00495           val1.launch_file = str[start:end].decode('utf-8')
00496         else:
00497           val1.launch_file = str[start:end]
00498         start = end
00499         end += 4
00500         (length,) = _struct_I.unpack(str[start:end])
00501         start = end
00502         end += length
00503         if python3:
00504           val1.image_file = str[start:end].decode('utf-8')
00505         else:
00506           val1.image_file = str[start:end]
00507         start = end
00508         end += 4
00509         (length,) = _struct_I.unpack(str[start:end])
00510         start = end
00511         end += length
00512         if python3:
00513           val1.state = str[start:end].decode('utf-8')
00514         else:
00515           val1.state = str[start:end]
00516         start = end
00517         end += 4
00518         (length,) = _struct_I.unpack(str[start:end])
00519         start = end
00520         end += length
00521         if python3:
00522           val1.action_ns = str[start:end].decode('utf-8')
00523         else:
00524           val1.action_ns = str[start:end]
00525         _v4 = val1.timeout
00526         _x = _v4
00527         start = end
00528         end += 8
00529         (_x.secs, _x.nsecs,) = _struct_2i.unpack(str[start:end])
00530         self.tasks.append(val1)
00531       return self
00532     except struct.error as e:
00533       raise genpy.DeserializationError(e) #most likely buffer underfill
00534 
00535 _struct_I = genpy.struct_I
00536 _struct_2i = struct.Struct("<2i")
00537 class AddTask(object):
00538   _type          = 'continuous_ops_msgs/AddTask'
00539   _md5sum = '9f006c64e7df3a3de962d4fabeb03d6e'
00540   _request_class  = AddTaskRequest
00541   _response_class = AddTaskResponse


continuous_ops_msgs
Author(s): Wim Meeussen
autogenerated on Fri Dec 6 2013 21:18:55