#pragma once #include "regsaccess.h" #include "commondef.h" #include #include #include #include class UsbImageProcQueue; class IScanner; class ITransmit; class IReceive; class ScannerRegAccess : public IRegsAccess { public: ScannerRegAccess(std::shared_ptr scanner, std::shared_ptr usbimages = nullptr, std::shared_ptr transmit = nullptr,std::shared_ptr receiv=nullptr); virtual ~ScannerRegAccess(); virtual bool read(unsigned int addr, unsigned int& val); virtual bool write(unsigned int addr , const unsigned int val); void write_info(std::string info); void set_image_callback(void(*cb)(MemoryPtr, bool, void*), void* para); void set_image_process_over(bool over = true); private: void setcameraparmSp(int speedmode); bool cmd(const unsigned int val); bool procscannerinfo(unsigned int addr,unsigned int& value); Updata_Stautus m_upstautus; std::string cmd_out; std::string jsonpath; std::string m_token; volatile std::uint32_t file_pos; std::shared_ptr scanner; std::shared_ptr usbimages; std::shared_ptr transmit; std::shared_ptr recieve; };