Merge commit '80dc1ab0436dc1514a381871e051516bc4e18081'
This commit is contained in:
@@ -1,18 +1,13 @@
|
|||||||
#ifndef __PAYLOADS_JOIN__
|
#ifndef __PAYLOADS_JOIN__
|
||||||
#define __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
|
* @file
|
||||||
* @brief main header file for the BC::Payloads::HotPlugJoin payload
|
* @brief main header file for the Join payload
|
||||||
* @author Dominik Meyer <dmeyer@hsu-hh.de>
|
* @author Henry Winkel
|
||||||
* @date 2019-02-03
|
* @date 15.09.2022
|
||||||
* @copyright 2019 no yet defined
|
* @copyright
|
||||||
*/
|
*/
|
||||||
#include <CommService/transmittable.hpp>
|
#include <CommService/transmittable.hpp>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|||||||
@@ -1,7 +1,13 @@
|
|||||||
#ifndef __PAYLOADS_LEAVE__
|
#ifndef __PAYLOADS_LEAVE__
|
||||||
#define __PAYLOADS_LEAVE__
|
#define __PAYLOADS_LEAVE__
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @brief main header file for the Leave payload
|
||||||
|
* @author Henry Winkel
|
||||||
|
* @date 15.09.2022
|
||||||
|
* @copyright
|
||||||
|
*/
|
||||||
#include <CommService/transmittable.hpp>
|
#include <CommService/transmittable.hpp>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|||||||
@@ -1,18 +1,11 @@
|
|||||||
#ifndef __PAYLOADS_PING__
|
#ifndef __PAYLOADS_PING__
|
||||||
#define __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
|
* @file
|
||||||
* @brief main header file for the BC::Payloads::Ping payload
|
* @brief main header file for the BPing payload
|
||||||
* @author Dominik Meyer <dmeyer@hsu-hh.de>
|
* @author Henry Winkel
|
||||||
* @date 2019-02-06
|
* @date 15.09.2022
|
||||||
* @copyright 2019 no yet defined
|
* @copyright
|
||||||
*/
|
*/
|
||||||
#include <CommService/transmittable.hpp>
|
#include <CommService/transmittable.hpp>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|||||||
@@ -1,18 +1,12 @@
|
|||||||
#ifndef __LIBBC_BC_PAYLOADS_PONG_HPP__
|
#ifndef __LIBBC_BC_PAYLOADS_PONG_HPP__
|
||||||
#define __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
|
* @file
|
||||||
* @brief main header file for the BC::Payloads::Pong payload
|
* @brief main header file for the Pong payload
|
||||||
* @author Dominik Meyer <dmeyer@hsu-hh.de>
|
* @author Henry Winkel
|
||||||
* @date 2019-02-06
|
* @date 15.09.2022
|
||||||
* @copyright 2019 no yet defined
|
* @copyright
|
||||||
*/
|
*/
|
||||||
#include <CommService/transmittable.hpp>
|
#include <CommService/transmittable.hpp>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|||||||
@@ -115,6 +115,8 @@ namespace CommService {
|
|||||||
|
|
||||||
void CommService::disconnect(){
|
void CommService::disconnect(){
|
||||||
close(inetSocket);
|
close(inetSocket);
|
||||||
|
LOG_S(INFO)<< "socket closed";
|
||||||
|
receiveThread.join();
|
||||||
connected = false;
|
connected = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -376,14 +378,11 @@ namespace CommService {
|
|||||||
void CommService::stop(){
|
void CommService::stop(){
|
||||||
stopReceiveThread = true;
|
stopReceiveThread = true;
|
||||||
|
|
||||||
while (receiving == false) {
|
|
||||||
|
|
||||||
}
|
|
||||||
LOG_S(INFO)<<"receive thread stoped ";
|
LOG_S(INFO)<<"receive thread stoped ";
|
||||||
|
|
||||||
Message m;
|
Message m;
|
||||||
m.topic = messageTopic::LEAVE;
|
m.topic = messageTopic::LEAVE;
|
||||||
LOG_S(INFO) << "own device = "<<deviceID_;
|
|
||||||
m.sourceID = deviceID_;
|
m.sourceID = deviceID_;
|
||||||
publish(m);
|
publish(m);
|
||||||
|
|
||||||
@@ -397,9 +396,6 @@ namespace CommService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
CommService::~CommService(){
|
CommService::~CommService(){
|
||||||
if (connected == true) {
|
|
||||||
disconnect();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
Reference in New Issue
Block a user