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