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


srs_knowledge
Author(s): Ze Ji
autogenerated on Sun Jan 5 2014 12:03:26