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