Represents an OPCUA method node. More...
Inherits BaseNode.
Public Member Functions | |
None | add_argument (self, str name, int in_out_type, int data_type, Union[str, int, float] default_value) |
Adds an argument to the method. More... | |
None | call (self) |
Starts execution of the method on the server. More... | |
None | create (int namespace_index, str name, cvb.opcua.NodeID parent_node_id) |
Creates an OPCUA method object. More... | |
None | deregister_callback (self, cvb.EventCookie event_cookie) |
Deregisters a callback. More... | |
List[cvb.opcua.MethodNodeArgument] | input_arguments (self) |
Returns all registered input arguments. More... | |
List[cvb.opcua.MethodNodeArgument] | output_arguments (self) |
Returns all registered output arguments. More... | |
cvb.EventCookie | register_read_callback (self, Callable[[Any], Any] callback) |
Registers a callback for the call/execute operations. More... | |
Public Member Functions inherited from BaseNode | |
List[cvb.opcua.NodeID] | browse (self, cvb.opcua.BrowseFilter filter_options) |
Enumerates the child nodes present in the OPCUA server. More... | |
Union[int, float, str] | get_attribute (self, int attribute_id) |
Gets specific information about this node. More... | |
cvb.opcua.NodeID | node_id (self) |
Gets the OPCUA node ID of this node. More... | |
None | set_attribute (self, int attribute_id, Union[int, float, str] value) |
Sets specific information about this node. More... | |
Additional Inherited Members | |
Properties inherited from BaseNode | |
access = property | |
int: Gets access rights to this node (see cvb.opcua.Access). | |
browse_name = property | |
str: Gets the browse name of this node. | |
connection_status = property | |
int: Gets connection status of this node (see cvb.opcua.ConnectionStatus). | |
description = property | |
str: Gets description of this node. | |
display_name = property | |
str: Gets the human-readable name of this node. | |
node_class = property | |
int: Gets OPCUA node class of this node (see cvb.opcua.NodeClass). | |
Represents an OPCUA method node.
It provides an interface for calling functions/methods on the OPCUA server. It may have input and output arguments. A typical usage consists of the following steps:
None add_argument | ( | self, | |
str | name, | ||
int | in_out_type, | ||
int | data_type, | ||
Union[str, int, float] | default_value | ||
) |
Adds an argument to the method.
name : str Name of the argument.
in_out_type : int The argument an output/input argument.
data_type : int Data format of the argument.
default_value : Union[str, int, float] Default of the argument.
None call | ( | self | ) |
Starts execution of the method on the server.
See class description for details.
None create | ( | int | namespace_index, |
str | name, | ||
cvb.opcua.NodeID | parent_node_id | ||
) |
Creates an OPCUA method object.
namespace_index : int String literal for a non-localized, human-readable name of an OPCUA node.
name : str String literal for non-localized, human-readable name of the OPCUA node.
parent_node_id : cvb.opcua.NodeID OPCUA node ID of the parent to which the OPCUA node to be created belongs.
None deregister_callback | ( | self, | |
cvb.EventCookie | event_cookie | ||
) |
Deregisters a callback.
The usage of lambdas for data access is highly recommended. Note: The callback MUST be deregistered, otherwise internal object handles will not be closed.
event_cookie : cvb.EventCookie Event cookie, obtained from registering the listener.
List[cvb.opcua.MethodNodeArgument] input_arguments | ( | self | ) |
Returns all registered input arguments.
See class description for details.
List[cvb.opcua.MethodNodeArgument] All registered input arguments.
List[cvb.opcua.MethodNodeArgument] output_arguments | ( | self | ) |
Returns all registered output arguments.
See class description for details.
List[cvb.opcua.MethodNodeArgument] All registered output arguments.
cvb.EventCookie register_read_callback | ( | self, | |
Callable[[Any], Any] | callback | ||
) |
Registers a callback for the call/execute operations.
The usage of lambdas for data access is highly recommended. Note: The callback MUST be deregistered, otherwise internal object handles will not be closed.
callback : Callable[[Any], Any] A callable as a callback to be registered.
cvb.EventCookie Cookie for unregistering the callback.