Functions | |
def | _get_node_supertypes |
def | data_type_to_variant_type |
def | get_base_data_type |
def | get_node_children |
def | get_node_subtypes |
def | get_node_supertype |
def | get_node_supertypes |
def | get_nodes_of_namespace |
def | is_child_present |
def | string_to_val |
def | string_to_variant |
def | val_to_string |
def | variant_to_string |
Usefull method and classes not belonging anywhere and depending on opcua library
def opcua.common.ua_utils._get_node_supertypes | ( | node | ) | [private] |
recursive implementation of get_node_derived_from_types
Definition at line 155 of file ua_utils.py.
def opcua.common.ua_utils.data_type_to_variant_type | ( | dtype_node | ) |
Given a Node datatype, find out the variant type to encode data. This is not exactly straightforward...
Definition at line 196 of file ua_utils.py.
def opcua.common.ua_utils.get_base_data_type | ( | datatype | ) |
Looks up the base datatype of the provided datatype Node The base datatype is either: A primitive type (ns=0, i<=21) or a complex one (ns=0 i>21 and i<=30) like Enum and Struct. Args: datatype: NodeId of a datype of a variable Returns: NodeId of datatype base or None in case base datype can not be determined
Definition at line 217 of file ua_utils.py.
def opcua.common.ua_utils.get_node_children | ( | node, | |
nodes = None |
|||
) |
Get recursively all children of a node
Definition at line 116 of file ua_utils.py.
def opcua.common.ua_utils.get_node_subtypes | ( | node, | |
nodes = None |
|||
) |
Definition at line 128 of file ua_utils.py.
def opcua.common.ua_utils.get_node_supertype | ( | node | ) |
return node supertype or None
Definition at line 168 of file ua_utils.py.
def opcua.common.ua_utils.get_node_supertypes | ( | node, | |
includeitself = False , |
|||
skipbase = True |
|||
) |
return get all subtype parents of node recursive :param node: can be a ua.Node or ua.NodeId :param includeitself: include also node to the list :param skipbase don't include the toplevel one :returns list of ua.Node, top parent first
Definition at line 137 of file ua_utils.py.
def opcua.common.ua_utils.get_nodes_of_namespace | ( | server, | |
namespaces = None |
|||
) |
Get the nodes of one or more namespaces . Args: server: opc ua server to use namespaces: list of string uri or int indexes of the namespace to export Returns: List of nodes that are part of the provided namespaces
Definition at line 236 of file ua_utils.py.
def opcua.common.ua_utils.is_child_present | ( | node, | |
browsename | |||
) |
return if a browsename is present a child from the provide node :param node: node wherein to find the browsename :param browsename: browsename to search :returns returne True if the browsename is present else False
Definition at line 181 of file ua_utils.py.
def opcua.common.ua_utils.string_to_val | ( | string, | |
vtype | |||
) |
Convert back a string to a python or python-opcua object Note: no error checking is done here, supplying null strings could raise exceptions (datetime and guid)
Definition at line 59 of file ua_utils.py.
def opcua.common.ua_utils.string_to_variant | ( | string, | |
vtype | |||
) |
convert back a string to an ua.Variant
Definition at line 109 of file ua_utils.py.
def opcua.common.ua_utils.val_to_string | ( | val | ) |
convert a python object or python-opcua object to a string which should be easy to understand for human easy to modify, and not too hard to parse back ....not easy meant for UI or command lines
Definition at line 14 of file ua_utils.py.
def opcua.common.ua_utils.variant_to_string | ( | var | ) |
convert a variant to a string which should be easy to understand for human easy to modify, and not too hard to parse back ....not easy meant for UI or command lines
Definition at line 50 of file ua_utils.py.