From a0cfe4846634b8eb5cbbc2c9793bc7b7eb102d5f Mon Sep 17 00:00:00 2001 From: zhaohe Date: Fri, 17 May 2024 18:44:22 +0800 Subject: [PATCH] update --- protocol.md | 82 ++++++++++++++++++++++++++ src/service/device_io_control_service_test.cpp | 8 ++- 2 files changed, 88 insertions(+), 2 deletions(-) diff --git a/protocol.md b/protocol.md index 6e18a54..4148baa 100644 --- a/protocol.md +++ b/protocol.md @@ -17,4 +17,86 @@ ws://192.168.8.10:19001 {"command": "TestPage_WarningLightCtrl","r": 0,"g": 0,"b": 0,"w": 0} + +拉杆箱消毒剂 +-喷液泵转 +{ + "command": "DBDBTestPage__sprayLiquidPump_run", + "params":{ + "gpm":123 + } +} + + +-读取压力传感器(index == 1,2) +{ + "command": "DBDBTestPage__readPressureSensor", + "params":{ + "index":123 + } +} +{ "ack": { "pressure": 123 }, "ackcode": 0, "messageId": null, "timeStamp": 1715941946739 } + + +-喷液空压机控制 +{ + "command": "DBDBTestPage__sprayAirCompressorPowerCtrl", + "params":{ + "power":1 + } +} + +-气密性空压机-控制 +{ + "command": "DBDBTestPage__sprayAirCompressorPowerCtrl", + "params":{ + "power":1 + } +} + + +-加热空压机控制 +{ + "command": "DBDBTestPage__heaterCtrl", + "params":{ + "power":1 + } +} +-加热空压机安全电磁阀控制 +{ + "command": "DBDBTestPage__heaterCtrlSafeValve", + "params":{ + "power":1 + } +} +-加热片电流读取 +{ + "command": "DBDBTestPage__heaterReadElectricCurrent" +} +-加热片温度读取 +{ + "command": "DBDBTestPage__heaterReadTemperatureData" +} +{ "ack": { "temperature": 45 }, "ackcode": 0, "messageId": null, "timeStamp": 1715942093615 } + +-风机控制(0->100) +{ + "command": "DBDBTestPage__miniPwmBlowerCtrl", + "params":{ + "power100":90 + } +} + +-外部通道控制(可以选择通道},disinfectionChannel,dehumidificationChannel,degradationChannel) +{ + "command": "DBDBTestPage__extValveCtrl", + "params":{ + "channel":"disinfectionChannel" + } + +-外部电磁阀板是否在线 +{ + "command": "DBDBTestPage__extValBoardIsOnline" +} +{ "ack": { "isOnline": false }, "ackcode": 0, "messageId": null, "timeStamp": 1715942221499 } ``` \ No newline at end of file diff --git a/src/service/device_io_control_service_test.cpp b/src/service/device_io_control_service_test.cpp index 2dc13a4..0997b93 100644 --- a/src/service/device_io_control_service_test.cpp +++ b/src/service/device_io_control_service_test.cpp @@ -179,9 +179,13 @@ int32_t DeviceIoControlServiceTest::AirProportionalValve_isBusy(int32_t* isbusy) * 拉杆箱消毒机-喷液泵 * *******************************************************************************/ int32_t DBDB__sprayLiquidPump_state; -void DeviceIoControlServiceTest::DBDB__sprayLiquidPump_run(int gpm) { DBDB__sprayLiquidPump_state = 1; } +void DeviceIoControlServiceTest::DBDB__sprayLiquidPump_run(int gpm) { + logger->info("DBDB__sprayLiquidPump_run gpm:{}", gpm); + DBDB__sprayLiquidPump_state = 1; } -int32_t DeviceIoControlServiceTest::DBDB__readPressureSensor(int index) { return index; } +int32_t DeviceIoControlServiceTest::DBDB__readPressureSensor(int index) { + + return index; } int32_t DeviceIoControlServiceTest::DBDB__sprayAirCompressorPowerCtrl(int power) { logger->info("DBDB__sprayAirCompressorPowerCtrl power:{}", power); return 0;