diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a57907f0..0cf28d16 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,13 +1,13 @@ --- - name: Build +name: Build - on: - push: - pull_request: - branches: [main, development] +on: + push: + pull_request: + branches: [main, development] merge_group: - jobs: +jobs: build-linux: strategy: matrix: diff --git a/OpcUaClient/Converter/UaToModelConverter.cpp b/OpcUaClient/Converter/UaToModelConverter.cpp index 70ad96d2..c0852bbe 100644 --- a/OpcUaClient/Converter/UaToModelConverter.cpp +++ b/OpcUaClient/Converter/UaToModelConverter.cpp @@ -1,44 +1,40 @@ - /* This Source Code Form is subject to the terms of the Mozilla Public +/* 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.) - * Copyright 2021 (c) Marius Dege, basysKom GmbH - * Copyright 2023 (c) Sebastian Friedl, FVA GmbH interop4X - + * + * Copyright (c) 2019-2021 Christian von Arnim, ISW University of Stuttgart (for umati and VDW e.V.) + * Copyright (c) 2020 Dominik Basner, Sotec GmbH (for VDW e.V.) + * Copyright (c) 2021 Marius Dege, basysKom GmbH + * Copyright (c) 2023 Sebastian Friedl, FVA GmbH interop4X */ #include "UaToModelConverter.hpp" #include namespace Umati { - namespace OpcUa { - namespace Converter { - - UaToModelConverter::UaToModelConverter(const std::map &idToUri) : m_idToUri( - idToUri) { - } +namespace OpcUa { +namespace Converter { - UaToModelConverter::~UaToModelConverter() = default; +UaToModelConverter::UaToModelConverter(const std::map &idToUri) : m_idToUri(idToUri) {} +UaToModelConverter::~UaToModelConverter() = default; - std::string UaToModelConverter::getUriFromNsIndex(uint16_t nsIndex) { - // the opc ua standard allows to remove the nsIndex for the namespace zero - // so the converter only use this nsIndex - if (nsIndex == 0) { - return std::string(); - } - // FIX_END +std::string UaToModelConverter::getUriFromNsIndex(uint16_t nsIndex) { + // the opc ua standard allows to remove the nsIndex for the namespace zero + // so the converter only use this nsIndex + if (nsIndex == 0) { + return std::string(); + } + // FIX_END - auto it = m_idToUri.find(nsIndex); - if (it == m_idToUri.end()) { - LOG(ERROR) << "Could not find nsIndex: " << nsIndex << std::endl; - return std::string(); - } + auto it = m_idToUri.find(nsIndex); + if (it == m_idToUri.end()) { + LOG(ERROR) << "Could not find nsIndex: " << nsIndex << std::endl; + return std::string(); + } - return it->second; - } - } - } + return it->second; } +} // namespace Converter +} // namespace OpcUa +} // namespace Umati diff --git a/Tests/unit/TestCaCertificate.cpp b/Tests/unit/TestCaCertificate.cpp index 72e33be4..0d813b04 100644 --- a/Tests/unit/TestCaCertificate.cpp +++ b/Tests/unit/TestCaCertificate.cpp @@ -17,7 +17,7 @@ TEST(OpcUaClient, CaCertificateLinux_SSLCerts) { Umati::Util::ConfigureLogger("DashboardOpcUaClient"); Umati::Util::ConfigurationJsonFile conf("ConfigurationCa.json"); - EXPECT_NO_THROW(Umati::MqttPublisher_Paho::MqttPublisher_Paho publisher( + EXPECT_NO_THROW(Umati::MqttPublisher_Paho::MqttPublisher_Paho publisher( conf.getMqtt().Protocol, conf.getMqtt().Hostname, conf.getMqtt().Port,