Improve BTParallel class doc

This commit is contained in:
Serhii Snitsaruk 2023-09-27 17:08:51 +02:00
parent 978a47f505
commit d2bde1a805
1 changed files with 7 additions and 7 deletions

View File

@ -1,23 +1,23 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BTParallel" inherits="BTComposite" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
BT composite that executes child tasks until one of the criteria is met.
BT composite that executes all of its child tasks simultaneously.
</brief_description>
<description>
BTParallel executes its child tasks until one of the criterea is met. It will execute each task at least once, from the first to the last, before returning a result.
If set to [member repeat], the child tasks will be re-executed, regardless of whether they previously resulted in a [code]SUCCESS[/code] or [code]FAILURE[/code].
Returns [code]FAILURE[/code] when the required number of tasks return [code]FAILURE[/code]. When [member repeat] is set to [code]false[/code], if none of the criteria were met, and all child tasks resulted in a [code]SUCCESS[/code] or [code]FAILURE[/code], BTParallel will return [code]FAILURE[/code].
Returns [code]SUCCESS[/code] when the required number of tasks return [code]SUCCESS[/code].
BTParallel executes all of its child tasks simultaneously. Note that BTParallel doesn't involve multithreading. It processes each task sequentially, from first to last, in the same tick before returning a result. If one of the abort criterea is met, any tasks currently [code]RUNNING[/code] will be terminated, and the result will be either [code]FAILURE[/code] or [code]SUCCESS[/code]. The [member num_failures_required] determines when BTParallel fails and [member num_successes_required] when it succeeds. When both are fullfilled, it gives priority to [member num_failures_required].
If set to [member repeat], all child tasks will be re-executed each tick, regardless of whether they previously resulted in [code]SUCCESS[/code] or [code]FAILURE[/code].
Returns [code]FAILURE[/code] when the required number of child tasks result in [code]FAILURE[/code]. When [member repeat] is set to [code]false[/code], if none of the criteria were met and all child tasks resulted in either [code]SUCCESS[/code] or [code]FAILURE[/code], BTParallel will return [code]FAILURE[/code].
Returns [code]SUCCESS[/code] when the required number of child tasks result in [code]SUCCESS[/code].
Returns [code]RUNNING[/code] if none of the criterea were fulfilled, and either [member repeat] is set to [code]true[/code] or a child task resulted in [code]RUNNING[/code].
</description>
<tutorials>
</tutorials>
<members>
<member name="num_failures_required" type="int" setter="set_num_failures_required" getter="get_num_failures_required" default="1">
When the specified number of child tasks return [code]SUCCESS[/code], BTParallel will also return [code]SUCCESS[/code].
If the specified number of child tasks return [code]SUCCESS[/code], BTParallel will also return [code]SUCCESS[/code].
</member>
<member name="num_successes_required" type="int" setter="set_num_successes_required" getter="get_num_successes_required" default="1">
When the specified number of child tasks return [code]FAILURE[/code], BTParallel will also return [code]FAILURE[/code].
If the specified number of child tasks return [code]FAILURE[/code], BTParallel will also return [code]FAILURE[/code].
</member>
<member name="repeat" type="bool" setter="set_repeat" getter="get_repeat" default="false">
When [code]true[/code], the child tasks will be executed again, regardless of whether they previously resulted in a [code]SUCCESS[/code] or [code]FAILURE[/code].