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.

494 lines
31 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. #pragma once
  2. #include <stdint.h>
  3. #include "api/basic_type.hpp"
  4. #include "api/i_mini_servo_module.hpp"
  5. #include "api/i_step_motor_ctrl_module.hpp"
  6. #include "api/i_xyrobot_ctrl_module.hpp"
  7. #include "zcancmder_protocol_basic.hpp"
  8. namespace iflytop {
  9. namespace zcr {
  10. typedef enum {
  11. kcmd_ping = CMDID(0, 0),
  12. kcmd_read_io = CMDID(1, 0),
  13. kcmd_set_io = CMDID(2, 0),
  14. kcmd_readadc_raw = CMDID(3, 0),
  15. kcmd_m211887_operation = CMDID(1000, 0), // ��������������
  16. kcmd_read_presure_sensor = CMDID(1001, 0), // ѹ��������
  17. kcmd_triple_warning_light_ctl = CMDID(1002, 0), // ��ɫ��ʾ�ƿ���
  18. kcmd_high_power_electrical_ctl = CMDID(1003, 0), // �����ʵ�Դ����
  19. kcmd_peristaltic_pump_ctl = CMDID(1004, 0), // Һ�ÿ���
  20. kcmd_read_huacheng_pressure_sensor = CMDID(1005, 0), // ����ѹ��������
  21. /*******************************************************************************
  22. * |Module_1006:XYRobot˿ģ *
  23. *******************************************************************************/
  24. kcmd_xy_robot_ctrl_enable = CMDID(1006, 0), // ������ʹ��
  25. kcmd_xy_robot_ctrl_stop = CMDID(1006, 1), // ������ֹͣ
  26. kcmd_xy_robot_ctrl_move_to_zero = CMDID(1006, 2), // �����˻���
  27. kcmd_xy_robot_ctrl_move_to_zero_with_calibrate = CMDID(1006, 3), // �����˻��㲢�궨
  28. kcmd_xy_robot_ctrl_move_to = CMDID(1006, 4), // �������ƶ���ָ��λ��
  29. kcmd_xy_robot_ctrl_move_by = CMDID(1006, 5), // �������ƶ�ָ������
  30. kcmd_xy_robot_ctrl_force_change_current_pos = CMDID(1006, 6), // ǿ���޸ĵ�ǰλ��
  31. kcmd_xy_robot_ctrl_read_version = CMDID(1006, 50), // ��ȡģ���ͺŰ汾��Ϣ
  32. kcmd_xy_robot_ctrl_read_status = CMDID(1006, 51), // ��ȡģ�龫��״̬��Ϣ
  33. kcmd_xy_robot_ctrl_read_detailed_status = CMDID(1006, 52), // ��ȡģ����ϸ״̬��Ϣ
  34. kcmd_xy_robot_ctrl_set_base_param = CMDID(1006, 100), // ���������
  35. kcmd_xy_robot_ctrl_get_base_param = CMDID(1006, 101), // ���������
  36. // kcmd_xy_robot_ctrl_set_warning_limit_param = CMDID(1006, 101), // ���ÿ������Ʋ���
  37. // kcmd_xy_robot_ctrl_set_run_to_zero_param = CMDID(1006, 102), // ���ù�������
  38. /*******************************************************************************
  39. * |Module_1007:ģ *
  40. *******************************************************************************/
  41. kcmd_step_motor_ctrl_enable = CMDID(1007, 0), // ʹ��
  42. kcmd_step_motor_ctrl_stop = CMDID(1007, 1), // ֹͣ
  43. kcmd_step_motor_ctrl_move_to_zero = CMDID(1007, 2), // ����
  44. kcmd_step_motor_ctrl_move_to_zero_with_calibrate = CMDID(1007, 3), // ���㲢У׼
  45. kcmd_step_motor_ctrl_move_to = CMDID(1007, 4), // �ƶ���
  46. kcmd_step_motor_ctrl_move_by = CMDID(1007, 5), // �����ƶ�
  47. kcmd_step_motor_ctrl_force_change_current_pos = CMDID(1007, 6), // �����ƶ�
  48. kcmd_step_motor_ctrl_rotate = CMDID(1007, 7), // �����ƶ�
  49. kcmd_step_motor_ctrl_read_version = CMDID(1007, 50), // ��ȡģ���ͺŰ汾��Ϣ
  50. kcmd_step_motor_ctrl_read_status = CMDID(1007, 51), // ��ȡģ�龫��״̬��Ϣ
  51. kcmd_step_motor_ctrl_read_detailed_status = CMDID(1007, 52), // ��ȡģ����ϸ״̬��Ϣ
  52. kcmd_step_motor_ctrl_set_base_param = CMDID(1007, 100), // ���������
  53. kcmd_step_motor_ctrl_get_base_param = CMDID(1007, 101), // ���������
  54. /*******************************************************************************
  55. * |Module_1008: *
  56. *******************************************************************************/
  57. kcmd_mini_servo_ctrl_enable = CMDID(1008, 0), // ʹ��
  58. kcmd_mini_servo_ctrl_stop = CMDID(1008, 1), // ֹͣ
  59. kcmd_mini_servo_ctrl_position_calibrate = CMDID(1008, 2), // У׼
  60. kcmd_mini_servo_ctrl_rotate = CMDID(1008, 3), // �ٶ�ģʽ
  61. kcmd_mini_servo_ctrl_move_to = CMDID(1008, 4), // λ��ģʽ����
  62. kcmd_mini_servo_ctrl_move_by = CMDID(1008, 5), // λ��ģʽ����
  63. kcmd_mini_servo_ctrl_run_with_torque = CMDID(1008, 6), // ����Ť��ģʽ
  64. kcmd_mini_servo_ctrl_move_by_nolimit = CMDID(1008, 7), // �����ƶ�,λ��ģʽ������,�ƶ���������λ�ú���Сλ�����ƣ����޷���ȡ����ǰλ��
  65. kcmd_mini_servo_ctrl_read_version = CMDID(1008, 50), // ��ȡģ���ͺŰ汾��Ϣ
  66. kcmd_mini_servo_ctrl_read_status = CMDID(1008, 51), // ��ȡģ�龫��״̬��Ϣ
  67. kcmd_mini_servo_ctrl_read_detailed_status = CMDID(1008, 52), // ��ȡģ����ϸ״̬��Ϣ
  68. kcmd_mini_servo_ctrl_set_run_param = CMDID(1008, 100),
  69. kcmd_mini_servo_ctrl_get_run_param = CMDID(1008, 101),
  70. kcmd_mini_servo_ctrl_set_warning_limit_param = CMDID(1008, 102),
  71. kcmd_mini_servo_ctrl_get_warning_limit_param = CMDID(1008, 103),
  72. kcmd_mini_servo_ctrl_set_basic_param = CMDID(1008, 104),
  73. kcmd_mini_servo_ctrl_get_basic_param = CMDID(1008, 105),
  74. /*******************************************************************************
  75. * |Module_1009:EEPROM *
  76. *******************************************************************************/
  77. kcmd_eeprom_read_block = CMDID(1009, 0), // ��ȡEEPROM
  78. kcmd_eeprom_write_block = CMDID(1009, 1), // �EEPROM
  79. /*******************************************************************************
  80. * |Module_1010:ɨ *
  81. *******************************************************************************/
  82. kcmd_barcode_reader_start_scan = CMDID(1010, 0), // ��ȡɨ����
  83. kcmd_barcode_reader_stop_scan = CMDID(1010, 1), // ֹͣ��ȡɨ����
  84. /*******************************************************************************
  85. * |Module_1011:-ˮ-ȿϵͳ *
  86. *******************************************************************************/
  87. // ����Ŀ���¶�
  88. kcmd_heater_ctrl_module_start_ctrl_temperature = CMDID(1011, 0), // ����Ŀ���¶�
  89. kcmd_heater_ctrl_module_read_stop_temperature = CMDID(1011, 1), // ��ȡֹͣ�¶�
  90. kcmd_heater_ctrl_module_read_version = CMDID(1011, 50), // ��ȡģ���ͺŰ汾��Ϣ
  91. kcmd_heater_ctrl_module_read_status = CMDID(1011, 51), // ��ȡģ�龫��״̬��Ϣ
  92. kcmd_heater_ctrl_module_read_detailed_status = CMDID(1011, 52), // ��ȡģ����ϸ״̬��Ϣ
  93. kcmd_heater_ctrl_module_set_run_param = CMDID(1011, 100), // ���������
  94. kcmd_heater_ctrl_module_set_warning_limit_param = CMDID(1011, 101), // �������Ʋ���
  95. /*******************************************************************************
  96. * |Module_1012:ѧģɨ *
  97. *******************************************************************************/
  98. kcmd_optical_barcode_reader_start_scan = CMDID(1012, 0), // ��ʼɨ��
  99. kcmd_optical_barcode_reader_stop_scan = CMDID(1012, 1), // ֹͣɨ��
  100. kcmd_optical_barcode_reader_motor_move_to = CMDID(1012, 4), // ˮƽ�����ƶ���
  101. kcmd_optical_barcode_reader_motor_move_to_zero = CMDID(1012, 6), // ����У׼
  102. kcmd_optical_barcode_reader_motor_move_to_zero_with_calibrate = CMDID(1012, 7), // ����У׼
  103. kcmd_optical_barcode_reader_motor_stop = CMDID(1012, 8), // ����ֹͣ
  104. kcmd_optical_barcode_reader_motor_enable = CMDID(1012, 9), // ����ʹ��
  105. kcmd_optical_barcode_reader_read_version = CMDID(1012, 50), // ��ȡģ���ͺŰ汾��Ϣ
  106. kcmd_optical_barcode_reader_read_status = CMDID(1012, 51), // ��ȡģ�龫��״̬��Ϣ
  107. kcmd_optical_barcode_reader_read_detailed_status = CMDID(1012, 52), // ��ȡģ����ϸ״̬��Ϣ
  108. kcmd_optical_barcode_reader_set_run_param = CMDID(1012, 100), // ���������
  109. kcmd_optical_barcode_reader_set_warning_limit_param = CMDID(1012, 101), // �������Ʋ���
  110. kcmd_optical_barcode_reader_set_run_to_zero_param = CMDID(1012, 102), // ���ù�������
  111. /*******************************************************************************
  112. * |Module_1013:в *
  113. *******************************************************************************/
  114. kcmd_board_clamp_module_push_and_scan = CMDID(1013, 0), // �Ƴ���Ӧ�岢ɨ��
  115. kcmd_board_clamp_module_moter_move_to = CMDID(1013, 1), // �����ƶ���
  116. kcmd_board_clamp_module_moter_move_by = CMDID(1013, 2), // �����ƶ���
  117. kcmd_board_clamp_module_moter_move_to_zero = CMDID(1013, 3), // ��������
  118. kcmd_board_clamp_module_moter_move_to_zero_with_calibrate = CMDID(1013, 4), // �������㲢У׼
  119. kcmd_board_clamp_module_moter_stop = CMDID(1013, 5), // ����ֹͣ
  120. kcmd_board_clamp_module_moter_enable = CMDID(1013, 6), // ����ʹ��
  121. kcmd_board_clamp_module_read_version = CMDID(1013, 50), // ��ȡģ���ͺŰ汾��Ϣ
  122. kcmd_board_clamp_module_read_status = CMDID(1013, 51), // ��ȡģ�龫��״̬��Ϣ
  123. kcmd_board_clamp_module_read_detailed_status = CMDID(1013, 52), // ��ȡģ����ϸ״̬��Ϣ
  124. kcmd_board_clamp_module_set_run_param = CMDID(1013, 100), // ���������
  125. kcmd_board_clamp_module_set_warning_limit_param = CMDID(1013, 101), // �������Ʋ���
  126. kcmd_board_clamp_module_set_run_to_zero_param = CMDID(1013, 102), // ���ù�������
  127. // ����
  128. /*******************************************************************************
  129. * |Module_1014: *
  130. *******************************************************************************/
  131. kcmd_fan_module_fan_ctrl = CMDID(1014, 0), // ���ȿ���
  132. kcmd_fan_module_fan_read_status = CMDID(1014, 50), // ��ȡģ�龫��״̬��Ϣ
  133. kcmd_fan_module_fan_read_detailed_status = CMDID(1014, 51), // ��ȡģ����ϸ״̬��Ϣ
  134. // ����͸��
  135. /*******************************************************************************
  136. * |Module_1015:͸ *
  137. *******************************************************************************/
  138. kcmd_serial_module_send_data = CMDID(1015, 0), // ����͸����������
  139. kcmd_serial_module_start_read_data = CMDID(1015, 1), // ����͸����ȡ����
  140. kcmd_serial_module_start_stop_data = CMDID(1015, 2), // ����͸��ֹͣ��ȡ����
  141. kcmd_serial_module_read_status = CMDID(1015, 50), // ��ȡģ��״̬��Ϣ
  142. kcmd_serial_module_set_cfg = CMDID(1015, 100), // ����͸����������
  143. // ��Һǹ����
  144. /*******************************************************************************
  145. * |Module_1016:Һǹ *
  146. *******************************************************************************/
  147. kcmd_pipette_module_z_motor_enable = CMDID(1016, 0), // ʹ��
  148. kcmd_pipette_module_z_motor_move_to = CMDID(1016, 1), // �ƶ���
  149. kcmd_pipette_module_z_motor_move_to_zero = CMDID(1016, 2), // ����
  150. kcmd_pipette_module_z_motor_move_to_zero_with_calibrate = CMDID(1016, 3), // ���㲢У׼
  151. kcmd_pipette_module_z_motor_stop = CMDID(1016, 4), // ֹͣ
  152. kcmd_pipette_module_take_liquid = CMDID(1016, 4), // ȡҺ��
  153. kcmd_pipette_module_split_liquid = CMDID(1016, 5), // ��Һ��
  154. kcmd_pipette_module_take_tip = CMDID(1016, 6), // ȡtip
  155. kcmd_pipette_module_remove_tip = CMDID(1016, 7), // �Ƴ�tip
  156. kcmd_pipette_module_read_version = CMDID(1016, 50), // ��ȡģ���ͺŰ汾��Ϣ
  157. kcmd_pipette_module_read_status = CMDID(1016, 51), // ��ȡģ�龫��״̬��Ϣ
  158. kcmd_pipette_module_read_detailed_status = CMDID(1016, 52), // ��ȡģ����ϸ״̬��Ϣ
  159. kcmd_pipette_module_set_run_param = CMDID(1016, 100), // ���������
  160. kcmd_pipette_module_set_warning_limit_param = CMDID(1016, 101), // �������Ʋ���
  161. kcmd_pipette_module_set_run_to_zero_param = CMDID(1016, 102), // ���ù�������
  162. } CmdID_t;
  163. #pragma pack(push, 1)
  164. ZPACKET_CMD_ACK(kcmd_ping, //
  165. CMD(u8 boardid;), //
  166. ACK(u8 boardid;));
  167. ZPACKET_CMD_ACK(kcmd_read_io, //
  168. CMD(u8 ioid;), //
  169. ACK(u8 ioid; u8 val;));
  170. ZPACKET_CMD_ACK(kcmd_set_io, //
  171. CMD(u8 ioid; u8 val;), //
  172. ACK(u8 ioid; u8 val;));
  173. ZPACKET_CMD_ACK(kcmd_readadc_raw, //
  174. CMD(u8 sensorid;), //
  175. ACK(u8 sensorid; s32 val;));
  176. /*******************************************************************************
  177. * |Module_1006:XYRobot˿ģ *
  178. *******************************************************************************/
  179. // ACTION
  180. ZPACKET_CMD_ACK(kcmd_xy_robot_ctrl_enable, CMD(u8 id; u8 enable;), ACK(u8 id;));
  181. ZPACKET_CMD_ACK(kcmd_xy_robot_ctrl_stop, CMD(u8 id; u8 stop_type;), ACK(u8 id;));
  182. ZPACKET_CMD_ACK_AND_REPORT(kcmd_xy_robot_ctrl_move_to_zero, CMD(u8 id;), ACK(u8 id;), REPORT(u8 id; int32_t exec_status;));
  183. ZPACKET_CMD_ACK_AND_REPORT(kcmd_xy_robot_ctrl_move_to_zero_with_calibrate, CMD(u8 id; s32 nowx; s32 nowy;), ACK(u8 id;), REPORT(u8 id; int32_t exec_status;));
  184. ZPACKET_CMD_ACK_AND_REPORT(kcmd_xy_robot_ctrl_move_to, CMD(u8 id; s32 x; s32 y; s32 speed;), ACK(u8 id;), REPORT(u8 id; int32_t exec_status;));
  185. ZPACKET_CMD_ACK_AND_REPORT(kcmd_xy_robot_ctrl_move_by, CMD(u8 id; s32 dx; s32 dy; s32 speed;), ACK(u8 id;), REPORT(u8 id; int32_t exec_status;));
  186. ZPACKET_CMD_ACK(kcmd_xy_robot_ctrl_force_change_current_pos, CMD(u8 id; s32 x; s32 y;), ACK(u8 id;));
  187. // READ
  188. ZPACKET_CMD_ACK(kcmd_xy_robot_ctrl_read_version, CMD(u8 id;), ACK(u8 id; I_XYRobotCtrlModule::version_t ack;));
  189. ZPACKET_CMD_ACK(kcmd_xy_robot_ctrl_read_status, CMD(u8 id;), ACK(u8 id; I_XYRobotCtrlModule::status_t ack;));
  190. ZPACKET_CMD_ACK(kcmd_xy_robot_ctrl_read_detailed_status, CMD(u8 id;), ACK(u8 id; I_XYRobotCtrlModule::detailed_status_t ack;));
  191. // SET
  192. ZPACKET_CMD_ACK(kcmd_xy_robot_ctrl_set_base_param, CMD(u8 id; I_XYRobotCtrlModule::base_param_t param;), ACK(u8 id;));
  193. ZPACKET_CMD_ACK(kcmd_xy_robot_ctrl_get_base_param, CMD(u8 id;), ACK(u8 id; I_XYRobotCtrlModule::base_param_t ack;));
  194. // ZPACKET_CMD_ACK(kcmd_xy_robot_ctrl_set_warning_limit_param, CMD(u8 id; u8 opt_type; I_XYRobotCtrlModule::warning_limit_param_t param;), ACK(u8 id; I_XYRobotCtrlModule::warning_limit_param_t ack;));
  195. // ZPACKET_CMD_ACK(kcmd_xy_robot_ctrl_set_run_to_zero_param, CMD(u8 id; u8 opt_type; I_XYRobotCtrlModule::run_to_zero_param_t param;), ACK(u8 id; I_XYRobotCtrlModule::run_to_zero_param_t ack;));
  196. /*******************************************************************************
  197. * |Module_1007:ģ *
  198. *******************************************************************************/
  199. ZPACKET_CMD_ACK(kcmd_step_motor_ctrl_enable, CMD(u8 id; u8 enable;), ACK(u8 id;));
  200. ZPACKET_CMD_ACK(kcmd_step_motor_ctrl_stop, CMD(u8 id; u8 stop_type;), ACK(u8 id;));
  201. ZPACKET_CMD_ACK_AND_REPORT(kcmd_step_motor_ctrl_move_to_zero, CMD(u8 id;), ACK(u8 id;), REPORT(u8 id; int32_t exec_status;));
  202. ZPACKET_CMD_ACK_AND_REPORT(kcmd_step_motor_ctrl_move_to_zero_with_calibrate, CMD(u8 id; s32 nowx; s32 nowy;), ACK(u8 id;), REPORT(u8 id; int32_t exec_status;));
  203. ZPACKET_CMD_ACK_AND_REPORT(kcmd_step_motor_ctrl_move_to, CMD(u8 id; s32 x; s32 speed;), ACK(u8 id;), REPORT(u8 id; int32_t exec_status;));
  204. ZPACKET_CMD_ACK_AND_REPORT(kcmd_step_motor_ctrl_move_by, CMD(u8 id; s32 dx; s32 speed;), ACK(u8 id;), REPORT(u8 id; int32_t exec_status;));
  205. ZPACKET_CMD_ACK(kcmd_step_motor_ctrl_force_change_current_pos, CMD(u8 id; s32 x;), ACK(u8 id;));
  206. ZPACKET_CMD_ACK_AND_REPORT(kcmd_step_motor_ctrl_rotate, CMD(u8 id; s32 speed; s32 run_time;), ACK(u8 id;), REPORT(u8 id; int32_t exec_status;));
  207. // READ
  208. ZPACKET_CMD_ACK(kcmd_step_motor_ctrl_read_version, CMD(u8 id;), ACK(u8 id; I_StepMotorCtrlModule::version_t ack;));
  209. ZPACKET_CMD_ACK(kcmd_step_motor_ctrl_read_status, CMD(u8 id;), ACK(u8 id; I_StepMotorCtrlModule::status_t ack;));
  210. ZPACKET_CMD_ACK(kcmd_step_motor_ctrl_read_detailed_status, CMD(u8 id;), ACK(u8 id; I_StepMotorCtrlModule::detailed_status_t ack;));
  211. // SET
  212. ZPACKET_CMD_ACK(kcmd_step_motor_ctrl_set_base_param, CMD(u8 id; u8 opt_type; I_StepMotorCtrlModule::base_param_t param;), ACK(u8 id;));
  213. ZPACKET_CMD_ACK(kcmd_step_motor_ctrl_get_base_param, CMD(u8 id;), ACK(u8 id; I_StepMotorCtrlModule::base_param_t ack;));
  214. /*******************************************************************************
  215. * |Module_1008: *
  216. *******************************************************************************/
  217. ZPACKET_CMD_ACK(kcmd_mini_servo_ctrl_enable, CMD(u8 id; u8 enable;), ACK(u8 id;));
  218. ZPACKET_CMD_ACK(kcmd_mini_servo_ctrl_stop, CMD(u8 id; u8 stop_type;), ACK(u8 id;));
  219. ZPACKET_CMD_ACK(kcmd_mini_servo_ctrl_position_calibrate, CMD(u8 id; s32 calibrate_pos;), ACK(u8 id;));
  220. ZPACKET_CMD_ACK_AND_REPORT(kcmd_mini_servo_ctrl_rotate, CMD(u8 id; s32 speed; s32 torque; s32 run_time;), ACK(u8 id;), REPORT(u8 id; int32_t exec_status;));
  221. ZPACKET_CMD_ACK_AND_REPORT(kcmd_mini_servo_ctrl_move_to, CMD(u8 id; s32 pos; s32 speed; s32 torque;), ACK(u8 id;), REPORT(u8 id; int32_t exec_status;));
  222. ZPACKET_CMD_ACK_AND_REPORT(kcmd_mini_servo_ctrl_move_by, CMD(u8 id; s32 pos; s32 speed; s32 torque;), ACK(u8 id;), REPORT(u8 id; int32_t exec_status;));
  223. ZPACKET_CMD_ACK_AND_REPORT(kcmd_mini_servo_ctrl_run_with_torque, CMD(u8 id; s32 torque; s32 run_time;), ACK(u8 id;), REPORT(u8 id; int32_t exec_status;));
  224. ZPACKET_CMD_ACK_AND_REPORT(kcmd_mini_servo_ctrl_move_by_nolimit, CMD(u8 id; s32 pos; s32 speed; s32 torque;), ACK(u8 id;), REPORT(u8 id; int32_t exec_status;));
  225. ZPACKET_CMD_ACK(kcmd_mini_servo_ctrl_read_version, CMD(u8 id;), ACK(u8 id; I_MiniServoModule::version_t ack;));
  226. ZPACKET_CMD_ACK(kcmd_mini_servo_ctrl_read_status, CMD(u8 id;), ACK(u8 id; I_MiniServoModule::status_t ack;));
  227. ZPACKET_CMD_ACK(kcmd_mini_servo_ctrl_read_detailed_status, CMD(u8 id;), ACK(u8 id; I_MiniServoModule::detailed_status_t ack;));
  228. ZPACKET_CMD_ACK(kcmd_mini_servo_ctrl_set_run_param, CMD(u8 id; u8 opt_type; I_MiniServoModule::run_param_t param;), ACK(u8 id; I_MiniServoModule::run_param_t ack;));
  229. ZPACKET_CMD_ACK(kcmd_mini_servo_ctrl_set_basic_param, CMD(u8 id; u8 opt_type; I_MiniServoModule::basic_param_t param;), ACK(u8 id; I_MiniServoModule::basic_param_t ack;));
  230. ZPACKET_CMD_ACK(kcmd_mini_servo_ctrl_set_warning_limit_param, CMD(u8 id; u8 opt_type; I_MiniServoModule::warning_limit_param_t param;), ACK(u8 id; I_MiniServoModule::warning_limit_param_t ack;));
  231. ZPACKET_CMD_ACK(kcmd_mini_servo_ctrl_get_run_param, CMD(u8 id; u8 opt_type;), ACK(u8 id; I_MiniServoModule::run_param_t ack;));
  232. ZPACKET_CMD_ACK(kcmd_mini_servo_ctrl_get_basic_param, CMD(u8 id; u8 opt_type;), ACK(u8 id; I_MiniServoModule::basic_param_t ack;));
  233. ZPACKET_CMD_ACK(kcmd_mini_servo_ctrl_get_warning_limit_param, CMD(u8 id; u8 opt_type;), ACK(u8 id; I_MiniServoModule::warning_limit_param_t ack;));
  234. /*******************************************************************************
  235. * |Module_1009:EEPROM *
  236. *******************************************************************************/
  237. ZPACKET_CMD_ACK(kcmd_eeprom_read_block,
  238. CMD(u8 id; u16 addr; u16 len;), //
  239. ACK(u8 id; u16 addr; u16 len; u8 data[0];));
  240. ZPACKET_CMD_ACK(kcmd_eeprom_write_block,
  241. CMD(u8 id; u16 addr; u16 len; u8 data[0];), //
  242. ACK(u8 id; u16 addr; u16 len;));
  243. /*******************************************************************************
  244. * |Module_1010:ɨ *
  245. *******************************************************************************/
  246. ZPACKET_CMD_ACK_AND_REPORT(kcmd_barcode_reader_start_scan,
  247. CMD(u8 id;), //
  248. ACK(u8 id;), //
  249. REPORT(u8 id; u8 status; u16 barcodelen; u8 barcode[0];));
  250. ZPACKET_CMD_ACK(kcmd_barcode_reader_stop_scan,
  251. CMD(u8 id;), //
  252. ACK(u8 id;));
  253. /*******************************************************************************
  254. * |Module_1011:-ˮ-ȿϵͳ *
  255. *******************************************************************************/
  256. ZPACKET_CMD_ACK(kcmd_heater_ctrl_module_start_ctrl_temperature,
  257. CMD(u8 id; s32 target_temperature;), //
  258. ACK(u8 id;));
  259. ZPACKET_CMD_ACK(kcmd_heater_ctrl_module_read_stop_temperature,
  260. CMD(u8 id;), //
  261. ACK(u8 id;));
  262. ZPACKET_CMD_ACK(kcmd_heater_ctrl_module_read_version,
  263. CMD(u8 id;), //
  264. ACK(u8 id; uint32_t version;));
  265. ZPACKET_CMD_ACK(kcmd_heater_ctrl_module_read_status,
  266. CMD(u8 id;), //
  267. ACK(u8 id; u8 status; s32 temperature;));
  268. ZPACKET_CMD_ACK(kcmd_heater_ctrl_module_read_detailed_status,
  269. CMD(u8 id;), //
  270. ACK(u8 id; u8 status; s32 temperature;));
  271. ZPACKET_CMD_ACK(kcmd_heater_ctrl_module_set_run_param,
  272. CMD(u8 id; u8 opt_type; s32 kp; s32 ki; s32 kd; s32 max_pwm; s32 min_temperature; s32 max_temperature;), //
  273. ACK(u8 id; u8 opt_type; s32 kp; s32 ki; s32 kd; s32 max_pwm; s32 min_temperature; s32 max_temperature;));
  274. ZPACKET_CMD_ACK(kcmd_heater_ctrl_module_set_warning_limit_param,
  275. CMD(u8 id; u8 opt_type;), //
  276. ACK(u8 id; u8 opt_type;));
  277. /*******************************************************************************
  278. * |Module_1012:ѧģɨ *
  279. *******************************************************************************/
  280. ZPACKET_CMD_ACK_AND_REPORT(kcmd_optical_barcode_reader_start_scan,
  281. CMD(u8 id;), //
  282. ACK(u8 id;), //
  283. REPORT(u8 id; u8 status; u16 codelen; u16 code[0];));
  284. ZPACKET_CMD_ACK(kcmd_optical_barcode_reader_stop_scan,
  285. CMD(u8 id;), //
  286. ACK(u8 id;));
  287. ZPACKET_CMD_ACK_AND_REPORT(kcmd_optical_barcode_reader_motor_move_to,
  288. CMD(u8 id; u8 motor_id; s32 pos; s32 speed;), //
  289. ACK(u8 id;), //
  290. REPORT(u8 id; u8 status; s32 pos;));
  291. ZPACKET_CMD_ACK_AND_REPORT(kcmd_optical_barcode_reader_motor_move_to_zero,
  292. CMD(u8 id; u8 motor_id;), //
  293. ACK(u8 id;), //
  294. REPORT(u8 id; u8 status;));
  295. ZPACKET_CMD_ACK_AND_REPORT(kcmd_optical_barcode_reader_motor_move_to_zero_with_calibrate,
  296. CMD(u8 id; u8 motor_id; s32 now_pos;), //
  297. ACK(u8 id;), //
  298. REPORT(u8 id; u8 status; s32 zero_shift;));
  299. ZPACKET_CMD_ACK(kcmd_optical_barcode_reader_motor_stop,
  300. CMD(u8 id; u8 motor_id;), //
  301. ACK(u8 id;));
  302. ZPACKET_CMD_ACK(kcmd_optical_barcode_reader_read_version,
  303. CMD(u8 id;), //
  304. ACK(u8 id;));
  305. ZPACKET_CMD_ACK(kcmd_optical_barcode_reader_read_status,
  306. CMD(u8 id;), //
  307. ACK(u8 id; u8 status; u8 hasmove2zero[2]; s32 pos[2];));
  308. ZPACKET_CMD_ACK(kcmd_optical_barcode_reader_read_detailed_status,
  309. CMD(u8 id;), //
  310. ACK(u8 id; u8 status; u8 hasmove2zero[2]; s32 pos[2]; s32 acc[2]; s32 speed[2];));
  311. ZPACKET_CMD_ACK(kcmd_optical_barcode_reader_set_run_param, //
  312. CMD(u8 id; u8 opt_type; s32 acc[2]; s32 dec[2]; s32 max_speed[2]; s32 min_pos[2]; s32 max_pos[2];), //
  313. ACK(u8 id; u8 opt_type; s32 acc[2]; s32 dec[2]; s32 max_speed[2]; s32 min_pos[2]; s32 max_pos[2];));
  314. ZPACKET_CMD_ACK(kcmd_optical_barcode_reader_set_warning_limit_param,
  315. CMD(u8 id; u8 opt_type; s32 pad;), //
  316. ACK(u8 id; u8 opt_type; s32 pad;));
  317. ZPACKET_CMD_ACK(kcmd_optical_barcode_reader_set_run_to_zero_param,
  318. CMD(u8 id; u8 opt_type; s32 move_to_zero_max_d[2]; s32 leave_from_zero_max_d[2]; s32 speed[2]; s32 dec[2];), //
  319. ACK(u8 id; u8 opt_type; s32 move_to_zero_max_d[2]; s32 leave_from_zero_max_d[2]; s32 speed[2]; s32 dec[2];));
  320. /*******************************************************************************
  321. * Module_1013:в *
  322. *******************************************************************************/
  323. ZPACKET_CMD_ACK_AND_REPORT(kcmd_board_clamp_module_push_and_scan,
  324. CMD(u8 id;), //
  325. ACK(u8 id;), //
  326. REPORT(u8 id; u8 status; u16 barcodelen; u8 barcode[0];));
  327. ZPACKET_CMD_ACK_AND_REPORT(kcmd_board_clamp_module_moter_move_to,
  328. CMD(u8 id; u8 motor_id; s32 pos; s32 speed;), //
  329. ACK(u8 id;), //
  330. REPORT(u8 id; u8 status; s32 pos;));
  331. ZPACKET_CMD_ACK_AND_REPORT(kcmd_board_clamp_module_moter_move_by,
  332. CMD(u8 id; u8 motor_id; s32 pos; s32 speed;), //
  333. ACK(u8 id;), //
  334. REPORT(u8 id; u8 status; s32 pos;));
  335. ZPACKET_CMD_ACK_AND_REPORT(kcmd_board_clamp_module_moter_move_to_zero,
  336. CMD(u8 id; u8 motor_id;), //
  337. ACK(u8 id;), //
  338. REPORT(u8 id; u8 status;));
  339. ZPACKET_CMD_ACK_AND_REPORT(kcmd_board_clamp_module_moter_move_to_zero_with_calibrate,
  340. CMD(u8 id; u8 motor_id; s32 now_pos;), //
  341. ACK(u8 id;), //
  342. REPORT(u8 id; u8 status; s32 zero_shift;));
  343. ZPACKET_CMD_ACK(kcmd_board_clamp_module_moter_stop,
  344. CMD(u8 id; u8 motor_id;), //
  345. ACK(u8 id;));
  346. ZPACKET_CMD_ACK(kcmd_board_clamp_module_read_version,
  347. CMD(u8 id;), //
  348. ACK(u8 id;));
  349. ZPACKET_CMD_ACK(kcmd_board_clamp_module_read_status,
  350. CMD(u8 id;), //
  351. ACK(u8 id; u8 status; u8 hasmove2zero[2]; s32 pos[2];));
  352. ZPACKET_CMD_ACK(kcmd_board_clamp_module_read_detailed_status,
  353. CMD(u8 id;), //
  354. ACK(u8 id; u8 status; u8 hasmove2zero[2]; s32 pos[2]; s32 acc[2]; s32 speed[2];));
  355. ZPACKET_CMD_ACK(kcmd_board_clamp_module_set_run_param, //
  356. CMD(u8 id; u8 opt_type; s32 acc[2]; s32 dec[2]; s32 max_speed[2]; s32 min_pos[2]; s32 max_pos[2];), //
  357. ACK(u8 id; u8 opt_type; s32 acc[2]; s32 dec[2]; s32 max_speed[2]; s32 min_pos[2]; s32 max_pos[2];));
  358. ZPACKET_CMD_ACK(kcmd_board_clamp_module_set_warning_limit_param,
  359. CMD(u8 id; u8 opt_type; s32 pad;), //
  360. ACK(u8 id; u8 opt_type; s32 pad;));
  361. ZPACKET_CMD_ACK(kcmd_board_clamp_module_set_run_to_zero_param,
  362. CMD(u8 id; u8 opt_type; s32 move_to_zero_max_d[2]; s32 leave_from_zero_max_d[2]; s32 speed[2]; s32 dec[2];), //
  363. ACK(u8 id; u8 opt_type; s32 move_to_zero_max_d[2]; s32 leave_from_zero_max_d[2]; s32 speed[2]; s32 dec[2];));
  364. /*******************************************************************************
  365. * |Module_1014: *
  366. *******************************************************************************/
  367. ZPACKET_CMD_ACK(kcmd_fan_module_fan_ctrl,
  368. CMD(u8 id; u8 level;), //
  369. ACK(u8 id;));
  370. ZPACKET_CMD_ACK(kcmd_fan_module_fan_read_status,
  371. CMD(u8 id;), //
  372. ACK(u8 id; u8 status; u8 level;));
  373. ZPACKET_CMD_ACK(kcmd_fan_module_fan_read_detailed_status,
  374. CMD(u8 id;), //
  375. ACK(u8 id; u8 status; u8 level; int16_t fbcount;));
  376. /*******************************************************************************
  377. * |Module_1016:Һǹ *
  378. *******************************************************************************/
  379. ZPACKET_CMD_ACK(kcmd_pipette_module_motor_enable,
  380. CMD(u8 id; u8 enable;), //
  381. ACK(u8 id;));
  382. ZPACKET_CMD_ACK_AND_REPORT(kcmd_pipette_module_motor_move_to,
  383. CMD(u8 id; u8 motor_id; s32 pos; s32 speed;), //
  384. ACK(u8 id;), //
  385. REPORT(u8 id; u8 status; s32 pos;));
  386. ZPACKET_CMD_ACK_AND_REPORT(kcmd_pipette_module_motor_move_to_zero,
  387. CMD(u8 id; u8 motor_id;), //
  388. ACK(u8 id;), //
  389. REPORT(u8 id; u8 status;));
  390. ZPACKET_CMD_ACK_AND_REPORT(kcmd_pipette_module_motor_move_to_zero_with_calibrate,
  391. CMD(u8 id; u8 motor_id; s32 now_pos;), //
  392. ACK(u8 id;), //
  393. REPORT(u8 id; u8 status; s32 zero_shift;));
  394. ZPACKET_CMD_ACK(kcmd_pipette_module_motor_stop,
  395. CMD(u8 id; u8 motor_id;), //
  396. ACK(u8 id;));
  397. ZPACKET_CMD_ACK(kcmd_pipette_module_take_liquid,
  398. CMD(u8 id; u8 motor_id; s32 speed; s32 pos;), //
  399. ACK(u8 id;));
  400. ZPACKET_CMD_ACK(kcmd_pipette_module_split_liquid,
  401. CMD(u8 id; u8 motor_id; s32 speed; s32 pos;), //
  402. ACK(u8 id;));
  403. ZPACKET_CMD_ACK(kcmd_pipette_module_take_tip,
  404. CMD(u8 id; u8 motor_id; s32 speed; s32 pos;), //
  405. ACK(u8 id;));
  406. ZPACKET_CMD_ACK(kcmd_pipette_module_remove_tip,
  407. CMD(u8 id; u8 motor_id; s32 speed; s32 pos;), //
  408. ACK(u8 id;));
  409. #if 0
  410. kcmd_pipette_module_read_status = CMDID(1016, 51), // ��ȡģ�龫��״̬��Ϣ
  411. kcmd_pipette_module_read_detailed_status = CMDID(1016, 52), // ��ȡģ����ϸ״̬��Ϣ
  412. kcmd_pipette_module_set_run_param = CMDID(1016, 100), // ���������
  413. kcmd_pipette_module_set_warning_limit_param = CMDID(1016, 101), // �������Ʋ���
  414. kcmd_pipette_module_set_run_to_zero_param = CMDID(1016, 102), // ���ù�������
  415. #endif
  416. ZPACKET_CMD_ACK(kcmd_pipette_module_read_version,
  417. CMD(u8 id;), //
  418. ACK(u8 id;));
  419. ZPACKET_CMD_ACK(kcmd_pipette_module_read_status,
  420. CMD(u8 id;), //
  421. ACK(u8 id; u8 status; s32 pos[2];));
  422. ZPACKET_CMD_ACK(kcmd_pipette_module_read_detailed_status,
  423. CMD(u8 id;), //
  424. ACK(u8 id; u8 status; s32 pos[2]; s32 acc[2]; s32 speed[2];));
  425. ZPACKET_CMD_ACK(kcmd_pipette_module_set_run_param,
  426. CMD(u8 id; u8 opt_type; s32 acc[2]; s32 dec[2]; s32 max_speed[2]; s32 min_pos[2]; s32 max_pos[2];), //
  427. ACK(u8 id; u8 opt_type; s32 acc[2]; s32 dec[2]; s32 max_speed[2]; s32 min_pos[2]; s32 max_pos[2];));
  428. ZPACKET_CMD_ACK(kcmd_pipette_module_set_warning_limit_param,
  429. CMD(u8 id; u8 opt_type; s32 pad;), //
  430. ACK(u8 id; u8 opt_type; s32 pad;));
  431. #pragma pack(pop)
  432. } // namespace zcr
  433. } // namespace iflytop