limboai/doc_classes/BTRunLimit.xml

32 lines
1.4 KiB
XML
Raw Permalink Normal View History

2022-11-01 20:31:22 +00:00
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BTRunLimit" inherits="BTDecorator" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
2022-11-01 20:31:22 +00:00
<brief_description>
BT decorator that restricts the execution of its child a limited number of times.
2022-11-01 20:31:22 +00:00
</brief_description>
<description>
BTRunLimit restricts the execution of the child task to a maximum number of times, defined by [member run_limit].
Returns [code]FAILURE[/code] if the limit on executions is exceeded; otherwise, it returns the status of the child task.
2022-11-01 20:31:22 +00:00
</description>
<tutorials>
</tutorials>
<members>
2024-02-10 19:29:48 +00:00
<member name="count_policy" type="int" setter="set_count_policy" getter="get_count_policy" enum="BTRunLimit.CountPolicy" default="0">
Which runs should be counted towards the limit: successful, failed, or all?
</member>
2022-11-01 20:31:22 +00:00
<member name="run_limit" type="int" setter="set_run_limit" getter="get_run_limit" default="1">
The maximum number of times the child is permitted to be executed.
2022-11-01 20:31:22 +00:00
</member>
</members>
2024-02-10 19:29:48 +00:00
<constants>
<constant name="COUNT_SUCCESSFUL" value="0" enum="CountPolicy">
Count only successful runs towards the limit.
</constant>
<constant name="COUNT_FAILED" value="1" enum="CountPolicy">
Count only failed runs towards the limit.
</constant>
<constant name="COUNT_ALL" value="2" enum="CountPolicy">
Count successful and failed runs towards the limit.
</constant>
</constants>
2022-11-01 20:31:22 +00:00
</class>