|
|
@ -45,26 +45,31 @@ typedef enum { |
|
|
|
} packet_type_t; |
|
|
|
|
|
|
|
typedef enum { |
|
|
|
kMainBoard = 0, // 主机
|
|
|
|
kBoardType_LiquidCtrl = 2, // 液路板
|
|
|
|
kBoardType_PowerControl = 3, // 电源板
|
|
|
|
kBoardType_PowerControlMiniBoard = 4, // 电源控制Mini板,用于拉杆箱箱消毒机
|
|
|
|
kBoardType_ExtBallValveCtrl = 5, // 外部球阀控制板
|
|
|
|
kBoardType_H2O2Sensor = 6, // H2O2传感器板
|
|
|
|
klarge_space_disinfection_machine = 1, // 大空间消毒机
|
|
|
|
ksmall_space_disinfection_machine = 2, // 小空间消毒机
|
|
|
|
kpipe_disinfection_machine = 3, // 管道式消毒机
|
|
|
|
kdraw_bar_disinfection_box = 4, // 手持拉杆箱消毒机
|
|
|
|
kh2o2_ext_sensor = 5, // 外部H2O2传感器
|
|
|
|
} ProjID_t; |
|
|
|
|
|
|
|
typedef enum { |
|
|
|
kBoardType_LiquidCtrl = 1, // 液路板
|
|
|
|
kBoardType_PowerControl = 2, // 电源板
|
|
|
|
kBoardType_PowerControlMiniBoard = 3, // 电源控制Mini板,用于拉杆箱箱消毒机
|
|
|
|
kBoardType_ExtBallValveCtrl = 4, // 外部球阀控制板
|
|
|
|
kBoardType_H2O2Sensor = 5, // H2O2传感器板
|
|
|
|
} BoardType_t; |
|
|
|
|
|
|
|
typedef enum { |
|
|
|
kFixBoardId_MainBoard = 1, // 主机
|
|
|
|
kFixBoardId_LiquidCtrl = 2, // 液路板
|
|
|
|
kFixBoardId_PowerControl = 3, // 电源板
|
|
|
|
kFixBoardId_PowerControlMiniBoard = 4, // 电源控制Mini板,用于拉杆箱箱消毒机
|
|
|
|
kFixBoardId_ExtBallValveCtrl = 5, // 外部球阀控制板
|
|
|
|
kFixBoardId_H2O2SensorStart = 100, // H2O2传感器板
|
|
|
|
} FixBoardId_t; |
|
|
|
kFixBoardId_MainBoard = 1, // 主机
|
|
|
|
kFixBoardId_LiquidCtrl = 2, // 液路板
|
|
|
|
kFixBoardId_PowerControl = 3, // 电源板
|
|
|
|
kFixBoardId_ExtBallValveCtrl = 4, // 外部球阀控制板
|
|
|
|
kFixBoardId_H2O2SensorStart = 100, // H2O2传感器板
|
|
|
|
} BoardId_t; |
|
|
|
|
|
|
|
static inline const char *BoardTypeToString(uint32_t type) { |
|
|
|
switch (type) { |
|
|
|
case kMainBoard: |
|
|
|
return "MainBoard"; |
|
|
|
case kBoardType_LiquidCtrl: |
|
|
|
return "LiquidCtrl"; |
|
|
|
case kBoardType_PowerControl: |
|
|
@ -80,14 +85,6 @@ static inline const char *BoardTypeToString(uint32_t type) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
typedef enum { |
|
|
|
klarge_space_disinfection_machine = 1, // 大空间消毒机
|
|
|
|
ksmall_space_disinfection_machine = 2, // 小空间消毒机
|
|
|
|
kpipe_disinfection_machine = 3, // 管道式消毒机
|
|
|
|
kdraw_bar_disinfection_box = 4, // 手持拉杆箱消毒机
|
|
|
|
kh2o2_ext_sensor = 5, // 外部H2O2传感器
|
|
|
|
} ProjectID_t; |
|
|
|
|
|
|
|
static inline const char *ProjectIDToString(uint32_t id) { |
|
|
|
switch (id) { |
|
|
|
case klarge_space_disinfection_machine: |
|
|
@ -167,12 +164,12 @@ typedef enum { |
|
|
|
/***********************************************************************************************************************
|
|
|
|
* 板子基本操作 * |
|
|
|
***********************************************************************************************************************/ |
|
|
|
kcmd_read_board_info = 1, // cmd:no, ack:ack_read_board_info_data_t
|
|
|
|
kcmd_force_report = 2, // cmd:no, ack:none //!delete
|
|
|
|
kcmd_read_sysinfo = 3, // cmd:no, ack:ack_sysinfo_t
|
|
|
|
kcmd_read_taskinfo = 4, // cmd:taskoff, ack:ask_taskinfo_t
|
|
|
|
kcmd_heart_ping = 5, // cmd:pingindex, ack:ask_taskinfo_t
|
|
|
|
kcmd_clear_reset_flag = 6, // cmd:taskoff, ack:ask_taskinfo_t
|
|
|
|
kfn_read_board_info = 1, // cmd:no, ack:ack_read_board_info_data_t
|
|
|
|
kfn_force_report = 2, // cmd:no, ack:none //!delete
|
|
|
|
kfn_read_sysinfo = 3, // cmd:no, ack:ack_sysinfo_t
|
|
|
|
kfn_read_taskinfo = 4, // cmd:taskoff, ack:ask_taskinfo_t
|
|
|
|
kfn_heart_ping = 5, // cmd:pingindex, ack:ask_taskinfo_t
|
|
|
|
kfn_clear_reset_flag = 6, // cmd:taskoff, ack:ask_taskinfo_t
|
|
|
|
kreport_heatpacket_pong = 50, // cmd:no ack:no report:heatpacket_t
|
|
|
|
kreport_exception_error = 51, // report:error_code,subid
|
|
|
|
|
|
|
@ -188,14 +185,14 @@ typedef enum { |
|
|
|
* 设置ihold,irun,idelay |
|
|
|
* |
|
|
|
*/ |
|
|
|
kcmd_pump_rotate = 100, // cmd: index rpm ack:none
|
|
|
|
kcmd_pump_stop = 101, // cmd: index rpm ack:none
|
|
|
|
kcmd_pump_set_ihold_irun_idelay = 102, // cmd: index irun,ihold,idelay ack:none
|
|
|
|
kcmd_pump_set_acc = 104, // cmd: index acc ack:none
|
|
|
|
kcmd_pump_ping = 105, // cmd: index, ack:none
|
|
|
|
kfn_pump_rotate = 100, // cmd: index rpm ack:none
|
|
|
|
kfn_pump_stop = 101, // cmd: index rpm ack:none
|
|
|
|
kfn_pump_set_ihold_irun_idelay = 102, // cmd: index irun,ihold,idelay ack:none
|
|
|
|
kfn_pump_set_acc = 104, // cmd: index acc ack:none
|
|
|
|
kfn_pump_ping = 105, // cmd: index, ack:none
|
|
|
|
|
|
|
|
kcmd_pump_set_subic_reg = 110, // cmd: index,val ack:none
|
|
|
|
kcmd_pump_get_subic_reg = 111, // cmd: index, ack:val
|
|
|
|
kfn_pump_set_subic_reg = 110, // cmd: index,val ack:none
|
|
|
|
kfn_pump_get_subic_reg = 111, // cmd: index, ack:val
|
|
|
|
|
|
|
|
/***********************************************************************************************************************
|
|
|
|
* 喷液MINI真空泵 * |
|
|
@ -204,7 +201,7 @@ typedef enum { |
|
|
|
* @brief Spray liquid mini air compressor |
|
|
|
* 打开/关闭 |
|
|
|
*/ |
|
|
|
kcmd_sl_mini_ac_ctrl = 200, // cmd: power(0-100)
|
|
|
|
kfn_sl_mini_ac_ctrl = 200, // cmd: power(0-100)
|
|
|
|
|
|
|
|
/***********************************************************************************************************************
|
|
|
|
* 气密性测试MINI真空泵 * |
|
|
@ -214,14 +211,14 @@ typedef enum { |
|
|
|
* 打开/关闭 |
|
|
|
* 电流上报 |
|
|
|
*/ |
|
|
|
kcmd_atta_mini_air_compressor_ctrl = 300, // cmd: power(0-100)
|
|
|
|
kfn_atta_mini_air_compressor_ctrl = 300, // cmd: power(0-100)
|
|
|
|
|
|
|
|
/***********************************************************************************************************************
|
|
|
|
* 压力传感器数据上报 * |
|
|
|
***********************************************************************************************************************/ |
|
|
|
kcmd_pressure_sensor_bus_read_data = 400, // cmd:subid ack:pressure(0.1pa)
|
|
|
|
kcmd_pressure_sensor_bus_set_report_period_ms = 401, // cmd:period
|
|
|
|
kreport_pressure_data = 450, // report:subid pressure(0.1pa)
|
|
|
|
kfn_pressure_sensor_bus_read_data = 400, // cmd:subid ack:pressure(0.1pa)
|
|
|
|
kfn_pressure_sensor_bus_set_report_period_ms = 401, // cmd:period
|
|
|
|
kreport_pressure_data = 450, // report:subid pressure(0.1pa)
|
|
|
|
|
|
|
|
/***********************************************************************************************************************
|
|
|
|
* MINI_PWM风机控制 * |
|
|
@ -232,8 +229,8 @@ typedef enum { |
|
|
|
* 安全继电器控制 |
|
|
|
* 电流上报 |
|
|
|
*/ |
|
|
|
kcmd_mini_pwm_blower_ctrl = 500, // cmd: speed(0-100)
|
|
|
|
kcmd_mini_pwm_blower_read_fbcount = 501, // cmd: valve_state
|
|
|
|
kfn_mini_pwm_blower_ctrl = 500, // cmd: speed(0-100)
|
|
|
|
kfn_mini_pwm_blower_read_fbcount = 501, // cmd: valve_state
|
|
|
|
|
|
|
|
/***********************************************************************************************************************
|
|
|
|
* 加热片控制 * |
|
|
@ -247,46 +244,46 @@ typedef enum { |
|
|
|
* 电流上报 |
|
|
|
* 温度上报 |
|
|
|
*/ |
|
|
|
kcmd_heater_ctrl = 600, // cmd: power(0-100)
|
|
|
|
kcmd_heater_ctrl_safe_valve = 601, // cmd: valve_state
|
|
|
|
kcmd_heater_read_electric_current = 602, // report:electric_current(ma)
|
|
|
|
kcmd_heater_read_temperature_data = 603, // report:temperature(0.01)
|
|
|
|
kfn_heater_ctrl = 600, // cmd: power(0-100)
|
|
|
|
kfn_heater_ctrl_safe_valve = 601, // cmd: valve_state
|
|
|
|
kfn_heater_read_electric_current = 602, // report:electric_current(ma)
|
|
|
|
kfn_heater_read_temperature_data = 603, // report:temperature(0.01)
|
|
|
|
|
|
|
|
/***********************************************************************************************************************
|
|
|
|
* H2O2传感器数值上报 * |
|
|
|
***********************************************************************************************************************/ |
|
|
|
kcmd_h2o2_sensor_read_calibration_date = 700, // cmd:subid ack:year,month,day
|
|
|
|
kcmd_h2o2_sensor_read_sub_ic_errorcode = 701, // cmd:subid ack:errorcode
|
|
|
|
kcmd_h2o2_sensor_read_sub_ic_reg = 702, // cmd:subid,reg,num ack:errorcode
|
|
|
|
kreport_h2o2_sensor_data = 750, // report:subid h2o2_sensor_data
|
|
|
|
kfn_h2o2_sensor_read_calibration_date = 700, // cmd:subid ack:year,month,day
|
|
|
|
kfn_h2o2_sensor_read_sub_ic_errorcode = 701, // cmd:subid ack:errorcode
|
|
|
|
kfn_h2o2_sensor_read_sub_ic_reg = 702, // cmd:subid,reg,num ack:errorcode
|
|
|
|
kreport_h2o2_sensor_data = 750, // report:subid h2o2_sensor_data
|
|
|
|
|
|
|
|
/***********************************************************************************************************************
|
|
|
|
* 报警指示灯控制 * |
|
|
|
***********************************************************************************************************************/ |
|
|
|
kcmd_triple_warning_light_ctl = 800, // cmd: r,g,b,warning
|
|
|
|
kfn_triple_warning_light_ctl = 800, // cmd: r,g,b,warning
|
|
|
|
|
|
|
|
/***********************************************************************************************************************
|
|
|
|
* 水浸传感器 * |
|
|
|
***********************************************************************************************************************/ |
|
|
|
|
|
|
|
kcmd_evaporation_bin_water_sensor_read_state = 900, // cmd: state
|
|
|
|
kcmd_device_bottom_water_sensor_read_state = 901, // cmd: state
|
|
|
|
kreport_evaporation_bin_water_sensor = 950, // report:state //蒸发仓水浸 //report_evaporation_bin_water_sensor_data_t
|
|
|
|
kreport_device_bottom_water_sensor = 951, // report:state //设备底部水浸 //report_device_bottom_water_sensor_data
|
|
|
|
kfn_evaporation_bin_water_sensor_read_state = 900, // cmd: state
|
|
|
|
kfn_device_bottom_water_sensor_read_state = 901, // cmd: state
|
|
|
|
kreport_evaporation_bin_water_sensor = 950, // report:state //蒸发仓水浸 //report_evaporation_bin_water_sensor_data_t
|
|
|
|
kreport_device_bottom_water_sensor = 951, // report:state //设备底部水浸 //report_device_bottom_water_sensor_data
|
|
|
|
|
|
|
|
/***********************************************************************************************************************
|
|
|
|
* 鼓风机控制 * |
|
|
|
***********************************************************************************************************************/ |
|
|
|
kcmd_blower_ctrl = 1000, // cmd: power(0-100)
|
|
|
|
kcmd_blower_ctrl_safe_valve = 1001, // cmd: valve_state
|
|
|
|
kcmd_blower_read_electric_current = 1002, // report:electric_current(ma)
|
|
|
|
kfn_blower_ctrl = 1000, // cmd: power(0-100)
|
|
|
|
kfn_blower_ctrl_safe_valve = 1001, // cmd: valve_state
|
|
|
|
kfn_blower_read_electric_current = 1002, // report:electric_current(ma)
|
|
|
|
|
|
|
|
/***********************************************************************************************************************
|
|
|
|
* 空压机 * |
|
|
|
***********************************************************************************************************************/ |
|
|
|
kcmd_air_compressor_ctrl = 1100, // cmd: power(0-100)
|
|
|
|
kcmd_air_compressor_ctrl_safe_valve = 1101, // cmd: valve_state
|
|
|
|
kcmd_air_compressor_read_electric_current = 1102, // report:electric_current(ma)
|
|
|
|
kfn_air_compressor_ctrl = 1100, // cmd: power(0-100)
|
|
|
|
kfn_air_compressor_ctrl_safe_valve = 1101, // cmd: valve_state
|
|
|
|
kfn_air_compressor_read_electric_current = 1102, // report:electric_current(ma)
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
/***********************************************************************************************************************
|
|
|
@ -302,7 +299,7 @@ typedef enum { |
|
|
|
* @brief 电磁阀控制 |
|
|
|
* 打开/关闭 |
|
|
|
*/ |
|
|
|
kcmd_electromagnetic_valve_ctrl = 900, // cmd: valve_state
|
|
|
|
kfn_electromagnetic_valve_ctrl = 900, // cmd: valve_state
|
|
|
|
|
|
|
|
/***********************************************************************************************************************
|
|
|
|
* 球阀控制 * |
|
|
@ -312,7 +309,7 @@ typedef enum { |
|
|
|
* @brief 电磁阀控制 |
|
|
|
* 打开/关闭 |
|
|
|
*/ |
|
|
|
kcmd_ball_valve_ctrl = 1000, // cmd: valve_state
|
|
|
|
kfn_ball_valve_ctrl = 1000, // cmd: valve_state
|
|
|
|
|
|
|
|
/***********************************************************************************************************************
|
|
|
|
* 比例阀控制 * |
|
|
@ -324,7 +321,7 @@ typedef enum { |
|
|
|
* 比例阀当前比例上报 |
|
|
|
*/ |
|
|
|
|
|
|
|
kcmd_proportional_valve_ctrl = 1100, // cmd: subid valve_state(0->100)
|
|
|
|
kfn_proportional_valve_ctrl = 1100, // cmd: subid valve_state(0->100)
|
|
|
|
kreport_proportional_valve_value = 1150, // cmd: subid valve_state(0->100)
|
|
|
|
|
|
|
|
/***********************************************************************************************************************
|
|
|
|