Browse Source

update

storage-in-realtime
zhaohe 1 year ago
parent
commit
1bfc8740d7
  1. 2
      README.md
  2. 3
      src/configs/project_setting.hpp
  3. 13
      src/service/device_io_control_service_test.cpp

2
README.md

@ -14,6 +14,8 @@
开始消毒 开始消毒
{"command":"startDisinfection","loglevel":12,"messageId":"startDisinfection","roomVolume":0} {"command":"startDisinfection","loglevel":12,"messageId":"startDisinfection","roomVolume":0}
{"command":"exportDisinfectionRecord","keys":["2024-0516-094233","2024-0516-092446","2024-0516-092339"],"messageId":"exportDisinfectionRecord"}
``` ```

3
src/configs/project_setting.hpp

@ -23,3 +23,6 @@
#define PROJECT_NAME "large_space_disinfection" #define PROJECT_NAME "large_space_disinfection"
#define MAX_H2O2_SENSOR_NUM (3) #define MAX_H2O2_SENSOR_NUM (3)
#endif #endif
#define MAX_DISINFECTIONLOGGER_FILE_NUM 5 // 最大日志文件数量
#define USER_BEHAVIOR_RECORD_DB_MAX_RECORDS 3000

13
src/service/device_io_control_service_test.cpp

@ -7,10 +7,15 @@ using namespace std;
void DeviceIoControlServiceTest::printerPrintf(string str) {} 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; }
/******************************************************************************* /*******************************************************************************
* * * *

Loading…
Cancel
Save