High Performance OPC UA Server SDK  1.7.1.383

Access for nodeclass method specific attributes. More...

Functions

SERVER_EXPORT int ua_method_set_index (ua_node_t node, unsigned int methodindex)
 Set the method index of a method node. More...
 
SERVER_EXPORT int ua_method_get_index (ua_node_t node, unsigned int *methodindex)
 Get the method index of a method node. More...
 
SERVER_EXPORT int ua_method_get_executable (ua_node_t node, bool *executable)
 Sets the executable bit on the given method. More...
 
SERVER_EXPORT int ua_method_set_executable (ua_node_t node, bool executable)
 Sets the executable bit on the given method. More...
 
SERVER_EXPORT int ua_method_get_methoddeclaration (ua_node_t node, ua_node_t *methoddecl)
 Returns the method declaration that was set using ua_method_set_methoddeclaration. More...
 
SERVER_EXPORT int ua_method_set_methoddeclaration (ua_node_t node, ua_node_t methoddecl)
 Sets the node handle of the method declaration. More...
 
SERVER_EXPORT int ua_method_copy (ua_node_t dst, ua_node_t src)
 Copy the attributes specific to nodelcass method from the node src to dst. More...
 

Detailed Description

Access for nodeclass method specific attributes.

Function Documentation

◆ ua_method_copy()

SERVER_EXPORT int ua_method_copy ( ua_node_t  dst,
ua_node_t  src 
)

Copy the attributes specific to nodelcass method from the node src to dst.

Also copies the method index and the method declaration.

Returns
Zero on success or errorcode on failure.

◆ ua_method_get_executable()

SERVER_EXPORT int ua_method_get_executable ( ua_node_t  node,
bool *  executable 
)

Sets the executable bit on the given method.

Parameters
nodeNode handle of method.
executablePointer to boolean variable where the executable status will be returned.
Returns
Zero on success, a negative error code on failure.

◆ ua_method_get_index()

SERVER_EXPORT int ua_method_get_index ( ua_node_t  node,
unsigned int *  methodindex 
)

Get the method index of a method node.

Parameters
nodeNode handle of method.
methodindexPointer to value where the method index is written to.
Returns
Zero on success, or errorcode on failure.

◆ ua_method_get_methoddeclaration()

SERVER_EXPORT int ua_method_get_methoddeclaration ( ua_node_t  node,
ua_node_t methoddecl 
)

Returns the method declaration that was set using ua_method_set_methoddeclaration.

Parameters
nodeNode handle of method.
methoddeclNode handle of according method at its type.
Returns
Zero on success, a negative error code on failure.
See also
ua_method_set_methoddeclaration

◆ ua_method_set_executable()

SERVER_EXPORT int ua_method_set_executable ( ua_node_t  node,
bool  executable 
)

Sets the executable bit on the given method.

Parameters
nodeNode handle of method.
executableBool variable containing the executable status.
Returns
Zero on success, a negative error code on failure.

◆ ua_method_set_index()

SERVER_EXPORT int ua_method_set_index ( ua_node_t  node,
unsigned int  methodindex 
)

Set the method index of a method node.

The method index can be used to store an index to a function implementing the method to be executed.

Parameters
nodeNode handle of method.
methodindexValue for the method index
Returns
Zero on success, or errorcode on failure.

◆ ua_method_set_methoddeclaration()

SERVER_EXPORT int ua_method_set_methoddeclaration ( ua_node_t  node,
ua_node_t  methoddecl 
)

Sets the node handle of the method declaration.

Objects have the same methods as defined in their type. By following the HasTypeDefinition reference you can find the ObjectType for each Object. In the same way the object's methods reference their methods at the ObjectType using the method declaration. This is useful for efficient method implementations. When calling a method at the object instance you can easily find the according method at the type and reuse the implementation that was registered at this type.

This attribute is used only for methods at instances and is usually UA_NODE_INVALID for the methods at types.

Note, that this information is also available in XML nodesets and in the binary file format. So if this attribute was defined in the XML nodeset and you used xml2bin to create a binary file, this information is available automatically when loading binary files using ua_addressspace_load_file_ext.

Parameters
nodeNode handle of method.
methoddeclReturns the method handle of the according method in the object type.
Returns
Zero on success, a negative error code on failure.
See also
ua_method_get_methoddeclaration