_ListTasks.py
Go to the documentation of this file.
00001 """autogenerated by genpy from launchman/ListTasksRequest.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 ListTasksRequest(genpy.Message):
00009   _md5sum = "d41d8cd98f00b204e9800998ecf8427e"
00010   _type = "launchman/ListTasksRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """
00013 """
00014   __slots__ = []
00015   _slot_types = []
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        
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(ListTasksRequest, self).__init__(*args, **kwds)
00033 
00034   def _get_types(self):
00035     """
00036     internal API method
00037     """
00038     return self._slot_types
00039 
00040   def serialize(self, buff):
00041     """
00042     serialize message into buffer
00043     :param buff: buffer, ``StringIO``
00044     """
00045     try:
00046       pass
00047     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00048     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00049 
00050   def deserialize(self, str):
00051     """
00052     unpack serialized message in str into this message instance
00053     :param str: byte array of serialized message, ``str``
00054     """
00055     try:
00056       end = 0
00057       return self
00058     except struct.error as e:
00059       raise genpy.DeserializationError(e) #most likely buffer underfill
00060 
00061 
00062   def serialize_numpy(self, buff, numpy):
00063     """
00064     serialize message with numpy array types into buffer
00065     :param buff: buffer, ``StringIO``
00066     :param numpy: numpy python module
00067     """
00068     try:
00069       pass
00070     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00071     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00072 
00073   def deserialize_numpy(self, str, numpy):
00074     """
00075     unpack serialized message in str into this message instance using numpy for array types
00076     :param str: byte array of serialized message, ``str``
00077     :param numpy: numpy python module
00078     """
00079     try:
00080       end = 0
00081       return self
00082     except struct.error as e:
00083       raise genpy.DeserializationError(e) #most likely buffer underfill
00084 
00085 _struct_I = genpy.struct_I
00086 """autogenerated by genpy from launchman/ListTasksResponse.msg. Do not edit."""
00087 import sys
00088 python3 = True if sys.hexversion > 0x03000000 else False
00089 import genpy
00090 import struct
00091 
00092 
00093 class ListTasksResponse(genpy.Message):
00094   _md5sum = "8e23a0a55cd0f3fcb9989be6ceff0145"
00095   _type = "launchman/ListTasksResponse"
00096   _has_header = False #flag to mark the presence of a Header object
00097   _full_text = """string[] tasks
00098 
00099 
00100 """
00101   __slots__ = ['tasks']
00102   _slot_types = ['string[]']
00103 
00104   def __init__(self, *args, **kwds):
00105     """
00106     Constructor. Any message fields that are implicitly/explicitly
00107     set to None will be assigned a default value. The recommend
00108     use is keyword arguments as this is more robust to future message
00109     changes.  You cannot mix in-order arguments and keyword arguments.
00110 
00111     The available fields are:
00112        tasks
00113 
00114     :param args: complete set of field values, in .msg order
00115     :param kwds: use keyword arguments corresponding to message field names
00116     to set specific fields.
00117     """
00118     if args or kwds:
00119       super(ListTasksResponse, self).__init__(*args, **kwds)
00120       #message fields cannot be None, assign default values for those that are
00121       if self.tasks is None:
00122         self.tasks = []
00123     else:
00124       self.tasks = []
00125 
00126   def _get_types(self):
00127     """
00128     internal API method
00129     """
00130     return self._slot_types
00131 
00132   def serialize(self, buff):
00133     """
00134     serialize message into buffer
00135     :param buff: buffer, ``StringIO``
00136     """
00137     try:
00138       length = len(self.tasks)
00139       buff.write(_struct_I.pack(length))
00140       for val1 in self.tasks:
00141         length = len(val1)
00142         if python3 or type(val1) == unicode:
00143           val1 = val1.encode('utf-8')
00144           length = len(val1)
00145         buff.write(struct.pack('<I%ss'%length, length, val1))
00146     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00147     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00148 
00149   def deserialize(self, str):
00150     """
00151     unpack serialized message in str into this message instance
00152     :param str: byte array of serialized message, ``str``
00153     """
00154     try:
00155       end = 0
00156       start = end
00157       end += 4
00158       (length,) = _struct_I.unpack(str[start:end])
00159       self.tasks = []
00160       for i in range(0, length):
00161         start = end
00162         end += 4
00163         (length,) = _struct_I.unpack(str[start:end])
00164         start = end
00165         end += length
00166         if python3:
00167           val1 = str[start:end].decode('utf-8')
00168         else:
00169           val1 = str[start:end]
00170         self.tasks.append(val1)
00171       return self
00172     except struct.error as e:
00173       raise genpy.DeserializationError(e) #most likely buffer underfill
00174 
00175 
00176   def serialize_numpy(self, buff, numpy):
00177     """
00178     serialize message with numpy array types into buffer
00179     :param buff: buffer, ``StringIO``
00180     :param numpy: numpy python module
00181     """
00182     try:
00183       length = len(self.tasks)
00184       buff.write(_struct_I.pack(length))
00185       for val1 in self.tasks:
00186         length = len(val1)
00187         if python3 or type(val1) == unicode:
00188           val1 = val1.encode('utf-8')
00189           length = len(val1)
00190         buff.write(struct.pack('<I%ss'%length, length, val1))
00191     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00192     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00193 
00194   def deserialize_numpy(self, str, numpy):
00195     """
00196     unpack serialized message in str into this message instance using numpy for array types
00197     :param str: byte array of serialized message, ``str``
00198     :param numpy: numpy python module
00199     """
00200     try:
00201       end = 0
00202       start = end
00203       end += 4
00204       (length,) = _struct_I.unpack(str[start:end])
00205       self.tasks = []
00206       for i in range(0, length):
00207         start = end
00208         end += 4
00209         (length,) = _struct_I.unpack(str[start:end])
00210         start = end
00211         end += length
00212         if python3:
00213           val1 = str[start:end].decode('utf-8')
00214         else:
00215           val1 = str[start:end]
00216         self.tasks.append(val1)
00217       return self
00218     except struct.error as e:
00219       raise genpy.DeserializationError(e) #most likely buffer underfill
00220 
00221 _struct_I = genpy.struct_I
00222 class ListTasks(object):
00223   _type          = 'launchman/ListTasks'
00224   _md5sum = '8e23a0a55cd0f3fcb9989be6ceff0145'
00225   _request_class  = ListTasksRequest
00226   _response_class = ListTasksResponse


launchman
Author(s): Scott Hassan
autogenerated on Wed Apr 23 2014 10:35:46