00001 """autogenerated by genpy from re_srvs/SetActionRecipeRequest.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 SetActionRecipeRequest(genpy.Message):
00009 _md5sum = "9bef47262d31dfac5059d4b1d74a6089"
00010 _type = "re_srvs/SetActionRecipeRequest"
00011 _has_header = False
00012 _full_text = """
00013 string cls
00014 string id
00015 string description
00016 string recipe
00017 string apiKey
00018
00019
00020 """
00021 __slots__ = ['cls','id','description','recipe','apiKey']
00022 _slot_types = ['string','string','string','string','string']
00023
00024 def __init__(self, *args, **kwds):
00025 """
00026 Constructor. Any message fields that are implicitly/explicitly
00027 set to None will be assigned a default value. The recommend
00028 use is keyword arguments as this is more robust to future message
00029 changes. You cannot mix in-order arguments and keyword arguments.
00030
00031 The available fields are:
00032 cls,id,description,recipe,apiKey
00033
00034 :param args: complete set of field values, in .msg order
00035 :param kwds: use keyword arguments corresponding to message field names
00036 to set specific fields.
00037 """
00038 if args or kwds:
00039 super(SetActionRecipeRequest, self).__init__(*args, **kwds)
00040
00041 if self.cls is None:
00042 self.cls = ''
00043 if self.id is None:
00044 self.id = ''
00045 if self.description is None:
00046 self.description = ''
00047 if self.recipe is None:
00048 self.recipe = ''
00049 if self.apiKey is None:
00050 self.apiKey = ''
00051 else:
00052 self.cls = ''
00053 self.id = ''
00054 self.description = ''
00055 self.recipe = ''
00056 self.apiKey = ''
00057
00058 def _get_types(self):
00059 """
00060 internal API method
00061 """
00062 return self._slot_types
00063
00064 def serialize(self, buff):
00065 """
00066 serialize message into buffer
00067 :param buff: buffer, ``StringIO``
00068 """
00069 try:
00070 _x = self.cls
00071 length = len(_x)
00072 if python3 or type(_x) == unicode:
00073 _x = _x.encode('utf-8')
00074 length = len(_x)
00075 buff.write(struct.pack('<I%ss'%length, length, _x))
00076 _x = self.id
00077 length = len(_x)
00078 if python3 or type(_x) == unicode:
00079 _x = _x.encode('utf-8')
00080 length = len(_x)
00081 buff.write(struct.pack('<I%ss'%length, length, _x))
00082 _x = self.description
00083 length = len(_x)
00084 if python3 or type(_x) == unicode:
00085 _x = _x.encode('utf-8')
00086 length = len(_x)
00087 buff.write(struct.pack('<I%ss'%length, length, _x))
00088 _x = self.recipe
00089 length = len(_x)
00090 if python3 or type(_x) == unicode:
00091 _x = _x.encode('utf-8')
00092 length = len(_x)
00093 buff.write(struct.pack('<I%ss'%length, length, _x))
00094 _x = self.apiKey
00095 length = len(_x)
00096 if python3 or type(_x) == unicode:
00097 _x = _x.encode('utf-8')
00098 length = len(_x)
00099 buff.write(struct.pack('<I%ss'%length, length, _x))
00100 except struct.error as se: self._check_types(se)
00101 except TypeError as te: self._check_types(te)
00102
00103 def deserialize(self, str):
00104 """
00105 unpack serialized message in str into this message instance
00106 :param str: byte array of serialized message, ``str``
00107 """
00108 try:
00109 end = 0
00110 start = end
00111 end += 4
00112 (length,) = _struct_I.unpack(str[start:end])
00113 start = end
00114 end += length
00115 if python3:
00116 self.cls = str[start:end].decode('utf-8')
00117 else:
00118 self.cls = str[start:end]
00119 start = end
00120 end += 4
00121 (length,) = _struct_I.unpack(str[start:end])
00122 start = end
00123 end += length
00124 if python3:
00125 self.id = str[start:end].decode('utf-8')
00126 else:
00127 self.id = str[start:end]
00128 start = end
00129 end += 4
00130 (length,) = _struct_I.unpack(str[start:end])
00131 start = end
00132 end += length
00133 if python3:
00134 self.description = str[start:end].decode('utf-8')
00135 else:
00136 self.description = str[start:end]
00137 start = end
00138 end += 4
00139 (length,) = _struct_I.unpack(str[start:end])
00140 start = end
00141 end += length
00142 if python3:
00143 self.recipe = str[start:end].decode('utf-8')
00144 else:
00145 self.recipe = str[start:end]
00146 start = end
00147 end += 4
00148 (length,) = _struct_I.unpack(str[start:end])
00149 start = end
00150 end += length
00151 if python3:
00152 self.apiKey = str[start:end].decode('utf-8')
00153 else:
00154 self.apiKey = str[start:end]
00155 return self
00156 except struct.error as e:
00157 raise genpy.DeserializationError(e)
00158
00159
00160 def serialize_numpy(self, buff, numpy):
00161 """
00162 serialize message with numpy array types into buffer
00163 :param buff: buffer, ``StringIO``
00164 :param numpy: numpy python module
00165 """
00166 try:
00167 _x = self.cls
00168 length = len(_x)
00169 if python3 or type(_x) == unicode:
00170 _x = _x.encode('utf-8')
00171 length = len(_x)
00172 buff.write(struct.pack('<I%ss'%length, length, _x))
00173 _x = self.id
00174 length = len(_x)
00175 if python3 or type(_x) == unicode:
00176 _x = _x.encode('utf-8')
00177 length = len(_x)
00178 buff.write(struct.pack('<I%ss'%length, length, _x))
00179 _x = self.description
00180 length = len(_x)
00181 if python3 or type(_x) == unicode:
00182 _x = _x.encode('utf-8')
00183 length = len(_x)
00184 buff.write(struct.pack('<I%ss'%length, length, _x))
00185 _x = self.recipe
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 _x = self.apiKey
00192 length = len(_x)
00193 if python3 or type(_x) == unicode:
00194 _x = _x.encode('utf-8')
00195 length = len(_x)
00196 buff.write(struct.pack('<I%ss'%length, length, _x))
00197 except struct.error as se: self._check_types(se)
00198 except TypeError as te: self._check_types(te)
00199
00200 def deserialize_numpy(self, str, numpy):
00201 """
00202 unpack serialized message in str into this message instance using numpy for array types
00203 :param str: byte array of serialized message, ``str``
00204 :param numpy: numpy python module
00205 """
00206 try:
00207 end = 0
00208 start = end
00209 end += 4
00210 (length,) = _struct_I.unpack(str[start:end])
00211 start = end
00212 end += length
00213 if python3:
00214 self.cls = str[start:end].decode('utf-8')
00215 else:
00216 self.cls = str[start:end]
00217 start = end
00218 end += 4
00219 (length,) = _struct_I.unpack(str[start:end])
00220 start = end
00221 end += length
00222 if python3:
00223 self.id = str[start:end].decode('utf-8')
00224 else:
00225 self.id = str[start:end]
00226 start = end
00227 end += 4
00228 (length,) = _struct_I.unpack(str[start:end])
00229 start = end
00230 end += length
00231 if python3:
00232 self.description = str[start:end].decode('utf-8')
00233 else:
00234 self.description = str[start:end]
00235 start = end
00236 end += 4
00237 (length,) = _struct_I.unpack(str[start:end])
00238 start = end
00239 end += length
00240 if python3:
00241 self.recipe = str[start:end].decode('utf-8')
00242 else:
00243 self.recipe = str[start:end]
00244 start = end
00245 end += 4
00246 (length,) = _struct_I.unpack(str[start:end])
00247 start = end
00248 end += length
00249 if python3:
00250 self.apiKey = str[start:end].decode('utf-8')
00251 else:
00252 self.apiKey = str[start:end]
00253 return self
00254 except struct.error as e:
00255 raise genpy.DeserializationError(e)
00256
00257 _struct_I = genpy.struct_I
00258 """autogenerated by genpy from re_srvs/SetActionRecipeResponse.msg. Do not edit."""
00259 import sys
00260 python3 = True if sys.hexversion > 0x03000000 else False
00261 import genpy
00262 import struct
00263
00264
00265 class SetActionRecipeResponse(genpy.Message):
00266 _md5sum = "358e233cde0c8a8bcfea4ce193f8fc15"
00267 _type = "re_srvs/SetActionRecipeResponse"
00268 _has_header = False
00269 _full_text = """bool success
00270
00271
00272 """
00273 __slots__ = ['success']
00274 _slot_types = ['bool']
00275
00276 def __init__(self, *args, **kwds):
00277 """
00278 Constructor. Any message fields that are implicitly/explicitly
00279 set to None will be assigned a default value. The recommend
00280 use is keyword arguments as this is more robust to future message
00281 changes. You cannot mix in-order arguments and keyword arguments.
00282
00283 The available fields are:
00284 success
00285
00286 :param args: complete set of field values, in .msg order
00287 :param kwds: use keyword arguments corresponding to message field names
00288 to set specific fields.
00289 """
00290 if args or kwds:
00291 super(SetActionRecipeResponse, self).__init__(*args, **kwds)
00292
00293 if self.success is None:
00294 self.success = False
00295 else:
00296 self.success = False
00297
00298 def _get_types(self):
00299 """
00300 internal API method
00301 """
00302 return self._slot_types
00303
00304 def serialize(self, buff):
00305 """
00306 serialize message into buffer
00307 :param buff: buffer, ``StringIO``
00308 """
00309 try:
00310 buff.write(_struct_B.pack(self.success))
00311 except struct.error as se: self._check_types(se)
00312 except TypeError as te: self._check_types(te)
00313
00314 def deserialize(self, str):
00315 """
00316 unpack serialized message in str into this message instance
00317 :param str: byte array of serialized message, ``str``
00318 """
00319 try:
00320 end = 0
00321 start = end
00322 end += 1
00323 (self.success,) = _struct_B.unpack(str[start:end])
00324 self.success = bool(self.success)
00325 return self
00326 except struct.error as e:
00327 raise genpy.DeserializationError(e)
00328
00329
00330 def serialize_numpy(self, buff, numpy):
00331 """
00332 serialize message with numpy array types into buffer
00333 :param buff: buffer, ``StringIO``
00334 :param numpy: numpy python module
00335 """
00336 try:
00337 buff.write(_struct_B.pack(self.success))
00338 except struct.error as se: self._check_types(se)
00339 except TypeError as te: self._check_types(te)
00340
00341 def deserialize_numpy(self, str, numpy):
00342 """
00343 unpack serialized message in str into this message instance using numpy for array types
00344 :param str: byte array of serialized message, ``str``
00345 :param numpy: numpy python module
00346 """
00347 try:
00348 end = 0
00349 start = end
00350 end += 1
00351 (self.success,) = _struct_B.unpack(str[start:end])
00352 self.success = bool(self.success)
00353 return self
00354 except struct.error as e:
00355 raise genpy.DeserializationError(e)
00356
00357 _struct_I = genpy.struct_I
00358 _struct_B = struct.Struct("<B")
00359 class SetActionRecipe(object):
00360 _type = 're_srvs/SetActionRecipe'
00361 _md5sum = 'f36f93785e5f7f843ef366910639a201'
00362 _request_class = SetActionRecipeRequest
00363 _response_class = SetActionRecipeResponse