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


checkerboard_detector2
Author(s): Rosen Diankov, Felix Endres
autogenerated on Wed Dec 26 2012 15:30:15