| 1 | // Copyright (C) 2017 basysKom GmbH, opensource@basyskom.com | 
| 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 QOPCUAMONITORINGPARAMETERS_P_H | 
| 5 | #define QOPCUAMONITORINGPARAMETERS_P_H | 
| 6 |  | 
| 7 | // | 
| 8 | //  W A R N I N G | 
| 9 | //  ------------- | 
| 10 | // | 
| 11 | // This file is not part of the Qt API.  It exists purely as an | 
| 12 | // implementation detail.  This header file may change from version to | 
| 13 | // version without notice, or even be removed. | 
| 14 | // | 
| 15 | // We mean it. | 
| 16 | // | 
| 17 |  | 
| 18 | #include <QtOpcUa/qopcuamonitoringparameters.h> | 
| 19 |  | 
| 20 | #include <QtCore/qshareddata.h> | 
| 21 | #include <QtCore/private/qglobal_p.h> | 
| 22 |  | 
| 23 | QT_BEGIN_NAMESPACE | 
| 24 |  | 
| 25 | class Q_OPCUA_EXPORT QOpcUaMonitoringParametersPrivate : public QSharedData | 
| 26 | { | 
| 27 | public: | 
| 28 |  | 
| 29 |     QOpcUaMonitoringParametersPrivate() | 
| 30 |         : samplingInterval(0) | 
| 31 |         , queueSize(0) | 
| 32 |         , discardOldest(true) | 
| 33 |         , monitoringMode(QOpcUaMonitoringParameters::MonitoringMode::Reporting) | 
| 34 |         , subscriptionId(0) | 
| 35 |         , monitoredItemId(0) | 
| 36 |         , publishingInterval(0) | 
| 37 |         , lifetimeCount(150) // Must be at least three times the maxKeepAliveCount (OPC UA 1.05 part 4, page 5.13.2.2). | 
| 38 |         , maxKeepAliveCount(50) // Allow 50 publishing intervals before a keepalive is expected to reduce the network traffic. | 
| 39 |         , maxNotificationsPerPublish(0) | 
| 40 |         , priority(0) | 
| 41 |         , publishingEnabled(true) | 
| 42 |         , statusCode(QOpcUa::UaStatusCode::BadNoEntryExists) | 
| 43 |         , shared(QOpcUaMonitoringParameters::SubscriptionType::Shared) | 
| 44 |     {} | 
| 45 |  | 
| 46 |     // MonitoredItem | 
| 47 |     double samplingInterval; | 
| 48 |     QVariant filter; | 
| 49 |     QVariant filterResult; | 
| 50 |     quint32 queueSize; | 
| 51 |     bool discardOldest; | 
| 52 |     QOpcUaMonitoringParameters::MonitoringMode monitoringMode; | 
| 53 |     QString indexRange; | 
| 54 |     QSet<quint32> triggeredItemIds; | 
| 55 |     QHash<quint32, QOpcUa::UaStatusCode> addTriggeredItemStatus; | 
| 56 |  | 
| 57 |     // Subscription | 
| 58 |     quint32 subscriptionId; | 
| 59 |     quint32 monitoredItemId; | 
| 60 |     double publishingInterval; | 
| 61 |     quint32 lifetimeCount; | 
| 62 |     quint32 maxKeepAliveCount; | 
| 63 |     quint32 maxNotificationsPerPublish; | 
| 64 |     quint8 priority; | 
| 65 |     bool publishingEnabled; | 
| 66 |  | 
| 67 |     // Qt OPC UA specific | 
| 68 |     QOpcUa::UaStatusCode statusCode; | 
| 69 |     QOpcUaMonitoringParameters::SubscriptionType shared; | 
| 70 | }; | 
| 71 |  | 
| 72 | QT_END_NAMESPACE | 
| 73 |  | 
| 74 | #endif // QOPCUAMONITORINGPARAMETERS_P_H | 
| 75 |  |