QOpcUaWriteItem Class

이 클래스는 쓰기 작업에 대한 옵션을 저장합니다. 더 보기...

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

공용 함수

QOpcUaWriteItem()
QOpcUaWriteItem(const QString &nodeId, QOpcUa::NodeAttribute attribute, const QVariant &value, QOpcUa::Types type = QOpcUa::Types::Undefined, const QString &indexRange = QString())
QOpcUaWriteItem(const QOpcUaWriteItem &other)
QOpcUa::NodeAttribute attribute() const
bool hasStatusCode() 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 setType(QOpcUa::Types type)
void setValue(const QVariant &value)
void setValue(const QVariant &value, QOpcUa::Types type)
QDateTime sourceTimestamp() const
QOpcUa::UaStatusCode statusCode() const
QOpcUa::Types type() const
QVariant value() const
QOpcUaWriteItem &operator=(const QOpcUaWriteItem &rhs)

상세 설명

OPC UA 서버에서 쓰기 작업은 서버에 있는 노드의 속성 값의 전체 값 또는 특정 인덱스 범위를 덮어씁니다. 이 클래스에는 백엔드에서 서버에 쓰기 요청을 하는 데 필요한 정보가 포함되어 있습니다.

이 클래스의 하나 또는 여러 개 객체가 QOpcUaClient::writeNodeAttributes() 작업의 요청을 구성합니다.

QOpcUaClient::writeNodeAttributes() 및 QOpcUaWriteResult참조하세요 .

멤버 함수 문서

QOpcUaWriteItem::QOpcUaWriteItem()

기본값은 매개변수가 설정되지 않은 쓰기 항목을 구성합니다.

QOpcUaWriteItem::QOpcUaWriteItem(const QString &nodeId, QOpcUa::NodeAttribute attribute, const QVariant &value, QOpcUa::Types type = QOpcUa::Types::Undefined, const QString &indexRange = QString())

노드 nodeId 에서 attribute 속성에 대한 쓰기 항목을 생성합니다. type 타입의 값 valueattribute 의 위치 indexRange 에 기록됩니다.

QOpcUaWriteItem::QOpcUaWriteItem(const QOpcUaWriteItem &other)

other 에서 새 쓰기 항목을 만듭니다.

QOpcUa::NodeAttribute QOpcUaWriteItem::attribute() const

쓰기 항목의 속성을 반환합니다.

setAttribute()도 참조하세요 .

bool QOpcUaWriteItem::hasStatusCode() const

쓸 값의 상태 코드가 설정된 경우 true를 반환합니다.

QString QOpcUaWriteItem::indexRange() const

쓰기 항목의 인덱스 범위를 반환합니다.

setIndexRange()도 참조하세요 .

QString QOpcUaWriteItem::nodeId() const

쓰기 항목의 노드 ID를 반환합니다.

setNodeId()도 참조하세요 .

QDateTime QOpcUaWriteItem::serverTimestamp() const

쓸 값의 서버 타임스탬프를 반환합니다.

setServerTimestamp()도 참조하세요 .

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

쓰기 항목의 속성을 attribute 로 설정합니다.

attribute()도 참조하세요 .

void QOpcUaWriteItem::setIndexRange(const QString &indexRange)

쓰기 항목의 인덱스 범위를 indexRange 로 설정합니다.

indexRange()도 참조하세요 .

void QOpcUaWriteItem::setNodeId(const QString &nodeId)

쓰기 항목의 노드 ID를 nodeId 로 설정합니다.

nodeId()도 참조하세요 .

void QOpcUaWriteItem::setServerTimestamp(const QDateTime &serverTimestamp)

serverTimestamp 에 쓸 값의 서버 타임스탬프를 설정합니다. 서버 타임스탬프가 유효하지 않으면 클라이언트에서 무시되고 서버로 전송되지 않습니다. 서버가 타임스탬프 쓰기를 지원하지 않는 경우 이 항목에 대한 쓰기 작업은 상태 코드 BadWriteNotSupported 와 함께 실패합니다.

serverTimestamp()도 참조하세요 .

void QOpcUaWriteItem::setSourceTimestamp(const QDateTime &sourceTimestamp)

sourceTimestamp 에 쓸 값의 소스 타임스탬프를 설정합니다. 소스 타임스탬프가 유효하지 않으면 클라이언트에서 무시되고 서버로 전송되지 않습니다. 서버가 타임스탬프 쓰기를 지원하지 않는 경우 이 항목에 대한 쓰기 작업은 상태 코드 BadWriteNotSupported 와 함께 실패합니다.

sourceTimestamp()도 참조하세요 .

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

statusCode 에 쓸 값의 상태 코드를 설정합니다. 상태 코드를 설정하지 않으면 서버로 상태 코드가 전송되지 않습니다.

statusCode()도 참조하세요 .

void QOpcUaWriteItem::setType(QOpcUa::Types type)

쓰기 항목 값의 유형을 type 로 설정합니다.

type()도 참조하세요 .

void QOpcUaWriteItem::setValue(const QVariant &value)

쓰기 항목의 값을 value 로 설정합니다. 이 값을 지정하면 setType()의 유형 정보가 값을 SDK 특정 데이터 유형으로 변환하는 데 사용됩니다.

value() 및 setType()도 참조하세요 .

void QOpcUaWriteItem::setValue(const QVariant &value, QOpcUa::Types type)

쓰기 항목의 값을

상수설명
and값의 유형을 type 로 설정합니다.

QDateTime QOpcUaWriteItem::sourceTimestamp() const

쓸 값의 소스 타임스탬프를 반환합니다.

setSourceTimestamp()도 참조하세요 .

QOpcUa::UaStatusCode QOpcUaWriteItem::statusCode() const

쓸 값의 상태 코드를 반환합니다.

setStatusCode()도 참조하세요 .

QOpcUa::Types QOpcUaWriteItem::type() const

쓰기 항목의 값 유형을 반환합니다.

setType()도 참조하세요 .

QVariant QOpcUaWriteItem::value() const

쓰기 항목의 값을 반환합니다.

setValue()도 참조하세요 .

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

이 쓰기 항목에서 rhs 의 값을 설정합니다.

© 2025 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.