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