#include "report_service.hpp" using namespace iflytop; using namespace core; void ReportService::initialize() { GET_TO_SERVICE(config); GET_TO_SERVICE(deviceIoService); } void ReportService::start() { logger->info("ReportService start"); if (thread) return; thread.reset(new Thread("ReportService", [this]() { ThisThread thisThread; while (thisThread.getExitFlag()) { thisThread.sleepForMs(1000); } })); } void ReportService::stop() { logger->info("ReportService stop"); if (thread) { thread->join(); thread.reset(); } }