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