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