Node QML 类型

Represents a node on a server. 更多...

导入语句: import QtOpcUa
Since: QtOpcUa 5.12
继承者: MethodNode and ValueNode

特性

方法

详细描述

import QtOpcUa 5.13 as QtOpcUa
QtOpcUa.Node {
    nodeId : QtOpcUa.NodeId {
        identifier: "s=Example.Method"
        ns: "Example Namespace"
    }
    connection: myConnection
}
					

特性文档编制

Status : enumeration

Status of a node.

常量 描述
Node.Status.Valid Node is ready for use
Node.Status.InvalidNodeId Node id is invalid
Node.Status.NoConnection Not connected to a server
Node.Status.InvalidNodeType Node type on the server does not match the QML type
Node.Status.InvalidClient Invalid connection client
Node.Status.FailedToResolveNode Failed to resolve node
Node.Status.InvalidObjectNode The object node is invalid or its type does not match the expected type
Node.Status.FailedToReadAttributes Failed to read attributes
Node.Status.FailedToSetupMonitoring Failed to setup monitoring

另请参阅 status and errorMessage .

browseName : string

The browse name of the node. In case the information is not available an empty string is returned.

connection : Connection

The connection to be used for node instances. The node will automatically be accessible when the associated connection has established a connection to a server.

If this property is not set, the default connection will be used, if any.

另请参阅 Connection and Connection::defaultConnection .

description : LocalizedText

The description of the node. In case the information is not available a default constructed LocalizedText 被返回。

displayName : LocalizedText

The localized text of the node. In case the information is not available a default constructed LocalizedText 被返回。

[read-only] errorMessage : string

A string representation of the current status code.

另请参阅 status and Status .

[since 5.13] eventFilter : EventFilter

An event filter allows monitoring events on the server for certain conditions.

该特性在 Qt 5.13 引入。

另请参阅 EventFilter .

[read-only] nodeClass : QOpcUa::NodeClass

The node class of the node. In case the information is not available QtOpcUa.Constants.NodeClass.Undefined 被返回。

nodeId : NodeId

ID of the node on the server to be used. This can be an absolute node ID or a relative node ID.

另请参阅 NodeId and RelativeNodeId .

[read-only] readyToUse : bool

This property returns whether the node is ready to use. This happens once after a successful connection to a server was established and the node was successfully set up.

[read-only] status : Status

Current status of the node. The node is only usable when the status is Valid . In any other case it indicates an error.

另请参阅 errorMessage and Status .


方法文档编制

Date getServerTimestamp ( Constants::NodeAttribute attribute )

Returns the server timestamp of the given attribute .

Date getSourceTimestamp ( QOpcUa::NodeAttribute attribute )

Returns the source timestamp of the given attribute .