module documentation

Utility functions for ua.Node.

Class PropertiesResult Results of get_unit_and_range().
Async Function get_child_without_ns Return the first child node with given display name while ignoring the namespace index.
Async Function get_children_browse_names Return a mapping from child nodes to qualified names.
Function get_node_id Return a (new) Node ID in the standard hierarchical format based on given parameters.
Async Function get_properties Retrieve the supported OPC UA properties of the given node.
Async Function get_type_definition Return the browse name of the OPC UA type definition of the given node.
Async Function read_unit Read the engineering unit from the given node.
Async Function read_value Read the value of the given node and transforms the NULL_NODE_ID into None.
Async Function write_range Write given range to given node.
Async Function write_unit Write given unit to given node.
Async Function write_value Write the given value to the given node. Will try to use existing variant type of the node.
Constant NULL_NODE_ID This node id indicates an invalid Node ID and should be treated as 'None'.
Async Function _write_value Undocumented
Constant _LOGGER Undocumented
async def get_child_without_ns(parent: Node, *, display_name: str) -> Node:

Return the first child node with given display name while ignoring the namespace index.

Raises
BadNoMatchIf no child with given display name exists.
async def get_children_browse_names(ua_node: Node) -> Mapping[Node, ua.QualifiedName]:

Return a mapping from child nodes to qualified names.

def get_node_id(ua_location: Node | ua.NodeId, *, name: QualifiedName | str, ns_idx: int | None = 1) -> ua.NodeId:

Return a (new) Node ID in the standard hierarchical format based on given parameters.

Parameters
ua_location:Node | ua.NodeIdOPC UA parent node in the hierarchy
name:QualifiedName | str(Browse)Name of the new Node ID.
ns_idx:int | None(optional) OPC UA namespace index, if None, the namespace index of the location node id will be used.
Returns
ua.NodeIdUndocumented
async def get_properties(node: Node, *, logger: structlog.stdlib.BoundLogger | None = None) -> PropertiesResult:

Retrieve the supported OPC UA properties of the given node.

async def get_type_definition(ua_node: Node, *, default: str = 'UNKNOWN') -> str:

Return the browse name of the OPC UA type definition of the given node.

Parameters
ua_node:NodeOPC UA node to operate on.
default:strDefault value to return if type definition cannot be determined.
Returns
strUndocumented
async def read_unit(ua_node: Node, *, engineering_unit: str = 'EngineeringUnits') -> ua.EUInformation:

Read the engineering unit from the given node.

async def read_value(node: Node) -> Any:

Read the value of the given node and transforms the NULL_NODE_ID into None.

async def write_range(node: Node, range_: tuple[float, float] | ua.Range):

Write given range to given node.

async def write_unit(ua_node: Node, unit: Unit | str | int | ua.EUInformation, *, engineering_unit: str = 'EngineeringUnits'):

Write given unit to given node.

async def write_value(node: Node, value: Any, *, variant_type: ua.VariantType | None = None):

Write the given value to the given node. Will try to use existing variant type of the node.

NULL_NODE_ID =

This node id indicates an invalid Node ID and should be treated as 'None'.

Value
ua.NodeId()
async def _write_value(node: Node, value: Any, *, variant_type: ua.VariantType):

Undocumented

_LOGGER =

Undocumented

Value
structlog.getLogger(__name__)