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.

114 lines
3.6 KiB

2 years ago
1 year ago
1 year ago
1 year ago
5 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
11 months ago
1 year ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
  1. #pragma once
  2. #include <stdint.h>
  3. namespace iflytop {
  4. namespace err {
  5. using namespace std;
  6. #define ERROR_CODE(errortype, suberrorcode) (errortype + suberrorcode)
  7. typedef enum {
  8. ksucc = 0,
  9. kfail = 1001,
  10. kparam_out_of_range = 1102,
  11. kcmd_not_support = 1103,
  12. kdevice_is_busy = 1104,
  13. kdevice_is_offline = 1105,
  14. kovertime = 1106,
  15. knoack = 1107,
  16. kerrorack = 1108,
  17. kdevice_offline = 1109,
  18. kcheck_sum_error = 1110,
  19. ksubdevice_overtime = 1111,
  20. kbuffer_not_enough = 1112,
  21. kcmd_param_num_error = 1114,
  22. kcheckcode_is_error = 1115,
  23. killegal_operation = 1116,
  24. kaction_overtime = 1117,
  25. kmodule_opeation_break_by_user = 1202,
  26. kmodule_not_find_reg = 1207,
  27. kxymotor_x_find_zero_edge_fail = 1306,
  28. kxymotor_y_find_zero_edge_fail = 1307,
  29. kxymotor_not_enable = 1308,
  30. kxymotor_target_pos_outof_range = 1309,
  31. kxymotor_not_move_to_zero = 1310,
  32. kpipette_error_NoError = 1400,
  33. kpipette_error_InitFail = 1401,
  34. kpipette_error_InvalidCmd = 1402,
  35. kpipette_error_InvalidArg = 1403,
  36. kpipette_error_PressureSensorError = 1404,
  37. kpipette_error_OverPressure = 1405,
  38. kpipette_error_LLDError = 1406,
  39. kpipette_error_DeviceNotInit = 1407,
  40. kpipette_error_TipPopError = 1408,
  41. kpipette_error_PumpOverload = 1409,
  42. kpipette_error_TipDrop = 1410,
  43. kpipette_error_CanBusError = 1411,
  44. kpipette_error_InvalidChecksum = 1412,
  45. kpipette_error_EEPROMError = 1413,
  46. kpipette_error_CmdBufferEmpty = 1414,
  47. kpipette_error_CmdBufferOverflow = 1415,
  48. kpipette_error_TipBlock = 1416,
  49. kpipette_error_AirSuction = 1417,
  50. kpipette_error_Bubble = 1418,
  51. kpipette_error_VolumeError = 1419,
  52. kpipette_error_TipAlreadyLoad = 1420,
  53. kpipette_error_TipLoadFail = 1421,
  54. kpipette_error_no_tip_when_lld = 1422,
  55. kpipette_error_uninited = 1501,
  56. kpipette_error_not_lld_prepare = 1502,
  57. kpipette_error_tipisload_when_lld_prepare = 1500,
  58. kpipette_error_pump_load_val_is_not_empty = 1503,
  59. kstep_motor_not_found_zero_point = 1600,
  60. kstep_motor_not_go_zero = 1601,
  61. kstep_motor_over_temperature = 1602,
  62. kstep_motor_over_voltage = 1603,
  63. kstep_motor_run_overtime = 1604,
  64. kstep_motor_not_enable = 1605,
  65. kstep_motor_ioindex_out_of_range = 1606,
  66. kstep_motor_subic_reset = 1607,
  67. kstep_motor_drv_err = 1608,
  68. kstep_motor_uv_cp = 1609,
  69. kstep_motor_not_found_point_edge = 1610,
  70. kstep_motor_lost_step = 1611,
  71. kstep_motor_not_move_to_zero = 1612,
  72. kstep_motor_ot = 1613,
  73. kstep_motor_otpw = 1614,
  74. kstep_motor_s2ga = 1615,
  75. kstep_motor_s2gb = 1616,
  76. kstep_motor_ola = 1617,
  77. kstep_motor_olb = 1618,
  78. kstep_motor_subic_init_fail = 1619,
  79. kstep_motor_subic_offline = 1620,
  80. kmini_servo_not_enable = 1700,
  81. kmini_servo_mode_not_support = 1701,
  82. kmini_servo_status_is_error = 1702,
  83. kfan_hardware_fault = 1800,
  84. kwater_cooling_fan_error = 1900,
  85. kwater_cooling_temperature_sensor_error = 1902,
  86. kwater_cooling_pump_is_error = 1903,
  87. kwater_cooling_pelter_is_error = 1904,
  88. } error_t;
  89. typedef struct {
  90. int index;
  91. const char* info;
  92. } ecode_table_item_t;
  93. const char* error2str(int32_t code);
  94. ecode_table_item_t* error_get_table();
  95. int error_get_table_size();
  96. } // namespace err
  97. } // namespace iflytop