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.
47 lines
1.4 KiB
47 lines
1.4 KiB
#pragma once
|
|
#include "basic_type.hpp"
|
|
namespace iflytop {
|
|
using namespace std;
|
|
|
|
class I_MotorLaserCodeScanner {
|
|
public:
|
|
#pragma pack(push, 1)
|
|
typedef struct {
|
|
int32_t each_scan_result_len;
|
|
int32_t scan_reult_nums;
|
|
uint8_t scan_result[];
|
|
} scan_result_t;
|
|
#pragma pack(pop)
|
|
|
|
public:
|
|
/**
|
|
* @brief 启动扫码
|
|
*
|
|
* @param moveby_distance 移动距离
|
|
* @param scan_interval_distance 每次扫描间隔距离
|
|
* @param each_sample_times 每次采样次数
|
|
* @param transmitting_tube_amplification 发光管放大倍数
|
|
* @param receiving_tube_amplification 接收管放大倍数
|
|
*/
|
|
virtual int32_t start_scan(s32 moveby_distance, //
|
|
s32 scan_interval_distance, //
|
|
s32 each_sample_times, //
|
|
s32 transmitting_tube_amplification, //
|
|
s32 receiving_tube_amplification, //
|
|
action_cb_status_t cb) = 0;
|
|
/**
|
|
* @brief 停止扫码
|
|
*
|
|
* @return int32_t
|
|
*/
|
|
virtual int32_t stop_scan() = 0;
|
|
/**
|
|
* @brief 获取扫码结果
|
|
*
|
|
* @param result
|
|
* @return int32_t
|
|
*/
|
|
virtual int32_t get_scan_result(u16 sector_index, u16 sector_size, zcancmder_read_ram_ack_t& ack) = 0;
|
|
};
|
|
|
|
} // namespace iflytop
|