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