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.

46 lines
1.4 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
  1. #pragma once
  2. #include "basic_type.hpp"
  3. namespace iflytop {
  4. using namespace std;
  5. class I_MotorLaserCodeScanner {
  6. public:
  7. #pragma pack(push, 1)
  8. typedef struct {
  9. int32_t each_scan_result_len;
  10. int32_t scan_reult_nums;
  11. uint8_t scan_result[];
  12. } scan_result_t;
  13. #pragma pack(pop)
  14. public:
  15. /**
  16. * @brief ɨ
  17. *
  18. * @param moveby_distance ƶ
  19. * @param scan_interval_distance ÿɨ
  20. * @param each_sample_times ÿβ
  21. * @param transmitting_tube_amplification ܷŴ
  22. * @param receiving_tube_amplification չܷŴ
  23. */
  24. virtual int32_t start_scan(s32 moveby_distance, //
  25. s32 scan_interval_distance, //
  26. s32 each_sample_times, //
  27. s32 transmitting_tube_amplification, //
  28. s32 receiving_tube_amplification, //
  29. action_cb_status_t cb) = 0;
  30. /**
  31. * @brief ֹͣɨ
  32. *
  33. * @return int32_t
  34. */
  35. virtual int32_t stop_scan() = 0;
  36. /**
  37. * @brief ȡɨ
  38. *
  39. * @param result
  40. * @return int32_t
  41. */
  42. virtual int32_t get_scan_result(u16 sector_index, u16 sector_size, zcancmder_read_ram_ack_t& ack) = 0;
  43. };
  44. } // namespace iflytop