|
|
@ -15,7 +15,6 @@ |
|
|
|
//
|
|
|
|
#include "app_protocols/transmit_disfection_protocol/transmit_disfection_protocol.hpp"
|
|
|
|
#include "appcomponents/canchannel/com/zscanprotocol_com.hpp"
|
|
|
|
#define DEFUALT_OVERTIME 500
|
|
|
|
|
|
|
|
namespace iflytop { |
|
|
|
using namespace std; |
|
|
@ -46,7 +45,7 @@ class TransmitDisinfectionCanMaster { |
|
|
|
void clearResetFlag(int to); |
|
|
|
void pingAllBoard(); |
|
|
|
void enableReport(int to, bool enable); |
|
|
|
void resetBoard(int to) { m_com->callcmd0(to, kfn_reset_board, DEFUALT_OVERTIME); } |
|
|
|
void resetBoard(int to) { m_com->callcmd0(to, kfn_reset_board); } |
|
|
|
|
|
|
|
void h2o2SensorReadCalibrationDate(int boardid, int32_t *year, int32_t *month, int32_t *day) { //
|
|
|
|
auto ret = m_com->callcmd0(boardid, kfn_h2o2_sensor_read_calibration_date); |
|
|
@ -54,7 +53,7 @@ class TransmitDisinfectionCanMaster { |
|
|
|
*month = ret->getContent(1); |
|
|
|
*day = ret->getContent(2); |
|
|
|
} |
|
|
|
int h2o2SensorReadSubIcErrorcode(int boardid) { return m_com->callcmd0(boardid, kfn_h2o2_sensor_read_sub_ic_errorcode, DEFUALT_OVERTIME)->getContent(0); } |
|
|
|
int h2o2SensorReadSubIcErrorcode(int boardid) { return m_com->callcmd0(boardid, kfn_h2o2_sensor_read_sub_ic_errorcode)->getContent(0); } |
|
|
|
uint8_t *h2o2SensorReadSubIcReg(int boardid, int reg, int num) { return m_com->callcmd2(boardid, kfn_h2o2_sensor_read_sub_ic_reg, reg, num)->getByte(); } |
|
|
|
|
|
|
|
/***********************************************************************************************************************
|
|
|
@ -68,7 +67,7 @@ class TransmitDisinfectionCanMaster { |
|
|
|
void pumpSetSubicReg(int boardid, int subid, int regadd, int val); |
|
|
|
int pumpGetSubicReg(int boardid, int subid, int regadd); |
|
|
|
void pumpPing(int32_t boardid); |
|
|
|
int32_t pumpIsRun(int boardid, int subid) { return m_com->callcmd1(boardid, kfn_pump_is_run, subid, DEFUALT_OVERTIME)->getContent(0); } |
|
|
|
int32_t pumpIsRun(int boardid, int subid) { return m_com->callcmd1(boardid, kfn_pump_is_run, subid)->getContent(0); } |
|
|
|
|
|
|
|
/***********************************************************************************************************************
|
|
|
|
* blower * |
|
|
@ -79,7 +78,7 @@ class TransmitDisinfectionCanMaster { |
|
|
|
int blowerReadEI(int boardid); |
|
|
|
int blowerReadEIAdcRaw(int boardid); |
|
|
|
int blowerReadElectricIsError(int boardid); |
|
|
|
int blowserIsOpen(int boardid) { return m_com->callcmd0(boardid, kfn_blower_is_open, DEFUALT_OVERTIME)->getContent(0); } |
|
|
|
int blowserIsOpen(int boardid) { return m_com->callcmd0(boardid, kfn_blower_is_open)->getContent(0); } |
|
|
|
|
|
|
|
/***********************************************************************************************************************
|
|
|
|
* air_compressor * |
|
|
@ -88,10 +87,10 @@ class TransmitDisinfectionCanMaster { |
|
|
|
void airCompressorCtrlSafeValve(int boardid, int valve_state); |
|
|
|
int airCompressorReadEI(int boardid); |
|
|
|
int airCompressorReadEIAdcRaw(int boardid); |
|
|
|
int airCompressorIsOpen(int boardid) { return m_com->callcmd0(boardid, kfn_air_compressor_is_open, DEFUALT_OVERTIME)->getContent(0); } |
|
|
|
int airCompressorIsOpen(int boardid) { return m_com->callcmd0(boardid, kfn_air_compressor_is_open)->getContent(0); } |
|
|
|
|
|
|
|
int airLeakDetectTestACCtrl(int boardid, int32_t val); |
|
|
|
int airLeakDetectTestACIsOpen(int boardid) { return m_com->callcmd0(boardid, kfn_air_leak_detect_ac_is_open, DEFUALT_OVERTIME)->getContent(0); } |
|
|
|
int airLeakDetectTestACIsOpen(int boardid) { return m_com->callcmd0(boardid, kfn_air_leak_detect_ac_is_open)->getContent(0); } |
|
|
|
|
|
|
|
/***********************************************************************************************************************
|
|
|
|
* heater * |
|
|
@ -102,7 +101,7 @@ class TransmitDisinfectionCanMaster { |
|
|
|
int heaterReadTemperature(int boardid); |
|
|
|
int heaterReadEIAdcRaw(int boardid); |
|
|
|
int heaterReadTemperatureAdcRaw(int boardid); |
|
|
|
int heaterIsOpen(int boardid) { return m_com->callcmd0(boardid, kfn_heater_is_open, DEFUALT_OVERTIME)->getContent(0); } |
|
|
|
int heaterIsOpen(int boardid) { return m_com->callcmd0(boardid, kfn_heater_is_open)->getContent(0); } |
|
|
|
|
|
|
|
void warningLightSetState(int boardid, int r, int g, int b, int warning); |
|
|
|
void warningLightReadState(int boardid, int *r, int *g, int *b, int *warning) { |
|
|
@ -118,24 +117,24 @@ class TransmitDisinfectionCanMaster { |
|
|
|
|
|
|
|
int32_t psBusReadData(int boardid, int subid); |
|
|
|
ack_psbus_scan_t psBusScan(int boardid); |
|
|
|
void psBusStartReport(int boardid, int period) { m_com->callcmd1(boardid, kfn_psbus_start_report, period, DEFUALT_OVERTIME); } |
|
|
|
void psBusStopReport(int boardid) { m_com->callcmd0(boardid, kfn_psbus_stop_report, DEFUALT_OVERTIME); } |
|
|
|
void psBusStartReport(int boardid, int period) { m_com->callcmd1(boardid, kfn_psbus_start_report, period); } |
|
|
|
void psBusStopReport(int boardid) { m_com->callcmd0(boardid, kfn_psbus_stop_report); } |
|
|
|
|
|
|
|
void proportionalSetValve(int boardid, int valveId, int valveValue) { m_com->callcmd2(boardid, kfn_proportional_set_valve, valveId, valveValue, DEFUALT_OVERTIME); } |
|
|
|
int proportionalReadPos(int boardid, int valveId) { return m_com->callcmd1(boardid, kfn_proportional_read_pos, valveId, DEFUALT_OVERTIME)->getContent(0); } |
|
|
|
int proportionalIsBusy(int boardid, int valveId) { return m_com->callcmd1(boardid, kfn_proportional_is_busy, valveId, DEFUALT_OVERTIME)->getContent(0); } |
|
|
|
void proportionalSetValve(int boardid, int valveId, int valveValue) { m_com->callcmd2(boardid, kfn_proportional_set_valve, valveId, valveValue); } |
|
|
|
int proportionalReadPos(int boardid, int valveId) { return m_com->callcmd1(boardid, kfn_proportional_read_pos, valveId)->getContent(0); } |
|
|
|
int proportionalIsBusy(int boardid, int valveId) { return m_com->callcmd1(boardid, kfn_proportional_is_busy, valveId)->getContent(0); } |
|
|
|
|
|
|
|
void airLeakDetectTestSetMode(int boardid, int mode) { m_com->callcmd1(boardid, kfn_air_leak_test_set_mode, mode, DEFUALT_OVERTIME); } |
|
|
|
int airLeakDetectTestGetMode(int boardid) { return m_com->callcmd0(boardid, kfn_air_leak_test_get_mode, DEFUALT_OVERTIME)->getContent(0); } |
|
|
|
void airLeakDetectTestSetMode(int boardid, int mode) { m_com->callcmd1(boardid, kfn_air_leak_test_set_mode, mode); } |
|
|
|
int airLeakDetectTestGetMode(int boardid) { return m_com->callcmd0(boardid, kfn_air_leak_test_get_mode)->getContent(0); } |
|
|
|
|
|
|
|
void extChSelectorSetCh(int boardid, int ch) { m_com->callcmd1(boardid, kfn_ext_ch_selector_set_ch, ch, DEFUALT_OVERTIME); } |
|
|
|
int extChSelectorGetCh(int boardid) { return m_com->callcmd0(boardid, kfn_ext_ch_selector_get_ch, DEFUALT_OVERTIME)->getContent(0); } |
|
|
|
void extChSelectorSetCh(int boardid, int ch) { m_com->callcmd1(boardid, kfn_ext_ch_selector_set_ch, ch); } |
|
|
|
int extChSelectorGetCh(int boardid) { return m_com->callcmd0(boardid, kfn_ext_ch_selector_get_ch)->getContent(0); } |
|
|
|
|
|
|
|
// cmd: state ,true打开进气阀,false关闭进气阀门 加液进气电磁阀(打开,可以正常加液排液,关闭后加液泵倒转可以排空管路
|
|
|
|
void setAddFluidChannelSelectorValve(int boardid, bool val) { m_com->callcmd1(boardid, kfn_set_add_fluid_channel_selector_valve, val, DEFUALT_OVERTIME); } |
|
|
|
void setAddFluidChannelSelectorValve(int boardid, bool val) { m_com->callcmd1(boardid, kfn_set_add_fluid_channel_selector_valve, val); } |
|
|
|
|
|
|
|
int liquidLevelReadIoState(int boardid) { |
|
|
|
auto receipt = m_com->callcmd1(boardid, kfn_disinfectant_bucket_level_sensor_read_level, DEFUALT_OVERTIME); |
|
|
|
auto receipt = m_com->callcmd0(boardid, kfn_disinfectant_bucket_level_sensor_read_level); |
|
|
|
return receipt->getContent(0); |
|
|
|
} |
|
|
|
}; |
|
|
|