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