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.

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