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


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