|
@ -77,14 +77,14 @@ void DisinfectionCtrlServiceExt::start(shared_ptr<MsgProcessContext> cxt, string |
|
|
// 从setting中获取实时参数
|
|
|
// 从setting中获取实时参数
|
|
|
int level = atoi(loglevel.c_str()); |
|
|
int level = atoi(loglevel.c_str()); |
|
|
dcs->start(level); |
|
|
dcs->start(level); |
|
|
ADD_USER_BEHAVIOR(ds->getLoginName(), fmt::format("开始消毒Log{}", level)); |
|
|
|
|
|
|
|
|
ADD_USER_BEHAVIOR(ds->getLoginName(), fmt::format("开始消毒 Log{}", level)); |
|
|
// m_state = DisinfectionState::preheat;
|
|
|
// m_state = DisinfectionState::preheat;
|
|
|
if (stateUpdateThread) stateUpdateThread->wake(); |
|
|
if (stateUpdateThread) stateUpdateThread->wake(); |
|
|
} |
|
|
} |
|
|
void DisinfectionCtrlServiceExt::startWithFormula(shared_ptr<MsgProcessContext> cxt, string formulaid) { //
|
|
|
void DisinfectionCtrlServiceExt::startWithFormula(shared_ptr<MsgProcessContext> cxt, string formulaid) { //
|
|
|
json formula = dcs->startWithFormula(formulaid); |
|
|
json formula = dcs->startWithFormula(formulaid); |
|
|
string logLevel = formula[SettingId::toString(SettingId::kloglevel)]; |
|
|
string logLevel = formula[SettingId::toString(SettingId::kloglevel)]; |
|
|
ADD_USER_BEHAVIOR(ds->getLoginName(), fmt::format("启动配置方{}Log{}", formula["name"], logLevel)); |
|
|
|
|
|
|
|
|
ADD_USER_BEHAVIOR(ds->getLoginName(), fmt::format("启动配方 {}, Log{}", formula["name"], logLevel)); |
|
|
if (stateUpdateThread) stateUpdateThread->wake(); |
|
|
if (stateUpdateThread) stateUpdateThread->wake(); |
|
|
} |
|
|
} |
|
|
void DisinfectionCtrlServiceExt::stop(shared_ptr<MsgProcessContext> cxt) { |
|
|
void DisinfectionCtrlServiceExt::stop(shared_ptr<MsgProcessContext> cxt) { |
|
@ -103,7 +103,7 @@ void DisinfectionCtrlServiceExt::getRealtimeConfig(shared_ptr<MsgProcessContext> |
|
|
void DisinfectionCtrlServiceExt::updateTargetLogLevel(shared_ptr<MsgProcessContext> cxt, float loglevel) { |
|
|
void DisinfectionCtrlServiceExt::updateTargetLogLevel(shared_ptr<MsgProcessContext> cxt, float loglevel) { |
|
|
auto tLog = dcs->getTlog(); |
|
|
auto tLog = dcs->getTlog(); |
|
|
dcs->updateTargetLogLevel(loglevel); |
|
|
dcs->updateTargetLogLevel(loglevel); |
|
|
ADD_USER_BEHAVIOR(ds->getLoginName(), fmt::format("实时修改LOG{}->{}", int(tLog + 0.5), (int)(loglevel + 0.5))); |
|
|
|
|
|
|
|
|
ADD_USER_BEHAVIOR(ds->getLoginName(), fmt::format("实时修改 Log{}->Log{}", int(tLog + 0.5), (int)(loglevel + 0.5))); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void DisinfectionCtrlServiceExt::setRealtimeConfig(shared_ptr<MsgProcessContext> cxt, string key, string val) { |
|
|
void DisinfectionCtrlServiceExt::setRealtimeConfig(shared_ptr<MsgProcessContext> cxt, string key, string val) { |
|
|