1// Copyright (C) 2019 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef OPCUAREADRESULT_P_H
5#define OPCUAREADRESULT_P_H
6
7#include <private/opcuastatus_p.h>
8
9#include <QtOpcUa/qopcuatype.h>
10#include <QObject>
11#include <QDateTime>
12
13//
14// W A R N I N G
15// -------------
16//
17// This file is not part of the Qt API. It exists purely as an
18// implementation detail. This header file may change from version to
19// version without notice, or even be removed.
20//
21// We mean it.
22//
23
24QT_BEGIN_NAMESPACE
25
26class QOpcUaReadResult;
27class QOpcUaClient;
28class OpcUaReadResultData;
29class OpcUaReadResult
30{
31 Q_GADGET
32 Q_PROPERTY(QOpcUa::NodeAttribute attribute READ attribute)
33 Q_PROPERTY(QString indexRange READ indexRange)
34 Q_PROPERTY(QString nodeId READ nodeId)
35 Q_PROPERTY(QString namespaceName READ namespaceName)
36 Q_PROPERTY(const QDateTime &serverTimestamp READ serverTimestamp)
37 Q_PROPERTY(const QDateTime &sourceTimestamp READ sourceTimestamp)
38 Q_PROPERTY(QVariant value READ value)
39 Q_PROPERTY(OpcUaStatus status READ status)
40
41public:
42 OpcUaReadResult();
43 OpcUaReadResult(const OpcUaReadResult &other);
44 OpcUaReadResult(const QOpcUaReadResult &other, const QOpcUaClient *client);
45 OpcUaReadResult &operator=(const OpcUaReadResult &rhs);
46 ~OpcUaReadResult();
47
48 const QString &indexRange() const;
49 const QString &nodeId() const;
50 QOpcUa::NodeAttribute attribute() const;
51 const QString &namespaceName() const;
52 const QDateTime &serverTimestamp() const;
53 const QDateTime &sourceTimestamp() const;
54 const QVariant &value() const;
55
56 OpcUaStatus status() const;
57
58private:
59 QSharedDataPointer<OpcUaReadResultData> data;
60};
61
62
63QT_END_NAMESPACE
64
65Q_DECLARE_METATYPE(OpcUaReadResult)
66
67#endif // OPCUAREADRESULT_P_H
68

source code of qtopcua/src/declarative_opcua/opcuareadresult_p.h