1// Copyright (C) 2017 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 QOPEN62541NODE_H
5#define QOPEN62541NODE_H
6
7#ifdef USE_SYSTEM_OPEN62541
8#include <open62541/types.h>
9#else
10#include "qopen62541.h"
11#endif
12
13#include "qopen62541client.h"
14#include <private/qopcuanodeimpl_p.h>
15
16#include <QPointer>
17
18QT_BEGIN_NAMESPACE
19
20class QOpen62541Node : public QOpcUaNodeImpl
21{
22public:
23 explicit QOpen62541Node(const UA_NodeId nodeId, QOpen62541Client *client, const QString nodeIdString);
24 ~QOpen62541Node() override;
25
26 bool readAttributes(QOpcUa::NodeAttributes attr, const QString &indexRange) override;
27 bool enableMonitoring(QOpcUa::NodeAttributes attr, const QOpcUaMonitoringParameters &settings) override;
28 bool disableMonitoring(QOpcUa::NodeAttributes attr) override;
29 bool modifyMonitoring(QOpcUa::NodeAttribute attr, QOpcUaMonitoringParameters::Parameter item, const QVariant &value) override;
30 bool browse(const QOpcUaBrowseRequest &request) override;
31 QString nodeId() const override;
32
33 bool writeAttribute(QOpcUa::NodeAttribute attribute, const QVariant &value, QOpcUa::Types type, const QString &indexRange) override;
34 bool writeAttributes(const QOpcUaNode::AttributeMap &toWrite, QOpcUa::Types valueAttributeType) override;
35 bool callMethod(const QString &methodNodeId, const QList<QOpcUa::TypedVariant> &args) override;
36
37 QOpcUaHistoryReadResponse *readHistoryRaw(const QDateTime &startTime, const QDateTime &endTime, quint32 numValues, bool returnBounds,
38 QOpcUa::TimestampsToReturn timestampsToReturn) override;
39
40 QOpcUaHistoryReadResponse *readHistoryEvents(const QDateTime &startTime, const QDateTime &endTime,
41 const QOpcUaMonitoringParameters::EventFilter &filter, quint32 numValues) override;
42
43 bool resolveBrowsePath(const QList<QOpcUaRelativePathElement> &path) override;
44
45private:
46 QPointer<QOpen62541Client> m_client;
47 QString m_nodeIdString;
48 UA_NodeId m_nodeId;
49};
50
51QT_END_NAMESPACE
52
53#endif // QOPEN62541NODE_H
54

source code of qtopcua/src/plugins/opcua/open62541/qopen62541node.h