You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

191 lines
10 KiB

#pragma once
#include <stdint.h>
#define CMDID(cmdid, cmdSubId) ((cmdid << 8) + cmdSubId)
#define NEW_CMDID(cmdid, cmdSubId) ((cmdid * 100) + cmdSubId)
namespace iflytop {
namespace zcr {
typedef enum {
#if 0
virtual int32_t board_reset() = 0;
#endif
kboard_reset = 0x0000, //{} {}
kevent_bus_reg_change_report = 0x0064, //{regindex,oldval,toval}
kmodule_ping = 0x0100, //{}{}
kmodule_get_status = 0x0104, //{}{int32_t}
kmodule_stop = 0x0101, //{}{}
kmodule_set_reg = 0x0105, //(int32_t index,int32_t val)->()
kmodule_get_reg = 0x0106, //(int32_t index)->(int32_t val)
kmodule_get_error = 0x010a, //
kmodule_clear_error = 0x010b, //
kmodule_active_cfg = 0x0110, //
kxymotor_enable = 0x0301, //
kxymotor_move_by = 0x0302, //
kxymotor_move_to = 0x0303, //
kxymotor_move_to_zero = 0x0304, //
kxymotor_read_pos = 0x0306, //
kxymotor_read_inio_index_in_stm32 = 0x0307, //
kxymotor_read_inio = 0x0308, //
kxymotor_set_pos = 0x0309, //
kxymotor_motor_move_by_direct = 0x030a, //
kxymotor_read_enc_direct = 0x030b, //
// kpipette_ctrl_init_device = 0x7201, // param:(void)
// kpipette_ctrl_put_tip = 0x7202, // param:(void)
// kpipette_ctrl_move_to_ul = 0x7203, // param:(int32_t ul)
// kpipette_lld_prepare = 0x7204, // param:(void)
// kpipette_plld = 0x7205, // param:(int32_t zdpos, int32_t p_threshold)
// kpipette_clld = 0x7206, // param:(int32_t zdpos, int32_t c_threshold)
// kpipette_mlld = 0x7207, // param:(int32_t zdpos, int32_t c_threshold, int32_t p_threshold)
// kpipette_lld_is_detect_liquid = 0x7208, // param:(void) ack(int32_t isdetect)
// kpipette_aspirate = 0x7209, // param:(int32_t ul)
// kpipette_distribut = 0x720a, // param:(int32_t ul)
// kpipette_shake_up = 0x720b, // param:(int32_t ul, int32_t times)
// kpipette_enable_zmotor = 0x7214, // param:(int32_t ul, int32_t zmotor_v)
// kpipette_write_cmd_direct = 0x7215, // param:(int32_t ul, int32_t zmotor_v)
// kpipette_get_sensor_sample_data = 0x7216, // param:(int32_t ul, int32_t zmotor_v, int32_t times)
// kpipette_get_sensor_sample_data_num = 0x7217, // para:{enable}, ack:{}
// kpipette_sensor_sample_data_report = 0x7232, // para:{strbuf}, ack:{strbuf}
// kpipette_aspirate_llf = 0x720c, // para:{index} , ack:{motor_pos,cval,pval}
// kpipette_distribut_llf = 0x720d, // para:{} , ack:{num}
// kpipette_shake_up_llf = 0x720e, // val{regindex, oldval, toval}
ka8000_optical_module_power_ctrl = 0x0600, //
ka8000_optical_open_laser = 0x0601, //
ka8000_optical_close_laser = 0x0602, //
ka8000_optical_set_laster_gain = 0x0603, //
ka8000_optical_set_scan_amp_gain = 0x0604, //
ka8000_optical_read_scanner_adc_val = 0x0605, //
ka8000_optical_read_laster_adc_val = 0x0606, //
ka8000_optical_scan_current_point_amp_adc_val = 0x0607, //
ka8000_optical_start_capture = 0x0608, //
ka8000_optical_read_raw = 0x0609, //
ka8k_opt_v2_t_start_scan = 0x0700, //(int32_t scanDirection, int32_t lasterGain,int32_t scanGain)
ka8k_opt_v2_f_start_scan = 0x0701, //(int32_t scanDirection, int32_t lasterGain,int32_t scanGain)
ka8k_opt_v2_t_open_laster = 0x070a, //(int32_t lasterGain,int32_t scanGain) for_debug
ka8k_opt_v2_t_close_laster = 0x070b, //() for_debug
ka8k_opt_v2_t_readVal = 0x070c, //(int32_t *val0,int32_t *val1) for_debug
ka8k_opt_v2_f_open_laster = 0x070d, //(int32_t lasterGain,int32_t scanGain) for_debug
ka8k_opt_v2_f_close_laster = 0x070e, //() for_debug
ka8k_opt_v2_f_readVal = 0x070f, //(int32_t *val0,int32_t *val1) for_debug
kstep_motor_enable = 0x0201, //
kstep_motor_read_pos = 0x020b, //
kstep_motor_easy_rotate = 0x0211, //
kstep_motor_easy_move_by = 0x0212, //
kstep_motor_easy_move_to = 0x0213, //
kstep_motor_easy_move_to_zero = 0x0214, //
kstep_motor_easy_set_current_pos = 0x0215, //
kstep_motor_easy_move_to_io = 0x0216, //
kstep_motor_stop = 0x0228, //
kstep_motor_active_cfg = 0x0229, //
kstep_motor_read_io_state = 0x022a, //
kstep_motor_easy_move_to_end_point = 0x022c, //
kstep_motor_read_tmc5130_status = 0x0232, //
kstep_motor_read_tmc5130_state = 0x0233, //
kstep_motor_read_io_index_in_stm32 = 0x0238, //
kstep_motor_set_subdevice_reg = 0x0239, //
kstep_motor_get_subdevice_reg = 0x023a, //
kstep_motor_easy_reciprocating_motion = 0x022d, //
kstep_motor_easy_move_to_zero_point_quick = 0x022e, //
kmini_servo_enable = 0x6601, //
kmini_servo_read_pos = 0x6602, //
kmini_servo_active_cfg = 0x6603, //
kmini_servo_stop = 0x6604, //
kmini_servo_set_mid_point = 0x6607, //
kmini_servo_read_io_state = 0x6608, //
kmini_servo_move_to = 0x6609, //
kmini_servo_rotate = 0x660a, //
kmini_servo_rotate_with_torque = 0x660b, //
kmini_servo_set_cur_pos = 0x660c, //
kextboard_read_inio = 0x6701, // para:{index}, ack:{state}
kextboard_write_outio = 0x6702, // para:{index,state}, ack:{}
kextboard_read_muti_inio = 0x6703, // para:{}, ack:{states}
kextboard_read_inio_index_in_stm32 = 0x6704, // para:{index}, ack:{index_in_stm32}
kextboard_read_outio_index_in_stm32 = 0x6705, // para:{index}, ack:{index_in_stm32}
kextboard_read_outio = 0x6706, // para:{index}, ack:{state}
kcode_scaner_start_scan = 0x6801, // para:{}, ack:{}
kcode_scaner_stop_scan = 0x6802, // para:{}, ack:{}
kcode_scaner_result_is_ready = 0x6803, // para:{}, ack:{}
kcode_scaner_read_scaner_result = 0x6804, // para:{}, ack:{X}
kcode_scaner_get_result_length = 0x6805, // para:{}, ack:{X}
kfan_controler_set_speed = 0x6900, //
ktemp_controler_start_hearting = 0x7000, //
ktemp_controler_stop_hearting = 0x7001, //
ktemp_controler_set_peltier_power_level = 0x7002, //
ktemp_controler_set_pump_level = 0x7003, //
ktemp_controler_set_fan_level = 0x7004, //
ktemp_controler_enable_log = 0x7005, //
ka8000_idcard_reader_read_raw = 0x7100, //
ka8000_idcard_write_raw = 0x7101, //
ka8000_idcard_erase = 0x7102, //
ka8000_idcard_earse_unlock = 0x7103, //
kevent_a8000_idcard_online = 0x71c8, //
kevent_a8000_idcard_offline = 0x71c9, //
kplate_code_scaner_push_card_and_scan = 0x7301, //
kplate_code_scaner_stop_scan = 0x7302, //
kplate_code_scaner_read_result = 0x7303, //
kplate_code_scaner_read_result_point_num = 0x7304, //
kplate_code_scaner_read_code = 0x7305, //
kplate_code_scaner_adc_readraw = 0x7306, //
kplate_code_scaner_open_laser = 0x7307, //
kplate_code_scaner_close_laser = 0x7308, //
/***********************************************************************************************************************
* 移液枪 *
***********************************************************************************************************************/
kpipette_zmotor_enable = 0x7400,
kpipette_zmotor_move_zero = 0x7401,
kpipette_zmotor_move_to_zero_point_quick = 0x7402,
kpipette_zmotor_measure_distance = 0x7403,
kpipette_zmotor_read_measure_distance_result = 0x7404,
kpipette_zmotor_move_by = 0x7405,
kpipette_zmotor_move_to = 0x7406,
kpipette_init_device = 0x7407,
kpipette_put_tip = 0x7408,
kpipette_lld_prepare = 0x7409,
kpipette_lld = 0x740A,
kpipette_aspirate_prepare = 0x740B,
kpipette_aspirate_set_llf_velocity = 0x740C,
kpipette_aspirate_set_operation_verifi_p_thre = 0x740D,
kpipette_aspirate_set_operation_verifi_eigen_time = 0x740E,
kpipette_aspirate_set_operation_verifi_tolerance = 0x740F,
kpipette_aspirate = 0x7410,
kpipette_aspirate_and_verify = 0x7411,
kpipette_shake_up = 0x7412,
kpipette_aspirate_infer_pressure = 0x7413,
kpipette_aspirate_infer_eigen_time = 0x7414,
kpipette_get_aspirate_infer_pressure_result = 0x7415,
kpipette_get_aspirate_infer_eigen_time_result = 0x7416,
kpipette_get_sensor_sample_data = 0x7417,
kpipette_get_sensor_sample_data_num = 0x7418,
kpipette_zmotor_read_zero_point_state = 0x7419,
kpipette_zmotor_read_dev_status_cache = 0x741A,
kpipette_lld_is_detect_liquid = 0x741B,
} cmdid_t;
typedef struct {
int index;
const char* fnname;
} cmdinfo_t;
const char* cmdid2str(int32_t code);
cmdinfo_t* cmdid_get_table();
int cmdid_get_table_size();
} // namespace zcr
} // namespace iflytop