diff --git a/README.md b/README.md index 5f69a00..c50f521 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,8 @@ 开始消毒 {"command":"startDisinfection","loglevel":12,"messageId":"startDisinfection","roomVolume":0} + +{"command":"exportDisinfectionRecord","keys":["2024-0516-094233","2024-0516-092446","2024-0516-092339"],"messageId":"exportDisinfectionRecord"} ``` diff --git a/src/configs/project_setting.hpp b/src/configs/project_setting.hpp index ec994a5..b3d32bd 100644 --- a/src/configs/project_setting.hpp +++ b/src/configs/project_setting.hpp @@ -23,3 +23,6 @@ #define PROJECT_NAME "large_space_disinfection" #define MAX_H2O2_SENSOR_NUM (3) #endif + +#define MAX_DISINFECTIONLOGGER_FILE_NUM 5 // 最大日志文件数量 +#define USER_BEHAVIOR_RECORD_DB_MAX_RECORDS 3000 diff --git a/src/service/device_io_control_service_test.cpp b/src/service/device_io_control_service_test.cpp index 31c9654..da3ec5c 100644 --- a/src/service/device_io_control_service_test.cpp +++ b/src/service/device_io_control_service_test.cpp @@ -7,10 +7,15 @@ using namespace std; void DeviceIoControlServiceTest::printerPrintf(string str) {} -int32_t DeviceIoControlServiceTest::H2O2Sensor_readH2O2PPM(int32_t sensorid) { return rand() % 1000; } -int32_t DeviceIoControlServiceTest::H2O2Sensor_readHumid(int32_t sensorid) { return rand() % 100; } -int32_t DeviceIoControlServiceTest::H2O2Sensor_readTemperature(int32_t sensorid) { return rand() % 100; } -int32_t DeviceIoControlServiceTest::H2O2Sensor_readSaturation(int32_t sensorid) { return rand() % 100; } +int32_t DeviceIoControlServiceTest::H2O2Sensor_readH2O2PPM(int32_t sensorid) { return 300 + rand() % 1000; } +int32_t DeviceIoControlServiceTest::H2O2Sensor_readHumid(int32_t sensorid) { return 20 + rand() % 30; } +int32_t DeviceIoControlServiceTest::H2O2Sensor_readTemperature(int32_t sensorid) { return rand() % 30; } +int32_t DeviceIoControlServiceTest::H2O2Sensor_readSaturation(int32_t sensorid) { return 50 + rand() % 30; } + +// int32_t DeviceIoControlServiceTest::H2O2Sensor_readH2O2PPM(int32_t sensorid) { return 1; } +// int32_t DeviceIoControlServiceTest::H2O2Sensor_readHumid(int32_t sensorid) { return 2; } +// int32_t DeviceIoControlServiceTest::H2O2Sensor_readTemperature(int32_t sensorid) { return 3; } +// int32_t DeviceIoControlServiceTest::H2O2Sensor_readSaturation(int32_t sensorid) { return 4; } /******************************************************************************* * 加热片控制 *