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


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