seq  4.0.0-pre3
Public Member Functions | Public Attributes | Static Public Attributes | Properties | List of all members
lib.nodes.action.Action Class Reference

Action ctor. More...

Inheritance diagram for lib.nodes.action.Action:
lib.nodes.interface._BaseNode lib.nodes.action.ActionInThread lib.nodes.action.EndNode lib.nodes.action.StartNode lib.nodes.checkbox.Checkbox lib.nodes.dialogs.Dialog lib.nodes.dialogs.BasicDialog

Public Member Functions

def __attrs_post_init__ (self)
 setup object. More...
 
def make_sequence (self, parent_tpl=None)
 Not much to do here. More...
 
def __call__ (self, resume=False)
 Executes node action. 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)
 
def resume (self)
 

Public Attributes

 name
 
 id
 
 description
 
 runtime_flags
 
 in_error
 
 t_start
 
 skip
 
 t_end
 
 result
 
 exception
 

Static Public Attributes

 f = attr.ib(default=None, repr=False)
 
 parent_tpl = attr.ib(default=None, repr=False)
 
 current_node = cv.ContextVar("current_node", 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)
 

Properties

 context = property
 Get context from the running Sequence. More...
 
 state = property
 
 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

Action ctor.

Action nodes executes coroutines in a Sequencer script.

Parameters
fThe coroutine the node will execute
idUnique id. If not provided an unique identifier is assigned.
nameNode name. If not provided a name is assigned.
Exceptions
TypeErroris f is not a coroutine.

Member Function Documentation

◆ __attrs_post_init__()

def lib.nodes.action.Action.__attrs_post_init__ (   self)

setup object.

Sets name, id and allows node to run.

Reimplemented in lib.nodes.dialogs.BasicDialog, and lib.nodes.checkbox.Checkbox.

◆ __call__()

def lib.nodes.action.Action.__call__ (   self,
  resume = False 
)

Executes node action.

   If the action is a coroutine a task is created and passed to
   the asyncio loop for execution.

Reimplemented in lib.nodes.dialogs.BasicDialog, lib.nodes.checkbox.Checkbox, and lib.nodes.action.ActionInThread.

◆ make_sequence()

def lib.nodes.action.Action.make_sequence (   self,
  parent_tpl = None 
)

Not much to do here.

Link back to Template object (if any) Get runtime flags from controller object.

Member Data Documentation

◆ current_node

lib.nodes.action.Action.current_node = cv.ContextVar("current_node", default=None)
static

◆ description

lib.nodes.action.Action.description

◆ exception

lib.nodes.action.Action.exception

◆ f

lib.nodes.action.Action.f = attr.ib(default=None, repr=False)
static

◆ id

lib.nodes.action.Action.id

◆ in_error

lib.nodes.action.Action.in_error

◆ name

lib.nodes.action.Action.name

◆ parent_tpl

lib.nodes.action.Action.parent_tpl = attr.ib(default=None, repr=False)
static

◆ result

lib.nodes.action.Action.result

◆ runtime_flags

lib.nodes.action.Action.runtime_flags

◆ skip

lib.nodes.action.Action.skip

◆ t_end

lib.nodes.action.Action.t_end

◆ t_start

lib.nodes.action.Action.t_start

Property Documentation

◆ context

lib.nodes.action.Action.context = property
static

Get context from the running Sequence.

◆ full_state

lib.nodes.action.Action.full_state = property
static

◆ state

lib.nodes.action.Action.state = property
static

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