Browse Source

VERSION 1.1.8

storage-in-realtime
zhaohe 11 months ago
parent
commit
d4a69cb549
  1. 3
      README.md
  2. 2
      appsrc/appsetting/project_port/basic/zappversion.hpp
  3. 4
      appsrc/service/app/disinfection_ctrl/disinfection_ctrl_service.cpp
  4. 1
      appsrc/service/app/disinfection_ctrl/disinfection_ctrl_service.hpp
  5. 7
      appsrc/service/app/disinfection_ctrl_service_ext.cpp
  6. 3
      appsrc/service/app/disinfection_ctrl_service_ext.hpp
  7. 21
      build.sh

3
README.md

@ -71,6 +71,9 @@ VERSION 1.1.7
1. 修复配方更新接口BUG 1. 修复配方更新接口BUG
2. 修改ackinfo 为 message 2. 修改ackinfo 为 message
VERSION 1.1.8
1. 增加运行时修改loggerlevel的功能
TODO: TODO:
添加用户增加用户查重检查 添加用户增加用户查重检查

2
appsrc/appsetting/project_port/basic/zappversion.hpp

@ -1,3 +1,3 @@
#pragma once #pragma once
#define VERSION "1.1.7"
#define VERSION "1.1.8"
#define PROJECT_NAME "TRANSMIT_DM" #define PROJECT_NAME "TRANSMIT_DM"

4
appsrc/service/app/disinfection_ctrl/disinfection_ctrl_service.cpp

@ -110,6 +110,10 @@ bool DisinfectionCtrlService::isTimeToResumeDisinfection() {
return false; return false;
} }
void DisinfectionCtrlService::updateTargetLogLevel(float loglevel) { //
logger->info("updateTargetLogLevel:{}", loglevel);
m_tlog = loglevel;
}
void DisinfectionCtrlService::initialize() { void DisinfectionCtrlService::initialize() {
GET_TO_SERVICE(db); GET_TO_SERVICE(db);

1
appsrc/service/app/disinfection_ctrl/disinfection_ctrl_service.hpp

@ -83,6 +83,7 @@ class DisinfectionCtrlService : public enable_shared_from_this<DisinfectionCtrlS
void checkBeforeStart(); void checkBeforeStart();
void stop(); void stop();
void updateCfg(); void updateCfg();
void updateTargetLogLevel(float loglevel);
map<string, string>& getRealtimeCfg() { return m_realtimeCfg; } map<string, string>& getRealtimeCfg() { return m_realtimeCfg; }
DisinfectionState getState() { return sm.getState(); } DisinfectionState getState() { return sm.getState(); }

7
appsrc/service/app/disinfection_ctrl_service_ext.cpp

@ -47,11 +47,11 @@ void DisinfectionCtrlServiceExt::initialize() {
REG_EXTFN_VOID(stop, void()); REG_EXTFN_VOID(stop, void());
REG_EXTFN_VOID(getState, void()); REG_EXTFN_VOID(getState, void());
REG_EXTFN_VOID(getRealtimeConfig, void()); REG_EXTFN_VOID(getRealtimeConfig, void());
REG_EXTFN(setRealtimeConfig, void(string, string), key, val);
REG_EXTFN(setRealtimeConfig, void(SettingId, string), key, val);
REG_EXTFN(updateTargetLogLevel, void(float), loglevel);
REG_EXTFN_VOID(getServiceConfig, void()); REG_EXTFN_VOID(getServiceConfig, void());
REG_EXTFN_VOID(startStateReport, void()); REG_EXTFN_VOID(startStateReport, void());
REG_EXTFN_VOID(stopStateReport, void()); REG_EXTFN_VOID(stopStateReport, void());
} }
void DisinfectionCtrlServiceExt::start(shared_ptr<MsgProcessContext> cxt, string loglevel) { void DisinfectionCtrlServiceExt::start(shared_ptr<MsgProcessContext> cxt, string loglevel) {
@ -76,6 +76,9 @@ void DisinfectionCtrlServiceExt::getRealtimeConfig(shared_ptr<MsgProcessContext>
rely[cfg.first] = cfg.second; rely[cfg.first] = cfg.second;
} }
} }
void DisinfectionCtrlServiceExt::updateTargetLogLevel(shared_ptr<MsgProcessContext> cxt, float loglevel) { dcs->updateTargetLogLevel(loglevel); }
void DisinfectionCtrlServiceExt::setRealtimeConfig(shared_ptr<MsgProcessContext> cxt, string key, string val) { void DisinfectionCtrlServiceExt::setRealtimeConfig(shared_ptr<MsgProcessContext> cxt, string key, string val) {
logger->info("setRealtimeConfig key:{} val:{}", key, val); logger->info("setRealtimeConfig key:{} val:{}", key, val);
dcs->getRealtimeCfg()[key] = val; dcs->getRealtimeCfg()[key] = val;

3
appsrc/service/app/disinfection_ctrl_service_ext.hpp

@ -44,6 +44,8 @@ class DisinfectionCtrlServiceExt : public enable_shared_from_this<DisinfectionCt
void getRealtimeConfig(shared_ptr<MsgProcessContext> cxt); void getRealtimeConfig(shared_ptr<MsgProcessContext> cxt);
void setRealtimeConfig(shared_ptr<MsgProcessContext> cxt, string key, string val); void setRealtimeConfig(shared_ptr<MsgProcessContext> cxt, string key, string val);
void updateTargetLogLevel(shared_ptr<MsgProcessContext> cxt, float loglevel);
/******************************************************************************* /*******************************************************************************
* * * *
*******************************************************************************/ *******************************************************************************/
@ -53,7 +55,6 @@ class DisinfectionCtrlServiceExt : public enable_shared_from_this<DisinfectionCt
void stopStateReport(shared_ptr<MsgProcessContext> cxt); void stopStateReport(shared_ptr<MsgProcessContext> cxt);
json getState(DisinfectionState& state); json getState(DisinfectionState& state);
}; };
} // namespace iflytop } // namespace iflytop

21
build.sh

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# #
# ./build.sh
# ./build.sh
# #
# PROJECT_TYPE_LARGE_SPACE_DISINFECTION # PROJECT_TYPE_LARGE_SPACE_DISINFECTION
# PROJECT_TYPE_SMALL_SPACE_DISINFECTION # PROJECT_TYPE_SMALL_SPACE_DISINFECTION
@ -10,11 +10,16 @@
# #
mkdir -p build && rm -rf build && mkdir -p build mkdir -p build && rm -rf build && mkdir -p build
cd build
cmake .. \
-DCMAKE_C_COMPILER='aarch64-linux-gnu-gcc' \
-DCMAKE_CXX_COMPILER='aarch64-linux-gnu-g++' \
-DARCH=aarch64 \
function build_target() {
cd build
cmake .. \
-DCMAKE_C_COMPILER='aarch64-linux-gnu-gcc' \
-DCMAKE_CXX_COMPILER='aarch64-linux-gnu-g++' \
-DARCH=aarch64
make -j8
make install
make -j8
make install
}
build_target
build_target #之所以执行两遍,是因为执行一边生成不了compile.json文件,导致vscode无法跳转到定义,原因未知
Loading…
Cancel
Save