_ChangeTask.py
Go to the documentation of this file.
00001 """autogenerated by genpy from continuous_ops_msgs/ChangeTaskRequest.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 ChangeTaskRequest(genpy.Message):
00009   _md5sum = "3556f757c00324804cc4196184489e8c"
00010   _type = "continuous_ops_msgs/ChangeTaskRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """string run_id
00013 
00014 """
00015   __slots__ = ['run_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        run_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(ChangeTaskRequest, self).__init__(*args, **kwds)
00034       #message fields cannot be None, assign default values for those that are
00035       if self.run_id is None:
00036         self.run_id = ''
00037     else:
00038       self.run_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.run_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.run_id = str[start:end].decode('utf-8')
00075       else:
00076         self.run_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.run_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.run_id = str[start:end].decode('utf-8')
00113       else:
00114         self.run_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/ChangeTaskResponse.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 ChangeTaskResponse(genpy.Message):
00130   _md5sum = "e6fac003aa050bdfb91de78e5697a3e5"
00131   _type = "continuous_ops_msgs/ChangeTaskResponse"
00132   _has_header = False #flag to mark the presence of a Header object
00133   _full_text = """Task[] tasks
00134 
00135 ================================================================================
00136 MSG: continuous_ops_msgs/Task
00137 string name
00138 string description
00139 string task_id
00140 string run_id
00141 string launch_file
00142 string image_file
00143 string state
00144 string action_ns
00145 duration timeout
00146 """
00147   __slots__ = ['tasks']
00148   _slot_types = ['continuous_ops_msgs/Task[]']
00149 
00150   def __init__(self, *args, **kwds):
00151     """
00152     Constructor. Any message fields that are implicitly/explicitly
00153     set to None will be assigned a default value. The recommend
00154     use is keyword arguments as this is more robust to future message
00155     changes.  You cannot mix in-order arguments and keyword arguments.
00156 
00157     The available fields are:
00158        tasks
00159 
00160     :param args: complete set of field values, in .msg order
00161     :param kwds: use keyword arguments corresponding to message field names
00162     to set specific fields.
00163     """
00164     if args or kwds:
00165       super(ChangeTaskResponse, self).__init__(*args, **kwds)
00166       #message fields cannot be None, assign default values for those that are
00167       if self.tasks is None:
00168         self.tasks = []
00169     else:
00170       self.tasks = []
00171 
00172   def _get_types(self):
00173     """
00174     internal API method
00175     """
00176     return self._slot_types
00177 
00178   def serialize(self, buff):
00179     """
00180     serialize message into buffer
00181     :param buff: buffer, ``StringIO``
00182     """
00183     try:
00184       length = len(self.tasks)
00185       buff.write(_struct_I.pack(length))
00186       for val1 in self.tasks:
00187         _x = val1.name
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         _x = val1.description
00194         length = len(_x)
00195         if python3 or type(_x) == unicode:
00196           _x = _x.encode('utf-8')
00197           length = len(_x)
00198         buff.write(struct.pack('<I%ss'%length, length, _x))
00199         _x = val1.task_id
00200         length = len(_x)
00201         if python3 or type(_x) == unicode:
00202           _x = _x.encode('utf-8')
00203           length = len(_x)
00204         buff.write(struct.pack('<I%ss'%length, length, _x))
00205         _x = val1.run_id
00206         length = len(_x)
00207         if python3 or type(_x) == unicode:
00208           _x = _x.encode('utf-8')
00209           length = len(_x)
00210         buff.write(struct.pack('<I%ss'%length, length, _x))
00211         _x = val1.launch_file
00212         length = len(_x)
00213         if python3 or type(_x) == unicode:
00214           _x = _x.encode('utf-8')
00215           length = len(_x)
00216         buff.write(struct.pack('<I%ss'%length, length, _x))
00217         _x = val1.image_file
00218         length = len(_x)
00219         if python3 or type(_x) == unicode:
00220           _x = _x.encode('utf-8')
00221           length = len(_x)
00222         buff.write(struct.pack('<I%ss'%length, length, _x))
00223         _x = val1.state
00224         length = len(_x)
00225         if python3 or type(_x) == unicode:
00226           _x = _x.encode('utf-8')
00227           length = len(_x)
00228         buff.write(struct.pack('<I%ss'%length, length, _x))
00229         _x = val1.action_ns
00230         length = len(_x)
00231         if python3 or type(_x) == unicode:
00232           _x = _x.encode('utf-8')
00233           length = len(_x)
00234         buff.write(struct.pack('<I%ss'%length, length, _x))
00235         _v1 = val1.timeout
00236         _x = _v1
00237         buff.write(_struct_2i.pack(_x.secs, _x.nsecs))
00238     except struct.error as se: self._check_types(se)
00239     except TypeError as te: self._check_types(te)
00240 
00241   def deserialize(self, str):
00242     """
00243     unpack serialized message in str into this message instance
00244     :param str: byte array of serialized message, ``str``
00245     """
00246     try:
00247       if self.tasks is None:
00248         self.tasks = None
00249       end = 0
00250       start = end
00251       end += 4
00252       (length,) = _struct_I.unpack(str[start:end])
00253       self.tasks = []
00254       for i in range(0, length):
00255         val1 = continuous_ops_msgs.msg.Task()
00256         start = end
00257         end += 4
00258         (length,) = _struct_I.unpack(str[start:end])
00259         start = end
00260         end += length
00261         if python3:
00262           val1.name = str[start:end].decode('utf-8')
00263         else:
00264           val1.name = str[start:end]
00265         start = end
00266         end += 4
00267         (length,) = _struct_I.unpack(str[start:end])
00268         start = end
00269         end += length
00270         if python3:
00271           val1.description = str[start:end].decode('utf-8')
00272         else:
00273           val1.description = str[start:end]
00274         start = end
00275         end += 4
00276         (length,) = _struct_I.unpack(str[start:end])
00277         start = end
00278         end += length
00279         if python3:
00280           val1.task_id = str[start:end].decode('utf-8')
00281         else:
00282           val1.task_id = str[start:end]
00283         start = end
00284         end += 4
00285         (length,) = _struct_I.unpack(str[start:end])
00286         start = end
00287         end += length
00288         if python3:
00289           val1.run_id = str[start:end].decode('utf-8')
00290         else:
00291           val1.run_id = str[start:end]
00292         start = end
00293         end += 4
00294         (length,) = _struct_I.unpack(str[start:end])
00295         start = end
00296         end += length
00297         if python3:
00298           val1.launch_file = str[start:end].decode('utf-8')
00299         else:
00300           val1.launch_file = str[start:end]
00301         start = end
00302         end += 4
00303         (length,) = _struct_I.unpack(str[start:end])
00304         start = end
00305         end += length
00306         if python3:
00307           val1.image_file = str[start:end].decode('utf-8')
00308         else:
00309           val1.image_file = str[start:end]
00310         start = end
00311         end += 4
00312         (length,) = _struct_I.unpack(str[start:end])
00313         start = end
00314         end += length
00315         if python3:
00316           val1.state = str[start:end].decode('utf-8')
00317         else:
00318           val1.state = str[start:end]
00319         start = end
00320         end += 4
00321         (length,) = _struct_I.unpack(str[start:end])
00322         start = end
00323         end += length
00324         if python3:
00325           val1.action_ns = str[start:end].decode('utf-8')
00326         else:
00327           val1.action_ns = str[start:end]
00328         _v2 = val1.timeout
00329         _x = _v2
00330         start = end
00331         end += 8
00332         (_x.secs, _x.nsecs,) = _struct_2i.unpack(str[start:end])
00333         self.tasks.append(val1)
00334       return self
00335     except struct.error as e:
00336       raise genpy.DeserializationError(e) #most likely buffer underfill
00337 
00338 
00339   def serialize_numpy(self, buff, numpy):
00340     """
00341     serialize message with numpy array types into buffer
00342     :param buff: buffer, ``StringIO``
00343     :param numpy: numpy python module
00344     """
00345     try:
00346       length = len(self.tasks)
00347       buff.write(_struct_I.pack(length))
00348       for val1 in self.tasks:
00349         _x = val1.name
00350         length = len(_x)
00351         if python3 or type(_x) == unicode:
00352           _x = _x.encode('utf-8')
00353           length = len(_x)
00354         buff.write(struct.pack('<I%ss'%length, length, _x))
00355         _x = val1.description
00356         length = len(_x)
00357         if python3 or type(_x) == unicode:
00358           _x = _x.encode('utf-8')
00359           length = len(_x)
00360         buff.write(struct.pack('<I%ss'%length, length, _x))
00361         _x = val1.task_id
00362         length = len(_x)
00363         if python3 or type(_x) == unicode:
00364           _x = _x.encode('utf-8')
00365           length = len(_x)
00366         buff.write(struct.pack('<I%ss'%length, length, _x))
00367         _x = val1.run_id
00368         length = len(_x)
00369         if python3 or type(_x) == unicode:
00370           _x = _x.encode('utf-8')
00371           length = len(_x)
00372         buff.write(struct.pack('<I%ss'%length, length, _x))
00373         _x = val1.launch_file
00374         length = len(_x)
00375         if python3 or type(_x) == unicode:
00376           _x = _x.encode('utf-8')
00377           length = len(_x)
00378         buff.write(struct.pack('<I%ss'%length, length, _x))
00379         _x = val1.image_file
00380         length = len(_x)
00381         if python3 or type(_x) == unicode:
00382           _x = _x.encode('utf-8')
00383           length = len(_x)
00384         buff.write(struct.pack('<I%ss'%length, length, _x))
00385         _x = val1.state
00386         length = len(_x)
00387         if python3 or type(_x) == unicode:
00388           _x = _x.encode('utf-8')
00389           length = len(_x)
00390         buff.write(struct.pack('<I%ss'%length, length, _x))
00391         _x = val1.action_ns
00392         length = len(_x)
00393         if python3 or type(_x) == unicode:
00394           _x = _x.encode('utf-8')
00395           length = len(_x)
00396         buff.write(struct.pack('<I%ss'%length, length, _x))
00397         _v3 = val1.timeout
00398         _x = _v3
00399         buff.write(_struct_2i.pack(_x.secs, _x.nsecs))
00400     except struct.error as se: self._check_types(se)
00401     except TypeError as te: self._check_types(te)
00402 
00403   def deserialize_numpy(self, str, numpy):
00404     """
00405     unpack serialized message in str into this message instance using numpy for array types
00406     :param str: byte array of serialized message, ``str``
00407     :param numpy: numpy python module
00408     """
00409     try:
00410       if self.tasks is None:
00411         self.tasks = None
00412       end = 0
00413       start = end
00414       end += 4
00415       (length,) = _struct_I.unpack(str[start:end])
00416       self.tasks = []
00417       for i in range(0, length):
00418         val1 = continuous_ops_msgs.msg.Task()
00419         start = end
00420         end += 4
00421         (length,) = _struct_I.unpack(str[start:end])
00422         start = end
00423         end += length
00424         if python3:
00425           val1.name = str[start:end].decode('utf-8')
00426         else:
00427           val1.name = str[start:end]
00428         start = end
00429         end += 4
00430         (length,) = _struct_I.unpack(str[start:end])
00431         start = end
00432         end += length
00433         if python3:
00434           val1.description = str[start:end].decode('utf-8')
00435         else:
00436           val1.description = str[start:end]
00437         start = end
00438         end += 4
00439         (length,) = _struct_I.unpack(str[start:end])
00440         start = end
00441         end += length
00442         if python3:
00443           val1.task_id = str[start:end].decode('utf-8')
00444         else:
00445           val1.task_id = str[start:end]
00446         start = end
00447         end += 4
00448         (length,) = _struct_I.unpack(str[start:end])
00449         start = end
00450         end += length
00451         if python3:
00452           val1.run_id = str[start:end].decode('utf-8')
00453         else:
00454           val1.run_id = str[start:end]
00455         start = end
00456         end += 4
00457         (length,) = _struct_I.unpack(str[start:end])
00458         start = end
00459         end += length
00460         if python3:
00461           val1.launch_file = str[start:end].decode('utf-8')
00462         else:
00463           val1.launch_file = str[start:end]
00464         start = end
00465         end += 4
00466         (length,) = _struct_I.unpack(str[start:end])
00467         start = end
00468         end += length
00469         if python3:
00470           val1.image_file = str[start:end].decode('utf-8')
00471         else:
00472           val1.image_file = str[start:end]
00473         start = end
00474         end += 4
00475         (length,) = _struct_I.unpack(str[start:end])
00476         start = end
00477         end += length
00478         if python3:
00479           val1.state = str[start:end].decode('utf-8')
00480         else:
00481           val1.state = str[start:end]
00482         start = end
00483         end += 4
00484         (length,) = _struct_I.unpack(str[start:end])
00485         start = end
00486         end += length
00487         if python3:
00488           val1.action_ns = str[start:end].decode('utf-8')
00489         else:
00490           val1.action_ns = str[start:end]
00491         _v4 = val1.timeout
00492         _x = _v4
00493         start = end
00494         end += 8
00495         (_x.secs, _x.nsecs,) = _struct_2i.unpack(str[start:end])
00496         self.tasks.append(val1)
00497       return self
00498     except struct.error as e:
00499       raise genpy.DeserializationError(e) #most likely buffer underfill
00500 
00501 _struct_I = genpy.struct_I
00502 _struct_2i = struct.Struct("<2i")
00503 class ChangeTask(object):
00504   _type          = 'continuous_ops_msgs/ChangeTask'
00505   _md5sum = '684487ce98884abdbc1524a5854e85f9'
00506   _request_class  = ChangeTaskRequest
00507   _response_class = ChangeTaskResponse


continuous_ops_msgs
Author(s): Wim Meeussen
autogenerated on Fri Dec 6 2013 19:57:52