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


re_srvs
Author(s): Alexander Perzylo
autogenerated on Sun Jan 5 2014 11:28:42