이 페이지에서

QOpcUaReadResult Class

이 클래스는 읽기 작업의 결과를 저장합니다. 더 보기...

헤더: #include <QOpcUaReadResult>
CMake: find_package(Qt6 REQUIRED COMPONENTS OpcUa)
target_link_libraries(mytarget PRIVATE Qt6::OpcUa)
qmake: QT += opcua

공개 함수

QOpcUaReadResult()
QOpcUaReadResult(const QOpcUaReadResult &other)
QOpcUa::NodeAttribute attribute() const
QString indexRange() const
QString nodeId() const
QDateTime serverTimestamp() const
void setAttribute(QOpcUa::NodeAttribute attribute)
void setIndexRange(const QString &indexRange)
void setNodeId(const QString &nodeId)
void setServerTimestamp(const QDateTime &serverTimestamp)
void setSourceTimestamp(const QDateTime &sourceTimestamp)
void setStatusCode(QOpcUa::UaStatusCode statusCode)
void setValue(const QVariant &value)
QDateTime sourceTimestamp() const
QOpcUa::UaStatusCode statusCode() const
QVariant value() const
QOpcUaReadResult &operator=(const QOpcUaReadResult &rhs)

상세 설명

OPC UA 서버에 대한 읽기 작업은 소스에서 값이 생성된 시점과 서버가 해당 값을 수신한 시점을 나타내는 값과 타임스탬프를 반환합니다. 또한 값을 읽을 수 있었는지, 읽을 수 없었다면 읽기가 실패한 이유를 나타내는 상태 코드도 반환합니다.

서버가 반환한 데이터 외에도, 이 클래스에는 클라이언트가 결과를 요청과 매칭할 수 있도록 요청의 노드 ID, 속성 및 인덱스 범위가 포함되어 있습니다.

이 클래스의 객체는 ` QOpcUaClient::readNodeAttributesFinished()` 신호를 통해 반환되며, ` QOpcUaClient::readNodeAttributes()` 요청의 일부였던 읽기 작업의 결과를 포함합니다.

QOpcUaClient::readNodeAttributes(), QOpcUaClient::readNodeAttributesFinished() 및 QOpcUaReadItem도 참조하십시오 .

멤버 함수 문서

QOpcUaReadResult::QOpcUaReadResult()

default는 매개변수가 설정되지 않은 읽기 결과를 생성합니다.

QOpcUaReadResult::QOpcUaReadResult(const QOpcUaReadResult &other)

other 에서 읽기 결과를 생성합니다.

QOpcUa::NodeAttribute QOpcUaReadResult::attribute() const

속성 ID를 반환합니다.

setAttribute()도 참조하십시오 .

QString QOpcUaReadResult::indexRange() const

인덱스 범위를 반환합니다.

setIndexRange()도 참조하십시오 .

QString QOpcUaReadResult::nodeId() const

노드 ID를 반환합니다.

setNodeId()도 참조하십시오 .

QDateTime QOpcUaReadResult::serverTimestamp() const

value()에 대한 서버 타임스탬프를 반환합니다.

setServerTimestamp()도 참조하십시오 .

void QOpcUaReadResult::setAttribute(QOpcUa::NodeAttribute attribute)

속성 id를 attribute 로 설정합니다.

attribute()도 참조하십시오 .

void QOpcUaReadResult::setIndexRange(const QString &indexRange)

인덱스 범위를 indexRange 로 설정합니다.

indexRange()도 참조하십시오 .

void QOpcUaReadResult::setNodeId(const QString &nodeId)

노드 ID를 nodeId 로 설정합니다.

nodeId()도 참조하십시오 .

void QOpcUaReadResult::setServerTimestamp(const QDateTime &serverTimestamp)

서버 타임스탬프를 serverTimestamp 로 설정합니다.

serverTimestamp()도 참조하십시오 .

void QOpcUaReadResult::setSourceTimestamp(const QDateTime &sourceTimestamp)

소스 타임스탬프를 sourceTimestamp 로 설정합니다.

sourceTimestamp()도 참조하십시오 .

void QOpcUaReadResult::setStatusCode(QOpcUa::UaStatusCode statusCode)

상태 코드를 ` statusCode`로 설정합니다.

statusCode()도 참조하십시오 .

void QOpcUaReadResult::setValue(const QVariant &value)

값을 value 로 설정합니다.

value()도 참조하십시오 .

QDateTime QOpcUaReadResult::sourceTimestamp() const

value()의 소스 타임스탬프를 반환합니다.

setSourceTimestamp()도 참조하십시오 .

QOpcUa::UaStatusCode QOpcUaReadResult::statusCode() const

이 요소의 상태 코드를 반환합니다. 상태 코드가 ` Good`가 아닌 경우, 값과 타임스탬프는 유효하지 않습니다.

setStatusCode()도 참조하십시오 .

QVariant QOpcUaReadResult::value() const

값을 반환합니다.

setValue()도 참조하십시오 .

QOpcUaReadResult &QOpcUaReadResult::operator=(const QOpcUaReadResult &rhs)

이 읽기 결과에 rhs 의 값을 설정합니다.

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.