From e61f31fec1453bd3d497422ae5e3f963c78699b4 Mon Sep 17 00:00:00 2001 From: Armin Co <armin.co@hs-bochum.de> Date: Tue, 6 Oct 2020 09:19:03 +0200 Subject: [PATCH] removed spdlog --- src/apps/smart_grid/SmartOpcServer.cpp | 4 ++-- src/apps/smart_grid/smg_server.cpp | 11 +++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/apps/smart_grid/SmartOpcServer.cpp b/src/apps/smart_grid/SmartOpcServer.cpp index 199e9b2..0933e39 100644 --- a/src/apps/smart_grid/SmartOpcServer.cpp +++ b/src/apps/smart_grid/SmartOpcServer.cpp @@ -53,8 +53,8 @@ private: SmartOpcServer::SmartOpcServer(SmgStateMachine &state_machine) : m_state_machine{state_machine} { - m_logger = spdlog::stderr_color_mt("server"); - m_server = UaServer(m_logger); + // m_logger = spdlog::stderr_color_mt("server"); + m_server = UaServer(); m_server.SetEndpoint(k_opc_server_url); m_server.SetServerURI("Smart Grid OPC UA server"); } diff --git a/src/apps/smart_grid/smg_server.cpp b/src/apps/smart_grid/smg_server.cpp index 8b8471a..b1fcb86 100644 --- a/src/apps/smart_grid/smg_server.cpp +++ b/src/apps/smart_grid/smg_server.cpp @@ -1,6 +1,7 @@ /// @file main.cpp /// #include <thread> +#include <iostream> #include "i2c/Node.hpp" #include "HardwareControl.hpp" @@ -35,13 +36,15 @@ int main(int argc, char **argv) { exit(1); } + std::cout << "At least hardware works!" << std::endl; HardwareControl hardware{i2c_channel}; - // SmartGridModel model{hardware}; - // SmgStateMachine stateMachine{model}; + SmartGridModel model{hardware}; + SmgStateMachine stateMachine{model}; - // SmartOpcServer server{stateMachine}; - // server.run_server(); + + SmartOpcServer server{stateMachine}; + server.run_server(); // spdlog::info("End"); return 0; -- GitLab