1// Copyright (C) 2016 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 QOPCUACLIENT_P_H
5#define QOPCUACLIENT_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/qopcuaclient.h>
19#include <QtOpcUa/qopcuaglobal.h>
20#include <QtOpcUa/qopcuaauthenticationinformation.h>
21#include <QtOpcUa/qopcuaconnectionsettings.h>
22#include <private/qopcuaclientimpl_p.h>
23
24#include <QtCore/qobject.h>
25#include <QtCore/qscopedpointer.h>
26#include <QtCore/qurl.h>
27#include <private/qobject_p.h>
28
29QT_BEGIN_NAMESPACE
30
31class Q_OPCUA_EXPORT QOpcUaClientPrivate : public QObjectPrivate
32{
33public:
34 Q_DECLARE_PUBLIC(QOpcUaClient)
35
36 QOpcUaClientPrivate(QOpcUaClientImpl *impl);
37 ~QOpcUaClientPrivate() override;
38
39 void connectToEndpoint(const QOpcUaEndpointDescription &endpoint);
40 void disconnectFromEndpoint();
41
42 // The following members are read by the backend and must be available
43 // until m_impl has been destroyed.
44 QOpcUaConnectionSettings m_connectionSettings;
45 QOpcUaAuthenticationInformation m_authenticationInformation;
46 QOpcUaApplicationIdentity m_applicationIdentity;
47 QOpcUaPkiConfiguration m_pkiConfig;
48
49 QScopedPointer<QOpcUaClientImpl> m_impl;
50 QOpcUaClient::ClientState m_state;
51 QOpcUaClient::ClientError m_error;
52 QOpcUaEndpointDescription m_endpoint;
53 bool m_enableNamespaceArrayAutoupdate;
54
55 bool checkAndSetUrl(const QUrl &url);
56 void setStateAndError(QOpcUaClient::ClientState state,
57 QOpcUaClient::ClientError error = QOpcUaClient::NoError);
58
59 bool updateNamespaceArray();
60 QStringList namespaceArray() const;
61 void namespaceArrayUpdated(QOpcUa::NodeAttributes attr);
62 void setupNamespaceArrayMonitoring();
63
64 void setApplicationIdentity(const QOpcUaApplicationIdentity &identity);
65 QOpcUaApplicationIdentity applicationIdentity() const;
66
67 void setPkiConfiguration(const QOpcUaPkiConfiguration &config);
68 QOpcUaPkiConfiguration pkiConfiguration() const;
69
70private:
71 QStringList m_namespaceArray;
72 QScopedPointer<QOpcUaNode> m_namespaceArrayNode;
73 bool m_namespaceArrayAutoupdateEnabled;
74 unsigned int m_namespaceArrayUpdateInterval;
75};
76
77QT_END_NAMESPACE
78
79#endif // QOPCUACLIENT_P_H
80

Provided by KDAB

Privacy Policy
Learn to use CMake with our Intro Training
Find out more

source code of qtopcua/src/opcua/client/qopcuaclient_p.h