forked from umati/Dashboard-OPCUA-Client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConfiguration.hpp
62 lines (52 loc) · 1.78 KB
/
Configuration.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* Copyright 2019-2021 (c) Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.)
* Copyright 2020 (c) Dominik Basner, Sotec GmbH (for VDW e.V.)
*/
#pragma once
#include <string>
#include <cstdint>
#include <vector>
#include "../ModelOpcUa/src/ModelOpcUa/ModelDefinition.hpp"
namespace Umati {
namespace Util {
struct MqttConfig {
/// Hostname or IP-Address
std::string Hostname;
std::uint16_t Port;
/// Might be empty if no authentification required
std::string Username;
/// Might be empty if no authentification required
std::string Password;
std::string Prefix = "umati";
std::string Protocol = "tcp";
};
struct OpcUaConfig {
/// OPC UA Endpoint
std::string Endpoint;
std::string Username;
std::string Password; /// 1 = None, 2 Sign, 3 = Sign&Encrypt
std::uint8_t Security = 1;
bool ByPassCertVerification = false;
};
/**
* @brief NamespaceInformation
* Describes how to handle types introduced by a namespace.
*/
struct NamespaceInformation {
std::string Namespace; /**< Namespace, e.g. https://opcfoundation.org/SurfaceTechnology */
std::vector<ModelOpcUa::NodeId_t> Types; /**< Types, this Namespace introduces */
ModelOpcUa::NodeId_t IdentificationType; /**< IdentificationType, child of types */
};
class Configuration {
public:
virtual ~Configuration() = 0;
virtual std::vector<NamespaceInformation> getNamespaceInformations() = 0;
virtual std::vector<std::string> getObjectTypeNamespaces() = 0;
virtual MqttConfig getMqtt() = 0;
virtual OpcUaConfig getOpcUa() = 0;
};
}
}