Skip to content

Latest commit

 

History

History
150 lines (92 loc) · 3.46 KB

OpcUaClientMethodNode.rst

File metadata and controls

150 lines (92 loc) · 3.46 KB

OpcUaClientMethodNode

Description

Please refer to the Qt OPC UA MethodNode QML type documentation.

Overview

Properties

Methods

Properties

single: inputArguments

inputArguments

Please refer to the Qt OPC UA MethodNode QML type documentation.

› Attributes

Readonly

single: objectNodeId

objectNodeId

Please refer to the Qt OPC UA MethodNode QML type documentation.

› Attributes

Writable

single: outputArguments

outputArguments

Please refer to the Qt OPC UA MethodNode QML type documentation.

› Attributes

Readonly

single: resultStatus

resultStatus

Please refer to the Qt OPC UA MethodNode QML type documentation.

› Attributes

Readonly

Methods

single: callMethod

callMethod()

Please refer to the Qt OPC UA MethodNode QML type documentation.

Example

import InCore.Foundation 2.5
import InCore.OpcUa 2.5

Application {
    OpcUaClient {
        OpcUaClientConnection {
            // ...
        }

        OpcUaClientMethodNode {
            id: pingMethod
            nodeId: OpcUaClientNodeId { identifier: "s=Machine.Ping"; ns: "Example Namespace" }
            objectNodeId: OpcUaClientNodeId { identifier: "s=Machine"; ns: "Example Namespace" }

            inputArguments: [
                OpcUaClientMethodArgument {
                    value: 123.456
                    type: OpcUaType.Double
                },
                OpcUaClientMethodArgument {
                    value: "Hello world"
                    type: OpcUaType.String
                }
            ]
            onOutputArgumentsChanged: console.log("Method returned", JSON.stringify(outputArguments))
        }
    }

    Timer {
        onTriggered: pingMethod.callMethod()
    }
}