#pragma once
#include "ASyncQueue.h"
#include "SyncQueue.h"
#include "MvCameraControl.h"
#include "CameraParams.h"
#include <vector>
#include <opencv2/opencv.hpp>
#include "common.h"

#define HIK2D 1

class HIKCamera
{
private:
	HIKCamera(int DeviceNums);
	HIKCamera(const HIKCamera& tmpobj) {}
	HIKCamera operator=(const HIKCamera& tmpobj) {}
	~HIKCamera();

private:
	int CamSelect = 0;
	
public:
	static int HIKCamera::Enumerate();
	static HIKCamera* InitHIKController(int DeviceNum);
	void SetTriggerMode(MV_CAM_TRIGGER_MODE mode);
	cv::Mat SoftWareTrigger();

	int   OpenCamera();
	int   CloseCamera();

public:
	static MV_CC_DEVICE_INFO_LIST stDeviceList;
	static HIKCamera* HikController;
	static std::vector<void*> CameraHandle;

	void* p_pImage_buf = nullptr;
	SyncQueue<cv::Mat> *p_image_queue;
	ASyncQueue<bool> *p_result_queue;
	cv::Mat image;
};
