seq  4.0.0-pre3
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
lib.nodes.template.Template Class Reference

The Template node. More...

Inheritance diagram for lib.nodes.template.Template:
lib.nodes.sequence.Sequence lib.nodes.interface._BaseNode

Public Member Functions

def __attrs_post_init__ (self)
 Assigns node's name and id. More...
 
def execute (self, resume=False, propagate=False)
 Executes this just creates the asyncio task. More...
 
def make_sequence (self, parent_tpl=None)
 Builds this sequence execution graph. More...
 
- Public Member Functions inherited from lib.nodes.sequence.Sequence
def __iter__ (self)
 
def start_step (self)
 Standard sequence's start step. More...
 
def end_step (self)
 Standard sequence's end step. More...
 
def append (self, s)
 Appends a node to the Sequence. More...
 
def create_node_tasks (self, resume=False)
 Creates Task object associated to this node. More...
 
def reschedule_node (self, node_id)
 Reschedule a node for execution. More...
 
def start (self, make_sequence=True, resume=False)
 This is the entry point for Sequence execution. More...
 
def run (self)
 Runs the node – This executes the task. More...
 
def resume (self)
 Resume node execution. More...
 
def main_task (self)
 Returns the objective node of the sequence – the end node. More...
 
def __call__ (self, resume=False)
 
def abort (self)
 Aborts the sequence. More...
 
def nodes (self)
 Return nodes from Graph. More...
 
def get_node (self, node_id)
 Get node by id. More...
 
def get_task (self, node_id)
 Get task by node_id. More...
 
def par (self, k)
 Get a parameter value. More...
 
def set (self, p)
 Sets the value of a parameter. More...
 
- Public Member Functions inherited from lib.nodes.interface._BaseNode
def make_sequence (self)
 does nothing More...
 
def make_task (self, node, input_list, resume)
 Creates the task object that executes the node. More...
 
def pause (self)
 

Static Public Member Functions

def from_dict (d)
 Creates a Template from keywords in dictionary. More...
 
def create (d, *args, **kw)
 Creates a :class:Template node. More...
 
- Static Public Member Functions inherited from lib.nodes.sequence.Sequence
def get_context ()
 
def create (*args, **kw)
 Sequence node constructor. More...
 

Static Public Attributes

 tpl_name = attr.ib(default=None)
 
 params = attr.ib(default=attr.Factory(list), repr=False)
 
 content = attr.ib(default=attr.Factory(dict), repr=False)
 
 mod = attr.ib(default=None, repr=False, init=False)
 
 P = cv.ContextVar("P", default={})
 
 current_tpl = cv.ContextVar("current_tpl", default=None)
 
- Static Public Attributes inherited from lib.nodes.sequence.Sequence
 graph = attr.ib(init=False, default=attr.Factory(nx.DiGraph), repr=False)
 
 debug = attr.ib(init=False, default=False, repr=False)
 
 current_seq = cv.ContextVar("current_seq", default=None)
 
 root = cv.ContextVar("root", default=None)
 
- Static Public Attributes inherited from lib.nodes.interface._BaseNode
 id = attr.ib(default=None, kw_only=True)
 
 name = attr.ib(default=None, kw_only=True)
 
 runtime_flags = attr.ib(default=0, kw_only=True)
 
 deps = attr.ib(default=attr.Factory(list), repr=False, kw_only=True, init=False)
 
 description = attr.ib(default="", kw_only=True)
 
 exception = attr.ib(init=False, default=None, repr=False)
 
 can_skip = attr.ib(default=True, init=False)
 
 hide = attr.ib(default=False, init=False)
 
 t_start = attr.ib(init=False, default=None, repr=False)
 
 t_end = attr.ib(init=False, default=None, repr=False)
 
 running_checkpoint
 
 serial_number = attr.ib(init=False)
 

Additional Inherited Members

- Public Attributes inherited from lib.nodes.sequence.Sequence
 name
 
 id
 
 in_error
 
 runtime_flags
 
 t_start
 
 skip
 
 exception
 
 t_end
 
- Properties inherited from lib.nodes.sequence.Sequence
 context = property
 Get context dictionary, preferably from root node. More...
 
 seq = property
 Retrieves the sequence list. More...
 
 G = property
 returns the graph object More...
 
 start_node = property
 Returns the start node. More...
 
 end_node = property
 Returns the end node. More...
 
 parameters = property
 Return parameters. More...
 
 state = property
 node state More...
 
 full_state = property
 
- Properties inherited from lib.nodes.interface._BaseNode
 result = property
 Node's result. More...
 
 end_node = property
 
 start_node = property
 
 state = property
 Gets the node state. More...
 
 full_state = property
 Gets the node state. More...
 
 in_error = property
 
 skip = property
 

Detailed Description

The Template node.

   A :class:`Template` is just a :class:`Sequence` node with access to a set
   of variables as defined in an :class:`ObservingBlock`.

   The :class:`ObservingBlock` takes care of instantiating the :class:`Template`
   objects as needed by the Observation Block.

   Table 1
   Context Variables
   -----------------------------------------------------
   Name        |  Desc
   -           | -
   current_tpl | The current Template being executed
   -           | -

.. warning:: Objects of type :class:Template should not be directly constructed. Leave that for the :class:ObservingBlock.

Member Function Documentation

◆ __attrs_post_init__()

def lib.nodes.template.Template.__attrs_post_init__ (   self)

Assigns node's name and id.

Reimplemented from lib.nodes.sequence.Sequence.

◆ create()

def lib.nodes.template.Template.create (   d,
args,
**  kw 
)
static

Creates a :class:Template node.

         *args: Variable length list of nodes or coroutines that composes the sequence.
Parameters
idNode id.
namenode name.

◆ execute()

def lib.nodes.template.Template.execute (   self,
  resume = False,
  propagate = False 
)

Executes this just creates the asyncio task.

Reimplemented from lib.nodes.sequence.Sequence.

◆ from_dict()

def lib.nodes.template.Template.from_dict (   d)
static

Creates a Template from keywords in dictionary.

◆ make_sequence()

def lib.nodes.template.Template.make_sequence (   self,
  parent_tpl = None 
)

Builds this sequence execution graph.

Joins the Sequence's nodes together.

Reimplemented from lib.nodes.sequence.Sequence.

Member Data Documentation

◆ content

lib.nodes.template.Template.content = attr.ib(default=attr.Factory(dict), repr=False)
static

◆ current_tpl

lib.nodes.template.Template.current_tpl = cv.ContextVar("current_tpl", default=None)
static

◆ mod

lib.nodes.template.Template.mod = attr.ib(default=None, repr=False, init=False)
static

◆ P

lib.nodes.template.Template.P = cv.ContextVar("P", default={})
static

◆ params

lib.nodes.template.Template.params = attr.ib(default=attr.Factory(list), repr=False)
static

◆ tpl_name

lib.nodes.template.Template.tpl_name = attr.ib(default=None)
static

The documentation for this class was generated from the following file: