_GetEnvironment.py
Go to the documentation of this file.
00001 """autogenerated by genpy from re_srvs/GetEnvironmentRequest.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 GetEnvironmentRequest(genpy.Message):
00009   _md5sum = "f4a5f5c2e44c287025035e09cb251e6a"
00010   _type = "re_srvs/GetEnvironmentRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """string environmentUID
00013 
00014 """
00015   __slots__ = ['environmentUID']
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        environmentUID
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(GetEnvironmentRequest, self).__init__(*args, **kwds)
00034       #message fields cannot be None, assign default values for those that are
00035       if self.environmentUID is None:
00036         self.environmentUID = ''
00037     else:
00038       self.environmentUID = ''
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.environmentUID
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.environmentUID = str[start:end].decode('utf-8')
00075       else:
00076         self.environmentUID = 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.environmentUID
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.environmentUID = str[start:end].decode('utf-8')
00113       else:
00114         self.environmentUID = 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 re_srvs/GetEnvironmentResponse.msg. Do not edit."""
00121 import sys
00122 python3 = True if sys.hexversion > 0x03000000 else False
00123 import genpy
00124 import struct
00125 
00126 
00127 class GetEnvironmentResponse(genpy.Message):
00128   _md5sum = "a5699cab53904ee084b994a0b1c12120"
00129   _type = "re_srvs/GetEnvironmentResponse"
00130   _has_header = False #flag to mark the presence of a Header object
00131   _full_text = """bool success
00132 string environment
00133 string[] filenames
00134 string[] fileURLs
00135 
00136 
00137 
00138 """
00139   __slots__ = ['success','environment','filenames','fileURLs']
00140   _slot_types = ['bool','string','string[]','string[]']
00141 
00142   def __init__(self, *args, **kwds):
00143     """
00144     Constructor. Any message fields that are implicitly/explicitly
00145     set to None will be assigned a default value. The recommend
00146     use is keyword arguments as this is more robust to future message
00147     changes.  You cannot mix in-order arguments and keyword arguments.
00148 
00149     The available fields are:
00150        success,environment,filenames,fileURLs
00151 
00152     :param args: complete set of field values, in .msg order
00153     :param kwds: use keyword arguments corresponding to message field names
00154     to set specific fields.
00155     """
00156     if args or kwds:
00157       super(GetEnvironmentResponse, self).__init__(*args, **kwds)
00158       #message fields cannot be None, assign default values for those that are
00159       if self.success is None:
00160         self.success = False
00161       if self.environment is None:
00162         self.environment = ''
00163       if self.filenames is None:
00164         self.filenames = []
00165       if self.fileURLs is None:
00166         self.fileURLs = []
00167     else:
00168       self.success = False
00169       self.environment = ''
00170       self.filenames = []
00171       self.fileURLs = []
00172 
00173   def _get_types(self):
00174     """
00175     internal API method
00176     """
00177     return self._slot_types
00178 
00179   def serialize(self, buff):
00180     """
00181     serialize message into buffer
00182     :param buff: buffer, ``StringIO``
00183     """
00184     try:
00185       buff.write(_struct_B.pack(self.success))
00186       _x = self.environment
00187       length = len(_x)
00188       if python3 or type(_x) == unicode:
00189         _x = _x.encode('utf-8')
00190         length = len(_x)
00191       buff.write(struct.pack('<I%ss'%length, length, _x))
00192       length = len(self.filenames)
00193       buff.write(_struct_I.pack(length))
00194       for val1 in self.filenames:
00195         length = len(val1)
00196         if python3 or type(val1) == unicode:
00197           val1 = val1.encode('utf-8')
00198           length = len(val1)
00199         buff.write(struct.pack('<I%ss'%length, length, val1))
00200       length = len(self.fileURLs)
00201       buff.write(_struct_I.pack(length))
00202       for val1 in self.fileURLs:
00203         length = len(val1)
00204         if python3 or type(val1) == unicode:
00205           val1 = val1.encode('utf-8')
00206           length = len(val1)
00207         buff.write(struct.pack('<I%ss'%length, length, val1))
00208     except struct.error as se: self._check_types(se)
00209     except TypeError as te: self._check_types(te)
00210 
00211   def deserialize(self, str):
00212     """
00213     unpack serialized message in str into this message instance
00214     :param str: byte array of serialized message, ``str``
00215     """
00216     try:
00217       end = 0
00218       start = end
00219       end += 1
00220       (self.success,) = _struct_B.unpack(str[start:end])
00221       self.success = bool(self.success)
00222       start = end
00223       end += 4
00224       (length,) = _struct_I.unpack(str[start:end])
00225       start = end
00226       end += length
00227       if python3:
00228         self.environment = str[start:end].decode('utf-8')
00229       else:
00230         self.environment = str[start:end]
00231       start = end
00232       end += 4
00233       (length,) = _struct_I.unpack(str[start:end])
00234       self.filenames = []
00235       for i in range(0, length):
00236         start = end
00237         end += 4
00238         (length,) = _struct_I.unpack(str[start:end])
00239         start = end
00240         end += length
00241         if python3:
00242           val1 = str[start:end].decode('utf-8')
00243         else:
00244           val1 = str[start:end]
00245         self.filenames.append(val1)
00246       start = end
00247       end += 4
00248       (length,) = _struct_I.unpack(str[start:end])
00249       self.fileURLs = []
00250       for i in range(0, length):
00251         start = end
00252         end += 4
00253         (length,) = _struct_I.unpack(str[start:end])
00254         start = end
00255         end += length
00256         if python3:
00257           val1 = str[start:end].decode('utf-8')
00258         else:
00259           val1 = str[start:end]
00260         self.fileURLs.append(val1)
00261       return self
00262     except struct.error as e:
00263       raise genpy.DeserializationError(e) #most likely buffer underfill
00264 
00265 
00266   def serialize_numpy(self, buff, numpy):
00267     """
00268     serialize message with numpy array types into buffer
00269     :param buff: buffer, ``StringIO``
00270     :param numpy: numpy python module
00271     """
00272     try:
00273       buff.write(_struct_B.pack(self.success))
00274       _x = self.environment
00275       length = len(_x)
00276       if python3 or type(_x) == unicode:
00277         _x = _x.encode('utf-8')
00278         length = len(_x)
00279       buff.write(struct.pack('<I%ss'%length, length, _x))
00280       length = len(self.filenames)
00281       buff.write(_struct_I.pack(length))
00282       for val1 in self.filenames:
00283         length = len(val1)
00284         if python3 or type(val1) == unicode:
00285           val1 = val1.encode('utf-8')
00286           length = len(val1)
00287         buff.write(struct.pack('<I%ss'%length, length, val1))
00288       length = len(self.fileURLs)
00289       buff.write(_struct_I.pack(length))
00290       for val1 in self.fileURLs:
00291         length = len(val1)
00292         if python3 or type(val1) == unicode:
00293           val1 = val1.encode('utf-8')
00294           length = len(val1)
00295         buff.write(struct.pack('<I%ss'%length, length, val1))
00296     except struct.error as se: self._check_types(se)
00297     except TypeError as te: self._check_types(te)
00298 
00299   def deserialize_numpy(self, str, numpy):
00300     """
00301     unpack serialized message in str into this message instance using numpy for array types
00302     :param str: byte array of serialized message, ``str``
00303     :param numpy: numpy python module
00304     """
00305     try:
00306       end = 0
00307       start = end
00308       end += 1
00309       (self.success,) = _struct_B.unpack(str[start:end])
00310       self.success = bool(self.success)
00311       start = end
00312       end += 4
00313       (length,) = _struct_I.unpack(str[start:end])
00314       start = end
00315       end += length
00316       if python3:
00317         self.environment = str[start:end].decode('utf-8')
00318       else:
00319         self.environment = str[start:end]
00320       start = end
00321       end += 4
00322       (length,) = _struct_I.unpack(str[start:end])
00323       self.filenames = []
00324       for i in range(0, length):
00325         start = end
00326         end += 4
00327         (length,) = _struct_I.unpack(str[start:end])
00328         start = end
00329         end += length
00330         if python3:
00331           val1 = str[start:end].decode('utf-8')
00332         else:
00333           val1 = str[start:end]
00334         self.filenames.append(val1)
00335       start = end
00336       end += 4
00337       (length,) = _struct_I.unpack(str[start:end])
00338       self.fileURLs = []
00339       for i in range(0, length):
00340         start = end
00341         end += 4
00342         (length,) = _struct_I.unpack(str[start:end])
00343         start = end
00344         end += length
00345         if python3:
00346           val1 = str[start:end].decode('utf-8')
00347         else:
00348           val1 = str[start:end]
00349         self.fileURLs.append(val1)
00350       return self
00351     except struct.error as e:
00352       raise genpy.DeserializationError(e) #most likely buffer underfill
00353 
00354 _struct_I = genpy.struct_I
00355 _struct_B = struct.Struct("<B")
00356 class GetEnvironment(object):
00357   _type          = 're_srvs/GetEnvironment'
00358   _md5sum = 'c017f96c32c005323930741129f3a27d'
00359   _request_class  = GetEnvironmentRequest
00360   _response_class = GetEnvironmentResponse


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