00001 """autogenerated by genpy from re_srvs/SearchActionRecipesRequest.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 SearchActionRecipesRequest(genpy.Message):
00009 _md5sum = "2d2d663456e9fa76707235a598ce31c7"
00010 _type = "re_srvs/SearchActionRecipesRequest"
00011 _has_header = False
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(SearchActionRecipesRequest, self).__init__(*args, **kwds)
00035
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)
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)
00119
00120 _struct_I = genpy.struct_I
00121 """autogenerated by genpy from re_srvs/SearchActionRecipesResponse.msg. Do not edit."""
00122 import sys
00123 python3 = True if sys.hexversion > 0x03000000 else False
00124 import genpy
00125 import struct
00126
00127
00128 class SearchActionRecipesResponse(genpy.Message):
00129 _md5sum = "8dad7a939c1eb856368da22a41bc0845"
00130 _type = "re_srvs/SearchActionRecipesResponse"
00131 _has_header = False
00132 _full_text = """bool success
00133 string[] uids
00134 string[] recipes
00135
00136
00137 """
00138 __slots__ = ['success','uids','recipes']
00139 _slot_types = ['bool','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,uids,recipes
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(SearchActionRecipesResponse, self).__init__(*args, **kwds)
00157
00158 if self.success is None:
00159 self.success = False
00160 if self.uids is None:
00161 self.uids = []
00162 if self.recipes is None:
00163 self.recipes = []
00164 else:
00165 self.success = False
00166 self.uids = []
00167 self.recipes = []
00168
00169 def _get_types(self):
00170 """
00171 internal API method
00172 """
00173 return self._slot_types
00174
00175 def serialize(self, buff):
00176 """
00177 serialize message into buffer
00178 :param buff: buffer, ``StringIO``
00179 """
00180 try:
00181 buff.write(_struct_B.pack(self.success))
00182 length = len(self.uids)
00183 buff.write(_struct_I.pack(length))
00184 for val1 in self.uids:
00185 length = len(val1)
00186 if python3 or type(val1) == unicode:
00187 val1 = val1.encode('utf-8')
00188 length = len(val1)
00189 buff.write(struct.pack('<I%ss'%length, length, val1))
00190 length = len(self.recipes)
00191 buff.write(_struct_I.pack(length))
00192 for val1 in self.recipes:
00193 length = len(val1)
00194 if python3 or type(val1) == unicode:
00195 val1 = val1.encode('utf-8')
00196 length = len(val1)
00197 buff.write(struct.pack('<I%ss'%length, length, val1))
00198 except struct.error as se: self._check_types(se)
00199 except TypeError as te: self._check_types(te)
00200
00201 def deserialize(self, str):
00202 """
00203 unpack serialized message in str into this message instance
00204 :param str: byte array of serialized message, ``str``
00205 """
00206 try:
00207 end = 0
00208 start = end
00209 end += 1
00210 (self.success,) = _struct_B.unpack(str[start:end])
00211 self.success = bool(self.success)
00212 start = end
00213 end += 4
00214 (length,) = _struct_I.unpack(str[start:end])
00215 self.uids = []
00216 for i in range(0, length):
00217 start = end
00218 end += 4
00219 (length,) = _struct_I.unpack(str[start:end])
00220 start = end
00221 end += length
00222 if python3:
00223 val1 = str[start:end].decode('utf-8')
00224 else:
00225 val1 = str[start:end]
00226 self.uids.append(val1)
00227 start = end
00228 end += 4
00229 (length,) = _struct_I.unpack(str[start:end])
00230 self.recipes = []
00231 for i in range(0, length):
00232 start = end
00233 end += 4
00234 (length,) = _struct_I.unpack(str[start:end])
00235 start = end
00236 end += length
00237 if python3:
00238 val1 = str[start:end].decode('utf-8')
00239 else:
00240 val1 = str[start:end]
00241 self.recipes.append(val1)
00242 return self
00243 except struct.error as e:
00244 raise genpy.DeserializationError(e)
00245
00246
00247 def serialize_numpy(self, buff, numpy):
00248 """
00249 serialize message with numpy array types into buffer
00250 :param buff: buffer, ``StringIO``
00251 :param numpy: numpy python module
00252 """
00253 try:
00254 buff.write(_struct_B.pack(self.success))
00255 length = len(self.uids)
00256 buff.write(_struct_I.pack(length))
00257 for val1 in self.uids:
00258 length = len(val1)
00259 if python3 or type(val1) == unicode:
00260 val1 = val1.encode('utf-8')
00261 length = len(val1)
00262 buff.write(struct.pack('<I%ss'%length, length, val1))
00263 length = len(self.recipes)
00264 buff.write(_struct_I.pack(length))
00265 for val1 in self.recipes:
00266 length = len(val1)
00267 if python3 or type(val1) == unicode:
00268 val1 = val1.encode('utf-8')
00269 length = len(val1)
00270 buff.write(struct.pack('<I%ss'%length, length, val1))
00271 except struct.error as se: self._check_types(se)
00272 except TypeError as te: self._check_types(te)
00273
00274 def deserialize_numpy(self, str, numpy):
00275 """
00276 unpack serialized message in str into this message instance using numpy for array types
00277 :param str: byte array of serialized message, ``str``
00278 :param numpy: numpy python module
00279 """
00280 try:
00281 end = 0
00282 start = end
00283 end += 1
00284 (self.success,) = _struct_B.unpack(str[start:end])
00285 self.success = bool(self.success)
00286 start = end
00287 end += 4
00288 (length,) = _struct_I.unpack(str[start:end])
00289 self.uids = []
00290 for i in range(0, length):
00291 start = end
00292 end += 4
00293 (length,) = _struct_I.unpack(str[start:end])
00294 start = end
00295 end += length
00296 if python3:
00297 val1 = str[start:end].decode('utf-8')
00298 else:
00299 val1 = str[start:end]
00300 self.uids.append(val1)
00301 start = end
00302 end += 4
00303 (length,) = _struct_I.unpack(str[start:end])
00304 self.recipes = []
00305 for i in range(0, length):
00306 start = end
00307 end += 4
00308 (length,) = _struct_I.unpack(str[start:end])
00309 start = end
00310 end += length
00311 if python3:
00312 val1 = str[start:end].decode('utf-8')
00313 else:
00314 val1 = str[start:end]
00315 self.recipes.append(val1)
00316 return self
00317 except struct.error as e:
00318 raise genpy.DeserializationError(e)
00319
00320 _struct_I = genpy.struct_I
00321 _struct_B = struct.Struct("<B")
00322 class SearchActionRecipes(object):
00323 _type = 're_srvs/SearchActionRecipes'
00324 _md5sum = 'ab460e156aa3e532e70c8a5b8e2f72e7'
00325 _request_class = SearchActionRecipesRequest
00326 _response_class = SearchActionRecipesResponse