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


vision_srvs
Author(s): Ulrich F Klank
autogenerated on Thu Jan 2 2014 11:22:38