Public Member Functions | |
def | __attrs_post_init__ |
def | end_step |
def | make_sequence |
Creates the Loop execution graph. More... | |
def | set_block |
Assigns the sequence to the loop's block. More... | |
def | make_task |
def | nodes |
def | get_node |
def | __attrs_post_init__ |
def | end_step |
def | make_sequence |
Creates the Loop execution graph. More... | |
def | set_block |
Assigns the sequence to the loop's block. More... | |
def | make_task |
def | nodes |
def | get_node |
Static Public Member Functions | |
def | create |
Creates a :class:Loop node. More... | |
def | create |
Creates a :class:Loop node. More... | |
Public Attributes | |
name | |
condition | |
init | |
state | |
in_error | |
block | |
Static Public Attributes | |
tuple | block_args = attr.ib(kw_only=True, default=attr.Factory(list), repr=False) |
tuple | condition = attr.ib(kw_only=True, default=None, repr=False) |
tuple | init = attr.ib(kw_only=True, default=None, repr=False) |
tuple | block = attr.ib(init=False, default=None, repr=False) |
tuple | index = cv.ContextVar("index", default=0) |
Loop node definition.
Use the :meth:create
method to build properly :class:Loop
node. Since it inherits from :class:Sequence
it has access to the same context variables.
============ =======================================================
Name Desc ============ ======================================================= current_tpl The parent of the current node (from :class:Sequence
) root Top level DAG's root (from :class:Sequence
) index The Loop's current index (starts at 0) ============ =======================================================
id (Optional str): Node id. name (Optional str): Node name.
init | Initialization node. |
condition | A Python method that returns a boolean value. |
block | The loop's body. |
def seqlib.nodes.loop.Loop.__attrs_post_init__ | ( | self | ) |
def seqlib.nodes.loop.Loop.__attrs_post_init__ | ( | self | ) |
|
static |
Creates a :class:Loop
node.
*args: Variable length list of nodes or coroutines that comprises the Loop`s body.
id | Node id |
name | node name |
init | initialization node :class:Action or :class:ActionInThread . |
condition | condition node :class:Action or :class:ActionInThread . |
Loop
objectExamples
Creating a loop.
.. code-block:: python
def eval_condition(): return False class Tpl: def initialize(self, context):
async def a(): pass async def b(): pass
def create()
|
static |
Creates a :class:Loop
node.
*args: Variable length list of nodes or coroutines that comprises the Loop`s body.
id | Node id |
name | node name |
init | initialization node :class:Action or :class:ActionInThread . |
condition | condition node :class:Action or :class:ActionInThread . |
Loop
objectExamples
Creating a loop.
.. code-block:: python
def eval_condition(): return False class Tpl: def initialize(self, context):
async def a(): pass async def b(): pass
def create()
def seqlib.nodes.loop.Loop.end_step | ( | self | ) |
Standard Loop's end step. Evaluates the Loop's final state.
def seqlib.nodes.loop.Loop.end_step | ( | self | ) |
Standard Loop's end step. Evaluates the Loop's final state.
def seqlib.nodes.loop.Loop.get_node | ( | self, | |
node_id | |||
) |
def seqlib.nodes.loop.Loop.get_node | ( | self, | |
node_id | |||
) |
def seqlib.nodes.loop.Loop.make_sequence | ( | self | ) |
Creates the Loop execution graph.
def seqlib.nodes.loop.Loop.make_sequence | ( | self | ) |
Creates the Loop execution graph.
def seqlib.nodes.loop.Loop.make_task | ( | self, | |
node, | |||
input_list, | |||
resume | |||
) |
def seqlib.nodes.loop.Loop.make_task | ( | self, | |
node, | |||
input_list, | |||
resume | |||
) |
def seqlib.nodes.loop.Loop.nodes | ( | self | ) |
def seqlib.nodes.loop.Loop.nodes | ( | self | ) |
def seqlib.nodes.loop.Loop.set_block | ( | self, | |
args | |||
) |
Assigns the sequence to the loop's block.
def seqlib.nodes.loop.Loop.set_block | ( | self, | |
args | |||
) |
Assigns the sequence to the loop's block.
|
static |
seqlib.nodes.loop.Loop.block |
|
static |
|
static |
seqlib.nodes.loop.Loop.condition |
seqlib.nodes.loop.Loop.in_error |
|
static |
|
static |
seqlib.nodes.loop.Loop.init |
seqlib.nodes.loop.Loop.name |
seqlib.nodes.loop.Loop.state |