twain3.0/huagao/Device/IGDevice.h

55 lines
1.6 KiB
C++
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#pragma once
#include <vector>
typedef void(*image_callback)(void*, int, void*, int, void*);
typedef void(*event_callback)(int, void*);
enum Cam_Options {
scanner_config, //!< color, gray
scanner_exposure_gray,
scanner_exposure_green,
scanner_exposure_blue,
scanner_exposure_red,
scanner_status,
scanner_ad_gain,
scanner_ad_offset,
scanner_cover_status, //是否关闭盖子
scanner_pick_paper_stauts, //是否搓纸失败
scanner_jam_stauts, //是否卡纸
scanner_paper_count, //扫描计数值
scanner_trigger_scan, //触发扫描
scanner_staple_state, //有无订书钉
scanner_skrew_state, //歪斜状态
scanner_paper_have, //有无纸张
scanner_double_paper, //双张检测
scanner_scan_triger,//扫描状态1停止扫描0正在扫描
scanner_scan_skrew, //歪斜检测开关1开0关
scanner_stample_enable, //订书钉检测使能,0:default1订书钉检测使能
scanner_doublePape_enable,//双张检测使能
scanner_stop_motor, //停止电机
scanner_error_clean ,//异常清除
scanner_Init_Status, //状态初始化使能
scanner_IIC_Config, //IIC配置使能
scanner_Speed_Config, //速度配置使能
scanner_scan_status
};
class IGDevice
{
public:
virtual ~IGDevice() {}
virtual bool open() = 0;
virtual void close() = 0;
virtual bool is_open() = 0;
virtual bool start(image_callback imagecall= NULL, void* userdata = NULL) = 0;
virtual void stop() = 0;
virtual int is_run() = 0;
virtual void reset() = 0;
virtual void set_event_call(event_callback event_callfunc, void* userdata) = 0;
virtual void set_option(Cam_Options option, unsigned int value) = 0;
virtual int get_option(Cam_Options option) = 0;
virtual std::vector<Cam_Options> support_options() = 0;
};