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


re_srvs
Author(s): Alexander Perzylo
autogenerated on Sun Jan 5 2014 11:28:42