You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

27 lines
567 B

#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();
}
}