Basic sequencer node. More...
Public Member Functions | |
def | __attrs_post_init__ |
Assigns node's name and id. More... | |
def | context |
Get context dictionary, preferably from root node. More... | |
def | context |
def | seq |
Retrieves the sequence list. More... | |
def | seq |
List used to create the Sequence's graph. More... | |
def | G |
returns the graph object More... | |
def | start_step |
def | end_step |
def | start_node |
Returns the start node. More... | |
def | end_node |
Returns the end node. More... | |
def | append |
Appends a node to the Sequence. More... | |
def | make_sequence |
Builds this sequence execution graph. More... | |
def | create_node_tasks |
Creates Task object associated to this node. More... | |
def | reschedule_node |
Reschedule a node for execution. More... | |
def | start |
This is the entry point for Sequence execution. More... | |
def | run |
def | execute |
def | resume |
def | main_task |
Returns the objective node of the sequence – the end node. More... | |
def | __call__ |
def | abort |
Aborts the sequence. More... | |
def | nodes |
Return nodes from Graph. More... | |
def | get_node |
Get node by id. More... | |
def | get_task |
Get task by node_id. More... | |
def | state |
def | publish_state |
def | state |
Sets the node state. More... | |
def | __attrs_post_init__ |
Assigns node's name and id. More... | |
def | context |
Get context dictionary, preferably from root node. More... | |
def | context |
def | seq |
Retrieves the sequence list. More... | |
def | seq |
List used to create the Sequence's graph. More... | |
def | G |
returns the graph object More... | |
def | start_step |
def | end_step |
def | start_node |
Returns the start node. More... | |
def | end_node |
Returns the end node. More... | |
def | append |
Appends a node to the Sequence. More... | |
def | make_sequence |
Builds this sequence execution graph. More... | |
def | create_node_tasks |
Creates Task object associated to this node. More... | |
def | reschedule_node |
Reschedule a node for execution. More... | |
def | start |
This is the entry point for Sequence execution. More... | |
def | run |
def | execute |
def | resume |
def | main_task |
Returns the objective node of the sequence – the end node. More... | |
def | __call__ |
def | abort |
Aborts the sequence. More... | |
def | nodes |
Return nodes from Graph. More... | |
def | get_node |
Get node by id. More... | |
def | get_task |
Get task by node_id. More... | |
def | state |
def | publish_state |
def | state |
Sets the node state. More... | |
Static Public Member Functions | |
def | get_context |
def | create |
Sequence node constructor. More... | |
def | get_context |
def | create |
Sequence node constructor. More... | |
Public Attributes | |
name | |
id | |
state | |
node state More... | |
in_error | |
t_start | |
t_end | |
exception | |
Static Public Attributes | |
tuple | graph = attr.ib(init=False, default=attr.Factory(nx.DiGraph), repr=False) |
tuple | debug = attr.ib(init=False, default=False, repr=False) |
tuple | current_tpl = cv.ContextVar("current_tpl", default=None) |
tuple | root = cv.ContextVar("root", default=None) |
Basic sequencer node.
Use :meth:create
to build poperly :class:Sequence
objects.
============ ===============================
Name Desc ============ =============================== current_tpl The parent of the current node root Top level DAG's root ============ ===============================
Examples
... current_tpl = Sequence.current_tpl
... assert current_tpl == s
def seqlib.nodes.sequence.Sequence.__attrs_post_init__ | ( | self | ) |
Assigns node's name and id.
def seqlib.nodes.sequence.Sequence.__attrs_post_init__ | ( | self | ) |
Assigns node's name and id.
def seqlib.nodes.sequence.Sequence.__call__ | ( | self, | |
resume = False |
|||
) |
def seqlib.nodes.sequence.Sequence.__call__ | ( | self, | |
resume = False |
|||
) |
def seqlib.nodes.sequence.Sequence.abort | ( | self | ) |
Aborts the sequence.
Goes trough the full graph and aborts the tasks associated to nodes (if any).
def seqlib.nodes.sequence.Sequence.abort | ( | self | ) |
Aborts the sequence.
Goes trough the full graph and aborts the tasks associated to nodes (if any).
def seqlib.nodes.sequence.Sequence.append | ( | self, | |
s | |||
) |
Appends a node to the Sequence.
def seqlib.nodes.sequence.Sequence.append | ( | self, | |
s | |||
) |
Appends a node to the Sequence.
def seqlib.nodes.sequence.Sequence.context | ( | self | ) |
Get context dictionary, preferably from root node.
def seqlib.nodes.sequence.Sequence.context | ( | self | ) |
Get context dictionary, preferably from root node.
def seqlib.nodes.sequence.Sequence.context | ( | self, | |
ctx | |||
) |
def seqlib.nodes.sequence.Sequence.context | ( | self, | |
ctx | |||
) |
|
static |
Sequence node constructor.
*args: Variable length list of nodes or coroutines that compose the sequence.
id | Node id |
name | node name |
|
static |
Sequence node constructor.
*args: Variable length list of nodes or coroutines that compose the sequence.
id | Node id |
name | node name |
def seqlib.nodes.sequence.Sequence.create_node_tasks | ( | self, | |
resume = False |
|||
) |
Creates Task object associated to this node.
def seqlib.nodes.sequence.Sequence.create_node_tasks | ( | self, | |
resume = False |
|||
) |
Creates Task object associated to this node.
def seqlib.nodes.sequence.Sequence.end_node | ( | self | ) |
Returns the end node.
If it does not exist, it creates it.
def seqlib.nodes.sequence.Sequence.end_node | ( | self | ) |
Returns the end node.
If it does not exist, it creates it.
def seqlib.nodes.sequence.Sequence.end_step | ( | self | ) |
Standard sequence's end step. Evaluates the sequence's final state. Collects node's result and put them in the sequence's result attribute.
def seqlib.nodes.sequence.Sequence.end_step | ( | self | ) |
Standard sequence's end step. Evaluates the sequence's final state. Collects node's result and put them in the sequence's result attribute.
def seqlib.nodes.sequence.Sequence.execute | ( | self, | |
resume = False |
|||
) |
Executes node -- this just creates the asyncio task
def seqlib.nodes.sequence.Sequence.execute | ( | self, | |
resume = False |
|||
) |
Executes node -- this just creates the asyncio task
def seqlib.nodes.sequence.Sequence.G | ( | self | ) |
returns the graph object
def seqlib.nodes.sequence.Sequence.G | ( | self | ) |
returns the graph object
|
static |
|
static |
def seqlib.nodes.sequence.Sequence.get_node | ( | self, | |
node_id | |||
) |
Get node by id.
def seqlib.nodes.sequence.Sequence.get_node | ( | self, | |
node_id | |||
) |
Get node by id.
def seqlib.nodes.sequence.Sequence.get_task | ( | self, | |
node_id | |||
) |
Get task by node_id.
def seqlib.nodes.sequence.Sequence.get_task | ( | self, | |
node_id | |||
) |
Get task by node_id.
def seqlib.nodes.sequence.Sequence.main_task | ( | self | ) |
Returns the objective node of the sequence – the end node.
def seqlib.nodes.sequence.Sequence.main_task | ( | self | ) |
Returns the objective node of the sequence – the end node.
def seqlib.nodes.sequence.Sequence.make_sequence | ( | self | ) |
Builds this sequence execution graph.
def seqlib.nodes.sequence.Sequence.make_sequence | ( | self | ) |
Builds this sequence execution graph.
def seqlib.nodes.sequence.Sequence.nodes | ( | self | ) |
Return nodes from Graph.
def seqlib.nodes.sequence.Sequence.nodes | ( | self | ) |
Return nodes from Graph.
def seqlib.nodes.sequence.Sequence.publish_state | ( | self | ) |
def seqlib.nodes.sequence.Sequence.publish_state | ( | self | ) |
def seqlib.nodes.sequence.Sequence.reschedule_node | ( | self, | |
node_id | |||
) |
Reschedule a node for execution.
def seqlib.nodes.sequence.Sequence.reschedule_node | ( | self, | |
node_id | |||
) |
Reschedule a node for execution.
def seqlib.nodes.sequence.Sequence.resume | ( | self | ) |
Resume node execution
def seqlib.nodes.sequence.Sequence.resume | ( | self | ) |
Resume node execution
def seqlib.nodes.sequence.Sequence.run | ( | self | ) |
Runs the node -- This executes the task
def seqlib.nodes.sequence.Sequence.run | ( | self | ) |
Runs the node -- This executes the task
def seqlib.nodes.sequence.Sequence.seq | ( | self | ) |
Retrieves the sequence list.
:meta private:
def seqlib.nodes.sequence.Sequence.seq | ( | self | ) |
Retrieves the sequence list.
:meta private:
def seqlib.nodes.sequence.Sequence.seq | ( | self, | |
s | |||
) |
def seqlib.nodes.sequence.Sequence.seq | ( | self, | |
s | |||
) |
def seqlib.nodes.sequence.Sequence.start | ( | self, | |
make_sequence = True , |
|||
resume = False |
|||
) |
This is the entry point for Sequence execution.
SeqTask
object that executes the sequenceException | Any exception received is re-raised and the sequence is aborted. |
def seqlib.nodes.sequence.Sequence.start | ( | self, | |
make_sequence = True , |
|||
resume = False |
|||
) |
This is the entry point for Sequence execution.
SeqTask
object that executes the sequenceException | Any exception received is re-raised and the sequence is aborted. |
def seqlib.nodes.sequence.Sequence.start_node | ( | self | ) |
Returns the start node.
If it does not exist, it creates it.
def seqlib.nodes.sequence.Sequence.start_node | ( | self | ) |
Returns the start node.
If it does not exist, it creates it.
def seqlib.nodes.sequence.Sequence.start_step | ( | self | ) |
Standard sequence's start step. Sets the sequence's state to RUNNING
def seqlib.nodes.sequence.Sequence.start_step | ( | self | ) |
Standard sequence's start step. Sets the sequence's state to RUNNING
def seqlib.nodes.sequence.Sequence.state | ( | self | ) |
def seqlib.nodes.sequence.Sequence.state | ( | self | ) |
def seqlib.nodes.sequence.Sequence.state | ( | self, | |
value | |||
) |
Sets the node state.
def seqlib.nodes.sequence.Sequence.state | ( | self, | |
value | |||
) |
Sets the node state.
|
static |
|
static |
seqlib.nodes.sequence.Sequence.exception |
|
static |
seqlib.nodes.sequence.Sequence.id |
seqlib.nodes.sequence.Sequence.in_error |
seqlib.nodes.sequence.Sequence.name |
|
static |
seqlib.nodes.sequence.Sequence.state |
node state
seqlib.nodes.sequence.Sequence.t_end |
seqlib.nodes.sequence.Sequence.t_start |