rk3399_arm_lvds/scanner/scannerregs.h

44 lines
1.3 KiB
C
Raw Permalink Normal View History

2024-03-05 03:46:18 +00:00
/*
* @Descripttion:
* @version:
* @Author: pengming
* @Date: 2023-09-13 14:27:29
* @LastEditors: pengming
*/
#pragma once
#include "regsaccess.h"
#include "commondef.h"
#include <memory>
#include <fstream>
#include <unistd.h>
class UsbImageProcQueue;
class IScanner;
class ITransmit;
class IReceive;
class ScannerRegAccess : public IRegsAccess
{
public:
ScannerRegAccess(std::shared_ptr<IScanner> scanner, std::shared_ptr<UsbImageProcQueue> usbimages = nullptr, std::shared_ptr<ITransmit> transmit = nullptr,std::shared_ptr<IReceive> 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);
private:
void setcameraparmSp(int speedmode);
bool cmd(const unsigned int val);
bool procscannerinfo(unsigned int addr,unsigned int& value);
bool b_supported_w_r(std::string path,bool b_w);
Updata_Stautus m_upstautus;
std::string cmd_out;
std::string jsonpath;
std::string m_token;
std::string arm_datetime;
volatile std::uint32_t file_pos;
std::shared_ptr<IScanner> scanner;
std::shared_ptr<UsbImageProcQueue> usbimages;
std::shared_ptr<ITransmit> transmit;
std::shared_ptr<IReceive> recieve;
};