Browse Source

update

storage-in-realtime
zhaohe 1 year ago
parent
commit
a0cfe48466
  1. 82
      protocol.md
  2. 8
      src/service/device_io_control_service_test.cpp

82
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 }
```

8
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;

Loading…
Cancel
Save