|
@ -66,6 +66,15 @@ static string format_zsystem_tp(zsystem_tp tp) { |
|
|
tm.tm_min); |
|
|
tm.tm_min); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static string format_simple_zsystem_tp(zsystem_tp tp) { |
|
|
|
|
|
time_t time = system_clock().to_time_t(tp); |
|
|
|
|
|
struct tm tm = {0}; |
|
|
|
|
|
localtime_r(&time, &tm); |
|
|
|
|
|
return fmt::format("{:0>2}:{:0>2}", |
|
|
|
|
|
tm.tm_hour, //
|
|
|
|
|
|
tm.tm_min); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
static void listDirCSVFile(string path, vector<string>& sv) { |
|
|
static void listDirCSVFile(string path, vector<string>& sv) { |
|
|
sv.clear(); |
|
|
sv.clear(); |
|
|
/**
|
|
|
/**
|
|
@ -182,6 +191,7 @@ void DisinfectionLogsService::initialize() { |
|
|
m_csvHeaderDict.insert(CSVHeader::tlog, "目标LOG"); |
|
|
m_csvHeaderDict.insert(CSVHeader::tlog, "目标LOG"); |
|
|
m_csvHeaderDict.insert(CSVHeader::remaindisinfectant, "消毒剂剩余量(g)"); |
|
|
m_csvHeaderDict.insert(CSVHeader::remaindisinfectant, "消毒剂剩余量(g)"); |
|
|
m_csvHeaderDict.insert(CSVHeader::reamintime, "预计剩余时间"); |
|
|
m_csvHeaderDict.insert(CSVHeader::reamintime, "预计剩余时间"); |
|
|
|
|
|
m_csvHeaderDict.insert(CSVHeader::injectionRate, "注液速率"); |
|
|
|
|
|
|
|
|
m_dmStateDict.insert(DisinfectionState::idle, "空闲"); |
|
|
m_dmStateDict.insert(DisinfectionState::idle, "空闲"); |
|
|
m_dmStateDict.insert(DisinfectionState::init, "初始化"); |
|
|
m_dmStateDict.insert(DisinfectionState::init, "初始化"); |
|
@ -192,7 +202,6 @@ void DisinfectionLogsService::initialize() { |
|
|
m_dmStateDict.insert(DisinfectionState::dehumidificationAfterDisinfection, "消毒后除湿"); |
|
|
m_dmStateDict.insert(DisinfectionState::dehumidificationAfterDisinfection, "消毒后除湿"); |
|
|
m_dmStateDict.insert(DisinfectionState::emptyLiquidFromTheLine, "清空管路"); |
|
|
m_dmStateDict.insert(DisinfectionState::emptyLiquidFromTheLine, "清空管路"); |
|
|
m_dmStateDict.insert(DisinfectionState::finished, "消毒结束"); |
|
|
m_dmStateDict.insert(DisinfectionState::finished, "消毒结束"); |
|
|
m_dmStateDict.insert(DisinfectionState::error, "错误"); |
|
|
|
|
|
|
|
|
|
|
|
// TODO: 检查指令iconv是否可用
|
|
|
// TODO: 检查指令iconv是否可用
|
|
|
|
|
|
|
|
@ -274,6 +283,30 @@ void DisinfectionLogsService::dumpDisinfectionRecord(string sessionId, list<shar |
|
|
|
|
|
|
|
|
logger->info("DisinfectionLogsService: dumpDisinfectionRecord, sessionId: {}, min period: {}s", sessionId, logdtime); |
|
|
logger->info("DisinfectionLogsService: dumpDisinfectionRecord, sessionId: {}, min period: {}s", sessionId, logdtime); |
|
|
|
|
|
|
|
|
|
|
|
csv.addValue(0, m_csvHeaderDict.getChName(CSVHeader::time), ""); |
|
|
|
|
|
csv.addValue(0, m_csvHeaderDict.getChName(CSVHeader::state), ""); |
|
|
|
|
|
if (PORT.getExtH2O2SensorNum() >= 0) csv.addValue(0, m_csvHeaderDict.getChName(CSVHeader::ho2o2_0), ""); |
|
|
|
|
|
if (PORT.getExtH2O2SensorNum() >= 1) csv.addValue(0, m_csvHeaderDict.getChName(CSVHeader::ho2o2_1), ""); |
|
|
|
|
|
if (PORT.getExtH2O2SensorNum() >= 2) csv.addValue(0, m_csvHeaderDict.getChName(CSVHeader::ho2o2_2), ""); |
|
|
|
|
|
if (PORT.getExtH2O2SensorNum() >= 0) csv.addValue(0, m_csvHeaderDict.getChName(CSVHeader::temp_0), ""); |
|
|
|
|
|
if (PORT.getExtH2O2SensorNum() >= 1) csv.addValue(0, m_csvHeaderDict.getChName(CSVHeader::temp_1), ""); |
|
|
|
|
|
if (PORT.getExtH2O2SensorNum() >= 2) csv.addValue(0, m_csvHeaderDict.getChName(CSVHeader::temp_2), ""); |
|
|
|
|
|
if (PORT.getExtH2O2SensorNum() >= 0) csv.addValue(0, m_csvHeaderDict.getChName(CSVHeader::rh_0), ""); |
|
|
|
|
|
if (PORT.getExtH2O2SensorNum() >= 1) csv.addValue(0, m_csvHeaderDict.getChName(CSVHeader::rh_1), ""); |
|
|
|
|
|
if (PORT.getExtH2O2SensorNum() >= 2) csv.addValue(0, m_csvHeaderDict.getChName(CSVHeader::rh_2), ""); |
|
|
|
|
|
if (PORT.getExtH2O2SensorNum() >= 0) csv.addValue(0, m_csvHeaderDict.getChName(CSVHeader::rs_0), ""); |
|
|
|
|
|
if (PORT.getExtH2O2SensorNum() >= 1) csv.addValue(0, m_csvHeaderDict.getChName(CSVHeader::rs_1), ""); |
|
|
|
|
|
if (PORT.getExtH2O2SensorNum() >= 2) csv.addValue(0, m_csvHeaderDict.getChName(CSVHeader::rs_2), ""); |
|
|
|
|
|
csv.addValue(0, m_csvHeaderDict.getChName(CSVHeader::dval), ""); |
|
|
|
|
|
csv.addValue(0, m_csvHeaderDict.getChName(CSVHeader::nlog), ""); |
|
|
|
|
|
csv.addValue(0, m_csvHeaderDict.getChName(CSVHeader::tlog), ""); |
|
|
|
|
|
csv.addValue(0, m_csvHeaderDict.getChName(CSVHeader::injectionRate), ""); |
|
|
|
|
|
if (ProjectPort::ins().projectTypeInt != kdraw_bar_disinfection_box) { |
|
|
|
|
|
csv.addValue(0, m_csvHeaderDict.getChName(CSVHeader::remaindisinfectant), ""); |
|
|
|
|
|
} |
|
|
|
|
|
csv.addValue(0, m_csvHeaderDict.getChName(CSVHeader::reamintime), ""); |
|
|
|
|
|
|
|
|
|
|
|
int lineNum = 1; |
|
|
for (auto& s : snapshots) { |
|
|
for (auto& s : snapshots) { |
|
|
bool logthis = false; |
|
|
bool logthis = false; |
|
|
|
|
|
|
|
@ -288,45 +321,52 @@ void DisinfectionLogsService::dumpDisinfectionRecord(string sessionId, list<shar |
|
|
state = s->state; |
|
|
state = s->state; |
|
|
lastlogtime = s->time; |
|
|
lastlogtime = s->time; |
|
|
|
|
|
|
|
|
csv.addValue(m_csvHeaderDict.getChName(CSVHeader::time), /******************/ tu_sys::fmt(s->time, "%Y-%m-%d %H:%M:%S")); |
|
|
|
|
|
if (s->state == DisinfectionState::error) { |
|
|
|
|
|
csv.addValue(m_csvHeaderDict.getChName(CSVHeader::state), /*****************/ m_dmStateDict.getChName(s->state) + ":" + ecode2str(s->ecode)); |
|
|
|
|
|
} else { |
|
|
|
|
|
csv.addValue(m_csvHeaderDict.getChName(CSVHeader::state), /*****************/ m_dmStateDict.getChName(s->state)); |
|
|
|
|
|
|
|
|
csv.addValue(lineNum, m_csvHeaderDict.getChName(CSVHeader::time), /******************/ tu_sys::fmt(s->time, "%Y-%m-%d %H:%M:%S")); |
|
|
|
|
|
|
|
|
|
|
|
if (s->ecode != 0) { |
|
|
|
|
|
csv.addValue(lineNum, m_csvHeaderDict.getChName(CSVHeader::state), /*****************/ ecode2str(s->ecode)); |
|
|
|
|
|
lineNum++; |
|
|
|
|
|
continue; |
|
|
} |
|
|
} |
|
|
|
|
|
csv.addValue(lineNum, m_csvHeaderDict.getChName(CSVHeader::state), /*****************/ m_dmStateDict.getChName(s->state)); |
|
|
|
|
|
csv.addValue(lineNum, m_csvHeaderDict.getChName(CSVHeader::injectionRate), /*****************/ s->isDisinfectionTakeBreak ? "0" : fmt::format("{}", s->inJectionRate)); |
|
|
|
|
|
|
|
|
|
|
|
// injectionRate = s->injectionRate;
|
|
|
|
|
|
// injectionRate
|
|
|
|
|
|
|
|
|
auto h2o2data = s->h2o2Snapshot; |
|
|
auto h2o2data = s->h2o2Snapshot; |
|
|
for (int i = 0; i < h2o2data->getSensorDataNum(); i++) { |
|
|
for (int i = 0; i < h2o2data->getSensorDataNum(); i++) { |
|
|
if (i == 0) { |
|
|
if (i == 0) { |
|
|
csv.addValue(m_csvHeaderDict.getChName(CSVHeader::ho2o2_0), /***************/ h2o2data->isExpired[0] ? "N/A" : formatSensorVal(h2o2data->h2o2[0])); |
|
|
|
|
|
csv.addValue(m_csvHeaderDict.getChName(CSVHeader::temp_0), /****************/ h2o2data->isExpired[0] ? "N/A" : formatSensorVal(h2o2data->temp[0])); |
|
|
|
|
|
csv.addValue(m_csvHeaderDict.getChName(CSVHeader::rh_0), /******************/ h2o2data->isExpired[0] ? "N/A" : formatSensorVal(h2o2data->rh[0])); |
|
|
|
|
|
csv.addValue(m_csvHeaderDict.getChName(CSVHeader::rs_0), /******************/ h2o2data->isExpired[0] ? "N/A" : formatSensorVal(h2o2data->rs[0])); |
|
|
|
|
|
|
|
|
csv.addValue(lineNum, m_csvHeaderDict.getChName(CSVHeader::ho2o2_0), /***************/ h2o2data->isExpired[0] ? "N/A" : formatSensorVal(h2o2data->h2o2[0])); |
|
|
|
|
|
csv.addValue(lineNum, m_csvHeaderDict.getChName(CSVHeader::temp_0), /****************/ h2o2data->isExpired[0] ? "N/A" : formatSensorVal(h2o2data->temp[0])); |
|
|
|
|
|
csv.addValue(lineNum, m_csvHeaderDict.getChName(CSVHeader::rh_0), /******************/ h2o2data->isExpired[0] ? "N/A" : formatSensorVal(h2o2data->rh[0])); |
|
|
|
|
|
csv.addValue(lineNum, m_csvHeaderDict.getChName(CSVHeader::rs_0), /******************/ h2o2data->isExpired[0] ? "N/A" : formatSensorVal(h2o2data->rs[0])); |
|
|
} |
|
|
} |
|
|
if (i == 1) { |
|
|
if (i == 1) { |
|
|
csv.addValue(m_csvHeaderDict.getChName(CSVHeader::ho2o2_1), /***************/ h2o2data->isExpired[1] ? "N/A" : formatSensorVal(h2o2data->h2o2[1])); |
|
|
|
|
|
csv.addValue(m_csvHeaderDict.getChName(CSVHeader::temp_1), /****************/ h2o2data->isExpired[1] ? "N/A" : formatSensorVal(h2o2data->temp[1])); |
|
|
|
|
|
csv.addValue(m_csvHeaderDict.getChName(CSVHeader::rh_1), /******************/ h2o2data->isExpired[1] ? "N/A" : formatSensorVal(h2o2data->rh[1])); |
|
|
|
|
|
csv.addValue(m_csvHeaderDict.getChName(CSVHeader::rs_1), /******************/ h2o2data->isExpired[1] ? "N/A" : formatSensorVal(h2o2data->rs[1])); |
|
|
|
|
|
|
|
|
csv.addValue(lineNum, m_csvHeaderDict.getChName(CSVHeader::ho2o2_1), /***************/ h2o2data->isExpired[1] ? "N/A" : formatSensorVal(h2o2data->h2o2[1])); |
|
|
|
|
|
csv.addValue(lineNum, m_csvHeaderDict.getChName(CSVHeader::temp_1), /****************/ h2o2data->isExpired[1] ? "N/A" : formatSensorVal(h2o2data->temp[1])); |
|
|
|
|
|
csv.addValue(lineNum, m_csvHeaderDict.getChName(CSVHeader::rh_1), /******************/ h2o2data->isExpired[1] ? "N/A" : formatSensorVal(h2o2data->rh[1])); |
|
|
|
|
|
csv.addValue(lineNum, m_csvHeaderDict.getChName(CSVHeader::rs_1), /******************/ h2o2data->isExpired[1] ? "N/A" : formatSensorVal(h2o2data->rs[1])); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (i == 2) { |
|
|
if (i == 2) { |
|
|
csv.addValue(m_csvHeaderDict.getChName(CSVHeader::ho2o2_2), /***************/ h2o2data->isExpired[2] ? "N/A" : formatSensorVal(h2o2data->h2o2[2])); |
|
|
|
|
|
csv.addValue(m_csvHeaderDict.getChName(CSVHeader::temp_2), /****************/ h2o2data->isExpired[2] ? "N/A" : formatSensorVal(h2o2data->temp[2])); |
|
|
|
|
|
csv.addValue(m_csvHeaderDict.getChName(CSVHeader::rh_2), /******************/ h2o2data->isExpired[2] ? "N/A" : formatSensorVal(h2o2data->rh[2])); |
|
|
|
|
|
csv.addValue(m_csvHeaderDict.getChName(CSVHeader::rs_2), /******************/ h2o2data->isExpired[2] ? "N/A" : formatSensorVal(h2o2data->rs[2])); |
|
|
|
|
|
|
|
|
csv.addValue(lineNum, m_csvHeaderDict.getChName(CSVHeader::ho2o2_2), /***************/ h2o2data->isExpired[2] ? "N/A" : formatSensorVal(h2o2data->h2o2[2])); |
|
|
|
|
|
csv.addValue(lineNum, m_csvHeaderDict.getChName(CSVHeader::temp_2), /****************/ h2o2data->isExpired[2] ? "N/A" : formatSensorVal(h2o2data->temp[2])); |
|
|
|
|
|
csv.addValue(lineNum, m_csvHeaderDict.getChName(CSVHeader::rh_2), /******************/ h2o2data->isExpired[2] ? "N/A" : formatSensorVal(h2o2data->rh[2])); |
|
|
|
|
|
csv.addValue(lineNum, m_csvHeaderDict.getChName(CSVHeader::rs_2), /******************/ h2o2data->isExpired[2] ? "N/A" : formatSensorVal(h2o2data->rs[2])); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
csv.addValue(m_csvHeaderDict.getChName(CSVHeader::dval), /******************/ fmt::format("{}", s->dval)); |
|
|
|
|
|
csv.addValue(m_csvHeaderDict.getChName(CSVHeader::nlog), /******************/ fmt::format("{}", s->nlog)); |
|
|
|
|
|
csv.addValue(m_csvHeaderDict.getChName(CSVHeader::tlog), /******************/ fmt::format("{}", s->tlog)); |
|
|
|
|
|
|
|
|
csv.addValue(lineNum, m_csvHeaderDict.getChName(CSVHeader::dval), /******************/ fmt::format("{}", s->dval)); |
|
|
|
|
|
csv.addValue(lineNum, m_csvHeaderDict.getChName(CSVHeader::nlog), /******************/ fmt::format("{}", s->nlog)); |
|
|
|
|
|
csv.addValue(lineNum, m_csvHeaderDict.getChName(CSVHeader::tlog), /******************/ fmt::format("{}", s->tlog)); |
|
|
|
|
|
|
|
|
// 拉杆箱消毒机没有消毒剂剩余量
|
|
|
// 拉杆箱消毒机没有消毒剂剩余量
|
|
|
if (ProjectPort::ins().projectTypeInt != kdraw_bar_disinfection_box) { |
|
|
if (ProjectPort::ins().projectTypeInt != kdraw_bar_disinfection_box) { |
|
|
csv.addValue(m_csvHeaderDict.getChName(CSVHeader::remaindisinfectant), /****/ fmt::format("{}", s->remainDisinfectant)); |
|
|
|
|
|
|
|
|
csv.addValue(lineNum, m_csvHeaderDict.getChName(CSVHeader::remaindisinfectant), /****/ fmt::format("{}", s->remainDisinfectant)); |
|
|
} |
|
|
} |
|
|
csv.addValue(m_csvHeaderDict.getChName(CSVHeader::reamintime), /************/ fmt::format("{}", formattimeS(s->remainTime))); |
|
|
|
|
|
|
|
|
csv.addValue(lineNum, m_csvHeaderDict.getChName(CSVHeader::reamintime), /************/ fmt::format("{}", formattimeS(s->remainTime))); |
|
|
|
|
|
lineNum++; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
system(fmt::format("mkdir -p {}", LOG_STORGE_PATH).c_str()); |
|
|
system(fmt::format("mkdir -p {}", LOG_STORGE_PATH).c_str()); |
|
@ -380,43 +420,31 @@ void DisinfectionLogsService::dumpDisinfectionToPrinterLog(string sessionId, lis |
|
|
first = false; |
|
|
first = false; |
|
|
lastlogtime = snapshot->time; |
|
|
lastlogtime = snapshot->time; |
|
|
|
|
|
|
|
|
if (state == DisinfectionState::disinfection) { |
|
|
|
|
|
|
|
|
if (snapshot->ecode != 0) { |
|
|
content += fmt::format("{}\n", format_zsystem_tp(snapshot->time)); |
|
|
content += fmt::format("{}\n", format_zsystem_tp(snapshot->time)); |
|
|
if (stateChanged) content += fmt::format("{}\n", m_dmStateDict.getChName(snapshot->state)); |
|
|
|
|
|
|
|
|
content += fmt::format("错误: {}\n", ecode2str(snapshot->ecode)); |
|
|
|
|
|
continue; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if (snapshot->nlog > snapshot->tlog) { |
|
|
|
|
|
content += fmt::format("LOG: {:.2f}\n", snapshot->tlog); |
|
|
|
|
|
} else { |
|
|
|
|
|
content += fmt::format("LOG: {:.2f}\n", snapshot->nlog); |
|
|
|
|
|
|
|
|
if (stateChanged) { |
|
|
|
|
|
content += fmt::format("{}\n", format_zsystem_tp(snapshot->time)); |
|
|
|
|
|
content += fmt::format("{}...\n", m_dmStateDict.getChName(snapshot->state)); |
|
|
|
|
|
if (state == DisinfectionState::disinfection) { |
|
|
|
|
|
content += fmt::format("时间 H2O2(ppm) RS(%) RH(%) LOG \n"); |
|
|
} |
|
|
} |
|
|
|
|
|
continue; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
auto h2o2data = snapshot->h2o2Snapshot; |
|
|
|
|
|
|
|
|
if (state == DisinfectionState::disinfection) { |
|
|
|
|
|
float nlog = nlog < snapshot->tlog ? nlog : snapshot->nlog; |
|
|
|
|
|
auto h2o2data = snapshot->h2o2Snapshot; |
|
|
for (int i = 0; i < h2o2data->getSensorDataNum(); i++) { |
|
|
for (int i = 0; i < h2o2data->getSensorDataNum(); i++) { |
|
|
if (i == 0) { |
|
|
if (i == 0) { |
|
|
content += fmt::format(" [S0] {}(ppm) {}(%RS) {}(%RH) \n", h2o2data->isExpired[0] ? "N/A" : formatSensorVal(h2o2data->h2o2[0]), //
|
|
|
|
|
|
h2o2data->isExpired[0] ? "N/A" : formatSensorVal(h2o2data->rs[0]), //
|
|
|
|
|
|
h2o2data->isExpired[0] ? "N/A" : formatSensorVal(h2o2data->rh[0])); |
|
|
|
|
|
|
|
|
content += fmt::format("{} {:>6} {:>4} {:>4} {:>2.2f} \n", format_simple_zsystem_tp(snapshot->time), //
|
|
|
|
|
|
h2o2data->isExpired[0] ? "N/A" : formatSensorVal(h2o2data->h2o2[0]), //
|
|
|
|
|
|
h2o2data->isExpired[0] ? "N/A" : formatSensorVal(h2o2data->rs[0]), //
|
|
|
|
|
|
h2o2data->isExpired[0] ? "N/A" : formatSensorVal(h2o2data->rh[0]), nlog); |
|
|
} |
|
|
} |
|
|
if (i == 1 && !h2o2data->isExpired[1]) { |
|
|
|
|
|
content += fmt::format(" [S1] {}(ppm) {}(%RS) {}(%RH) \n", formatSensorVal(h2o2data->h2o2[1]), //
|
|
|
|
|
|
formatSensorVal(h2o2data->rs[1]), //
|
|
|
|
|
|
formatSensorVal(h2o2data->rh[1])); |
|
|
|
|
|
} |
|
|
|
|
|
if (i == 2 && !h2o2data->isExpired[2]) { |
|
|
|
|
|
content += fmt::format(" [S2] {}(ppm) {}(%RS) {}(%RH) \n", formatSensorVal(h2o2data->h2o2[2]), //
|
|
|
|
|
|
formatSensorVal(h2o2data->rs[2]), //
|
|
|
|
|
|
formatSensorVal(h2o2data->rh[2])); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} else if (state == DisinfectionState::error) { |
|
|
|
|
|
content += fmt::format("{}\n", format_zsystem_tp(snapshot->time)); |
|
|
|
|
|
content += fmt::format("{}\n", m_dmStateDict.getChName(snapshot->state)); |
|
|
|
|
|
content += fmt::format(" 错误:{}\n", ecode2str(snapshot->ecode)); |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
if (stateChanged) { |
|
|
|
|
|
content += fmt::format("{}\n", format_zsystem_tp(snapshot->time)); |
|
|
|
|
|
content += fmt::format("{}\n", m_dmStateDict.getChName(snapshot->state)); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -621,7 +649,7 @@ void DisinfectionLogsService::selftest(shared_ptr<MsgProcessContext> cxt) { |
|
|
onAppDisinfectionSnapshotEvent(selftest_createFakeSnapshot(time_point_increment(now, 10), DisinfectionState::dehumidificationBeforeDisinfection, sensorNum, false)); |
|
|
onAppDisinfectionSnapshotEvent(selftest_createFakeSnapshot(time_point_increment(now, 10), DisinfectionState::dehumidificationBeforeDisinfection, sensorNum, false)); |
|
|
onAppDisinfectionSnapshotEvent(selftest_createFakeSnapshot(time_point_increment(now, 10), DisinfectionState::dehumidificationAfterDisinfection, sensorNum, false)); |
|
|
onAppDisinfectionSnapshotEvent(selftest_createFakeSnapshot(time_point_increment(now, 10), DisinfectionState::dehumidificationAfterDisinfection, sensorNum, false)); |
|
|
onAppDisinfectionSnapshotEvent(selftest_createFakeSnapshot(time_point_increment(now, 10), DisinfectionState::emptyLiquidFromTheLine, sensorNum, false)); |
|
|
onAppDisinfectionSnapshotEvent(selftest_createFakeSnapshot(time_point_increment(now, 10), DisinfectionState::emptyLiquidFromTheLine, sensorNum, false)); |
|
|
auto esnap = selftest_createFakeSnapshot(time_point_increment(now, 10), DisinfectionState::error, sensorNum, false); |
|
|
|
|
|
|
|
|
auto esnap = selftest_createFakeSnapshot(time_point_increment(now, 10), DisinfectionState::disinfection, sensorNum, false); |
|
|
esnap->ecode = err::kappe_the_bottom_of_the_device_has_water; |
|
|
esnap->ecode = err::kappe_the_bottom_of_the_device_has_water; |
|
|
onAppDisinfectionSnapshotEvent(esnap); |
|
|
onAppDisinfectionSnapshotEvent(esnap); |
|
|
onAppDisinfectionSnapshotEvent(selftest_createFakeSnapshot(time_point_increment(now, 10), DisinfectionState::finished, sensorNum, false)); |
|
|
onAppDisinfectionSnapshotEvent(selftest_createFakeSnapshot(time_point_increment(now, 10), DisinfectionState::finished, sensorNum, false)); |
|
|