diff --git a/libs/CommService/include/CommService/PayLoads/Join.hpp b/libs/CommService/include/CommService/PayLoads/Join.hpp index 411700f..fb92641 100644 --- a/libs/CommService/include/CommService/PayLoads/Join.hpp +++ b/libs/CommService/include/CommService/PayLoads/Join.hpp @@ -1,18 +1,13 @@ #ifndef __PAYLOADS_JOIN__ #define __PAYLOADS_JOIN__ -/* -* 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 https://mozilla.org/MPL/2.0/. -*/ /** * @file -* @brief main header file for the BC::Payloads::HotPlugJoin payload -* @author Dominik Meyer -* @date 2019-02-03 -* @copyright 2019 no yet defined +* @brief main header file for the Join payload +* @author Henry Winkel +* @date 15.09.2022 +* @copyright */ #include #include diff --git a/libs/CommService/include/CommService/PayLoads/Leave.hpp b/libs/CommService/include/CommService/PayLoads/Leave.hpp index 2e5adad..42132a6 100644 --- a/libs/CommService/include/CommService/PayLoads/Leave.hpp +++ b/libs/CommService/include/CommService/PayLoads/Leave.hpp @@ -1,7 +1,13 @@ #ifndef __PAYLOADS_LEAVE__ #define __PAYLOADS_LEAVE__ - +/** +* @file +* @brief main header file for the Leave payload +* @author Henry Winkel +* @date 15.09.2022 +* @copyright +*/ #include #include #include diff --git a/libs/CommService/include/CommService/PayLoads/Ping.hpp b/libs/CommService/include/CommService/PayLoads/Ping.hpp index c15fa04..1a26dad 100644 --- a/libs/CommService/include/CommService/PayLoads/Ping.hpp +++ b/libs/CommService/include/CommService/PayLoads/Ping.hpp @@ -1,18 +1,11 @@ #ifndef __PAYLOADS_PING__ #define __PAYLOADS_PING__ -/* -* 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 https://mozilla.org/MPL/2.0/. -*/ - - /** * @file -* @brief main header file for the BC::Payloads::Ping payload -* @author Dominik Meyer -* @date 2019-02-06 -* @copyright 2019 no yet defined +* @brief main header file for the BPing payload +* @author Henry Winkel +* @date 15.09.2022 +* @copyright */ #include #include diff --git a/libs/CommService/include/CommService/PayLoads/Pong.hpp b/libs/CommService/include/CommService/PayLoads/Pong.hpp index 8477c97..38a9c83 100644 --- a/libs/CommService/include/CommService/PayLoads/Pong.hpp +++ b/libs/CommService/include/CommService/PayLoads/Pong.hpp @@ -1,18 +1,12 @@ #ifndef __LIBBC_BC_PAYLOADS_PONG_HPP__ #define __LIBBC_BC_PAYLOADS_PONG_HPP__ -/* -* 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 https://mozilla.org/MPL/2.0/. -*/ - /** * @file -* @brief main header file for the BC::Payloads::Pong payload -* @author Dominik Meyer -* @date 2019-02-06 -* @copyright 2019 no yet defined +* @brief main header file for the Pong payload +* @author Henry Winkel +* @date 15.09.2022 +* @copyright */ #include #include diff --git a/libs/CommService/include/ReadMe.txt b/libs/CommService/include/ReadMe.txt deleted file mode 100644 index e69de29..0000000 diff --git a/libs/CommService/src/CommService/CommService.cpp b/libs/CommService/src/CommService/CommService.cpp index 74659d2..957ad82 100644 --- a/libs/CommService/src/CommService/CommService.cpp +++ b/libs/CommService/src/CommService/CommService.cpp @@ -94,27 +94,29 @@ namespace CommService { } - receiveThread = std::thread(&CommService::receiveThreadFunc,this); + receiveThread = std::thread(&CommService::receiveThreadFunc,this); - Message m; - m.topic = messageTopic::JOIN; - m.sourceID = deviceID_; + Message m; + m.topic = messageTopic::JOIN; + m.sourceID = deviceID_; - // wait until service is really connected - while(!connected) - { + // wait until service is really connected + while(!connected) + { - } - LOG_S(INFO)<< "connected"; + } + LOG_S(INFO)<< "connected"; - // publish the hotplug join message - publish(m); + // publish the hotplug join message + publish(m); } void CommService::disconnect(){ close(inetSocket); + LOG_S(INFO)<< "socket closed"; + receiveThread.join(); connected = false; } @@ -376,14 +378,11 @@ namespace CommService { void CommService::stop(){ stopReceiveThread = true; - while (receiving == false) { - } - LOG_S(INFO)<<"receive thread stoped"; + LOG_S(INFO)<<"receive thread stoped "; Message m; m.topic = messageTopic::LEAVE; - LOG_S(INFO) << "own device = "<