00001 """autogenerated by genpy from tug_ist_diagnosis_msgs/SystemModelActionResult.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006
00007 import tug_ist_diagnosis_msgs.msg
00008 import genpy
00009 import actionlib_msgs.msg
00010 import std_msgs.msg
00011
00012 class SystemModelActionResult(genpy.Message):
00013 _md5sum = "33f3081b9cbc9edf162dde755ce5aad9"
00014 _type = "tug_ist_diagnosis_msgs/SystemModelActionResult"
00015 _has_header = True
00016 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00017
00018 Header header
00019 actionlib_msgs/GoalStatus status
00020 SystemModelResult result
00021
00022 ================================================================================
00023 MSG: std_msgs/Header
00024 # Standard metadata for higher-level stamped data types.
00025 # This is generally used to communicate timestamped data
00026 # in a particular coordinate frame.
00027 #
00028 # sequence ID: consecutively increasing ID
00029 uint32 seq
00030 #Two-integer timestamp that is expressed as:
00031 # * stamp.secs: seconds (stamp_secs) since epoch
00032 # * stamp.nsecs: nanoseconds since stamp_secs
00033 # time-handling sugar is provided by the client library
00034 time stamp
00035 #Frame this data is associated with
00036 # 0: no frame
00037 # 1: global frame
00038 string frame_id
00039
00040 ================================================================================
00041 MSG: actionlib_msgs/GoalStatus
00042 GoalID goal_id
00043 uint8 status
00044 uint8 PENDING = 0 # The goal has yet to be processed by the action server
00045 uint8 ACTIVE = 1 # The goal is currently being processed by the action server
00046 uint8 PREEMPTED = 2 # The goal received a cancel request after it started executing
00047 # and has since completed its execution (Terminal State)
00048 uint8 SUCCEEDED = 3 # The goal was achieved successfully by the action server (Terminal State)
00049 uint8 ABORTED = 4 # The goal was aborted during execution by the action server due
00050 # to some failure (Terminal State)
00051 uint8 REJECTED = 5 # The goal was rejected by the action server without being processed,
00052 # because the goal was unattainable or invalid (Terminal State)
00053 uint8 PREEMPTING = 6 # The goal received a cancel request after it started executing
00054 # and has not yet completed execution
00055 uint8 RECALLING = 7 # The goal received a cancel request before it started executing,
00056 # but the action server has not yet confirmed that the goal is canceled
00057 uint8 RECALLED = 8 # The goal received a cancel request before it started executing
00058 # and was successfully cancelled (Terminal State)
00059 uint8 LOST = 9 # An action client can determine that a goal is LOST. This should not be
00060 # sent over the wire by an action server
00061
00062 #Allow for the user to associate a string with GoalStatus for debugging
00063 string text
00064
00065
00066 ================================================================================
00067 MSG: actionlib_msgs/GoalID
00068 # The stamp should store the time at which this goal was requested.
00069 # It is used by an action server when it tries to preempt all
00070 # goals that were requested before a certain time
00071 time stamp
00072
00073 # The id provides a way to associate feedback and
00074 # result message with specific goal requests. The id
00075 # specified must be unique.
00076 string id
00077
00078
00079 ================================================================================
00080 MSG: tug_ist_diagnosis_msgs/SystemModelResult
00081 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00082 #result definition
00083 string ab
00084 string nab
00085 string neg_prefix
00086 string[] rules
00087 string[] props
00088
00089 """
00090 __slots__ = ['header','status','result']
00091 _slot_types = ['std_msgs/Header','actionlib_msgs/GoalStatus','tug_ist_diagnosis_msgs/SystemModelResult']
00092
00093 def __init__(self, *args, **kwds):
00094 """
00095 Constructor. Any message fields that are implicitly/explicitly
00096 set to None will be assigned a default value. The recommend
00097 use is keyword arguments as this is more robust to future message
00098 changes. You cannot mix in-order arguments and keyword arguments.
00099
00100 The available fields are:
00101 header,status,result
00102
00103 :param args: complete set of field values, in .msg order
00104 :param kwds: use keyword arguments corresponding to message field names
00105 to set specific fields.
00106 """
00107 if args or kwds:
00108 super(SystemModelActionResult, self).__init__(*args, **kwds)
00109
00110 if self.header is None:
00111 self.header = std_msgs.msg.Header()
00112 if self.status is None:
00113 self.status = actionlib_msgs.msg.GoalStatus()
00114 if self.result is None:
00115 self.result = tug_ist_diagnosis_msgs.msg.SystemModelResult()
00116 else:
00117 self.header = std_msgs.msg.Header()
00118 self.status = actionlib_msgs.msg.GoalStatus()
00119 self.result = tug_ist_diagnosis_msgs.msg.SystemModelResult()
00120
00121 def _get_types(self):
00122 """
00123 internal API method
00124 """
00125 return self._slot_types
00126
00127 def serialize(self, buff):
00128 """
00129 serialize message into buffer
00130 :param buff: buffer, ``StringIO``
00131 """
00132 try:
00133 _x = self
00134 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00135 _x = self.header.frame_id
00136 length = len(_x)
00137 if python3 or type(_x) == unicode:
00138 _x = _x.encode('utf-8')
00139 length = len(_x)
00140 buff.write(struct.pack('<I%ss'%length, length, _x))
00141 _x = self
00142 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs))
00143 _x = self.status.goal_id.id
00144 length = len(_x)
00145 if python3 or type(_x) == unicode:
00146 _x = _x.encode('utf-8')
00147 length = len(_x)
00148 buff.write(struct.pack('<I%ss'%length, length, _x))
00149 buff.write(_struct_B.pack(self.status.status))
00150 _x = self.status.text
00151 length = len(_x)
00152 if python3 or type(_x) == unicode:
00153 _x = _x.encode('utf-8')
00154 length = len(_x)
00155 buff.write(struct.pack('<I%ss'%length, length, _x))
00156 _x = self.result.ab
00157 length = len(_x)
00158 if python3 or type(_x) == unicode:
00159 _x = _x.encode('utf-8')
00160 length = len(_x)
00161 buff.write(struct.pack('<I%ss'%length, length, _x))
00162 _x = self.result.nab
00163 length = len(_x)
00164 if python3 or type(_x) == unicode:
00165 _x = _x.encode('utf-8')
00166 length = len(_x)
00167 buff.write(struct.pack('<I%ss'%length, length, _x))
00168 _x = self.result.neg_prefix
00169 length = len(_x)
00170 if python3 or type(_x) == unicode:
00171 _x = _x.encode('utf-8')
00172 length = len(_x)
00173 buff.write(struct.pack('<I%ss'%length, length, _x))
00174 length = len(self.result.rules)
00175 buff.write(_struct_I.pack(length))
00176 for val1 in self.result.rules:
00177 length = len(val1)
00178 if python3 or type(val1) == unicode:
00179 val1 = val1.encode('utf-8')
00180 length = len(val1)
00181 buff.write(struct.pack('<I%ss'%length, length, val1))
00182 length = len(self.result.props)
00183 buff.write(_struct_I.pack(length))
00184 for val1 in self.result.props:
00185 length = len(val1)
00186 if python3 or type(val1) == unicode:
00187 val1 = val1.encode('utf-8')
00188 length = len(val1)
00189 buff.write(struct.pack('<I%ss'%length, length, val1))
00190 except struct.error as se: self._check_types(se)
00191 except TypeError as te: self._check_types(te)
00192
00193 def deserialize(self, str):
00194 """
00195 unpack serialized message in str into this message instance
00196 :param str: byte array of serialized message, ``str``
00197 """
00198 try:
00199 if self.header is None:
00200 self.header = std_msgs.msg.Header()
00201 if self.status is None:
00202 self.status = actionlib_msgs.msg.GoalStatus()
00203 if self.result is None:
00204 self.result = tug_ist_diagnosis_msgs.msg.SystemModelResult()
00205 end = 0
00206 _x = self
00207 start = end
00208 end += 12
00209 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00210 start = end
00211 end += 4
00212 (length,) = _struct_I.unpack(str[start:end])
00213 start = end
00214 end += length
00215 if python3:
00216 self.header.frame_id = str[start:end].decode('utf-8')
00217 else:
00218 self.header.frame_id = str[start:end]
00219 _x = self
00220 start = end
00221 end += 8
00222 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00223 start = end
00224 end += 4
00225 (length,) = _struct_I.unpack(str[start:end])
00226 start = end
00227 end += length
00228 if python3:
00229 self.status.goal_id.id = str[start:end].decode('utf-8')
00230 else:
00231 self.status.goal_id.id = str[start:end]
00232 start = end
00233 end += 1
00234 (self.status.status,) = _struct_B.unpack(str[start:end])
00235 start = end
00236 end += 4
00237 (length,) = _struct_I.unpack(str[start:end])
00238 start = end
00239 end += length
00240 if python3:
00241 self.status.text = str[start:end].decode('utf-8')
00242 else:
00243 self.status.text = str[start:end]
00244 start = end
00245 end += 4
00246 (length,) = _struct_I.unpack(str[start:end])
00247 start = end
00248 end += length
00249 if python3:
00250 self.result.ab = str[start:end].decode('utf-8')
00251 else:
00252 self.result.ab = str[start:end]
00253 start = end
00254 end += 4
00255 (length,) = _struct_I.unpack(str[start:end])
00256 start = end
00257 end += length
00258 if python3:
00259 self.result.nab = str[start:end].decode('utf-8')
00260 else:
00261 self.result.nab = str[start:end]
00262 start = end
00263 end += 4
00264 (length,) = _struct_I.unpack(str[start:end])
00265 start = end
00266 end += length
00267 if python3:
00268 self.result.neg_prefix = str[start:end].decode('utf-8')
00269 else:
00270 self.result.neg_prefix = str[start:end]
00271 start = end
00272 end += 4
00273 (length,) = _struct_I.unpack(str[start:end])
00274 self.result.rules = []
00275 for i in range(0, length):
00276 start = end
00277 end += 4
00278 (length,) = _struct_I.unpack(str[start:end])
00279 start = end
00280 end += length
00281 if python3:
00282 val1 = str[start:end].decode('utf-8')
00283 else:
00284 val1 = str[start:end]
00285 self.result.rules.append(val1)
00286 start = end
00287 end += 4
00288 (length,) = _struct_I.unpack(str[start:end])
00289 self.result.props = []
00290 for i in range(0, length):
00291 start = end
00292 end += 4
00293 (length,) = _struct_I.unpack(str[start:end])
00294 start = end
00295 end += length
00296 if python3:
00297 val1 = str[start:end].decode('utf-8')
00298 else:
00299 val1 = str[start:end]
00300 self.result.props.append(val1)
00301 return self
00302 except struct.error as e:
00303 raise genpy.DeserializationError(e)
00304
00305
00306 def serialize_numpy(self, buff, numpy):
00307 """
00308 serialize message with numpy array types into buffer
00309 :param buff: buffer, ``StringIO``
00310 :param numpy: numpy python module
00311 """
00312 try:
00313 _x = self
00314 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00315 _x = self.header.frame_id
00316 length = len(_x)
00317 if python3 or type(_x) == unicode:
00318 _x = _x.encode('utf-8')
00319 length = len(_x)
00320 buff.write(struct.pack('<I%ss'%length, length, _x))
00321 _x = self
00322 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs))
00323 _x = self.status.goal_id.id
00324 length = len(_x)
00325 if python3 or type(_x) == unicode:
00326 _x = _x.encode('utf-8')
00327 length = len(_x)
00328 buff.write(struct.pack('<I%ss'%length, length, _x))
00329 buff.write(_struct_B.pack(self.status.status))
00330 _x = self.status.text
00331 length = len(_x)
00332 if python3 or type(_x) == unicode:
00333 _x = _x.encode('utf-8')
00334 length = len(_x)
00335 buff.write(struct.pack('<I%ss'%length, length, _x))
00336 _x = self.result.ab
00337 length = len(_x)
00338 if python3 or type(_x) == unicode:
00339 _x = _x.encode('utf-8')
00340 length = len(_x)
00341 buff.write(struct.pack('<I%ss'%length, length, _x))
00342 _x = self.result.nab
00343 length = len(_x)
00344 if python3 or type(_x) == unicode:
00345 _x = _x.encode('utf-8')
00346 length = len(_x)
00347 buff.write(struct.pack('<I%ss'%length, length, _x))
00348 _x = self.result.neg_prefix
00349 length = len(_x)
00350 if python3 or type(_x) == unicode:
00351 _x = _x.encode('utf-8')
00352 length = len(_x)
00353 buff.write(struct.pack('<I%ss'%length, length, _x))
00354 length = len(self.result.rules)
00355 buff.write(_struct_I.pack(length))
00356 for val1 in self.result.rules:
00357 length = len(val1)
00358 if python3 or type(val1) == unicode:
00359 val1 = val1.encode('utf-8')
00360 length = len(val1)
00361 buff.write(struct.pack('<I%ss'%length, length, val1))
00362 length = len(self.result.props)
00363 buff.write(_struct_I.pack(length))
00364 for val1 in self.result.props:
00365 length = len(val1)
00366 if python3 or type(val1) == unicode:
00367 val1 = val1.encode('utf-8')
00368 length = len(val1)
00369 buff.write(struct.pack('<I%ss'%length, length, val1))
00370 except struct.error as se: self._check_types(se)
00371 except TypeError as te: self._check_types(te)
00372
00373 def deserialize_numpy(self, str, numpy):
00374 """
00375 unpack serialized message in str into this message instance using numpy for array types
00376 :param str: byte array of serialized message, ``str``
00377 :param numpy: numpy python module
00378 """
00379 try:
00380 if self.header is None:
00381 self.header = std_msgs.msg.Header()
00382 if self.status is None:
00383 self.status = actionlib_msgs.msg.GoalStatus()
00384 if self.result is None:
00385 self.result = tug_ist_diagnosis_msgs.msg.SystemModelResult()
00386 end = 0
00387 _x = self
00388 start = end
00389 end += 12
00390 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00391 start = end
00392 end += 4
00393 (length,) = _struct_I.unpack(str[start:end])
00394 start = end
00395 end += length
00396 if python3:
00397 self.header.frame_id = str[start:end].decode('utf-8')
00398 else:
00399 self.header.frame_id = str[start:end]
00400 _x = self
00401 start = end
00402 end += 8
00403 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00404 start = end
00405 end += 4
00406 (length,) = _struct_I.unpack(str[start:end])
00407 start = end
00408 end += length
00409 if python3:
00410 self.status.goal_id.id = str[start:end].decode('utf-8')
00411 else:
00412 self.status.goal_id.id = str[start:end]
00413 start = end
00414 end += 1
00415 (self.status.status,) = _struct_B.unpack(str[start:end])
00416 start = end
00417 end += 4
00418 (length,) = _struct_I.unpack(str[start:end])
00419 start = end
00420 end += length
00421 if python3:
00422 self.status.text = str[start:end].decode('utf-8')
00423 else:
00424 self.status.text = str[start:end]
00425 start = end
00426 end += 4
00427 (length,) = _struct_I.unpack(str[start:end])
00428 start = end
00429 end += length
00430 if python3:
00431 self.result.ab = str[start:end].decode('utf-8')
00432 else:
00433 self.result.ab = str[start:end]
00434 start = end
00435 end += 4
00436 (length,) = _struct_I.unpack(str[start:end])
00437 start = end
00438 end += length
00439 if python3:
00440 self.result.nab = str[start:end].decode('utf-8')
00441 else:
00442 self.result.nab = str[start:end]
00443 start = end
00444 end += 4
00445 (length,) = _struct_I.unpack(str[start:end])
00446 start = end
00447 end += length
00448 if python3:
00449 self.result.neg_prefix = str[start:end].decode('utf-8')
00450 else:
00451 self.result.neg_prefix = str[start:end]
00452 start = end
00453 end += 4
00454 (length,) = _struct_I.unpack(str[start:end])
00455 self.result.rules = []
00456 for i in range(0, length):
00457 start = end
00458 end += 4
00459 (length,) = _struct_I.unpack(str[start:end])
00460 start = end
00461 end += length
00462 if python3:
00463 val1 = str[start:end].decode('utf-8')
00464 else:
00465 val1 = str[start:end]
00466 self.result.rules.append(val1)
00467 start = end
00468 end += 4
00469 (length,) = _struct_I.unpack(str[start:end])
00470 self.result.props = []
00471 for i in range(0, length):
00472 start = end
00473 end += 4
00474 (length,) = _struct_I.unpack(str[start:end])
00475 start = end
00476 end += length
00477 if python3:
00478 val1 = str[start:end].decode('utf-8')
00479 else:
00480 val1 = str[start:end]
00481 self.result.props.append(val1)
00482 return self
00483 except struct.error as e:
00484 raise genpy.DeserializationError(e)
00485
00486 _struct_I = genpy.struct_I
00487 _struct_3I = struct.Struct("<3I")
00488 _struct_B = struct.Struct("<B")
00489 _struct_2I = struct.Struct("<2I")