#pragma once
#define C_MACHINE_EXPORTS
#include "Machine.h"
#include "CDieBondFsm.h"
#include "CMessageBox.h"
#include "dt.h"
namespace ns_module
{
class __declspec(dllexport) CCamerAndLamp
{
private:
static CCamerAndLamp* m_instance;
CManageDB* m_pCManageDB = nullptr;
Machine* m_pMachine = nullptr;
CCameraManage* m_pCameraManage = nullptr;
CBondHead* m_pBondHead = nullptr;
CWaferTable* m_pWaferTable = nullptr;
CWaferHead* m_pWaferHead = nullptr;
CTransferTable* m_pWaferTransferTable = nullptr;
CTransferTable* m_pWaffleTransferTable = nullptr;
CResources* m_pResource = nullptr;
CDieBondFsm* m_pDieBondFsm = nullptr;
public:
static CCamerAndLamp* GetInstance();
CCamerAndLamp();
///
/// 设置红光
///
/// 相机Id
/// 灯光值
/// 成功返回0,否则返回错误码
long SetRedLight(int iCameraId, int LightValue);
///
/// 设置绿光
///
/// 灯光值
/// 成功返回0,否则返回错误码
long SetGreenLight(int iCameraId, int LightValue);
///
/// 设置蓝光
///
/// 相机Id
/// 灯光值
/// 成功返回0,否则返回错误码
long SetBlueLight(int iCameraId, int LightValue);
///
/// 设置点光
///
/// 相机Id
/// 灯光值
/// 成功返回0,否则返回错误码
long SetPointLight(int iCameraId, int LightValue);
///
/// 获取灯光值
///
/// 相机Id
/// 红光。值为-1时,表示没有该灯
/// 绿光。值为-1时,表示没有该灯
/// 蓝光。值为-1时,表示没有该灯
/// 点光。值为-1时,表示没有该灯
/// 成功返回0,否则返回错误码
long GetLight(int iCameraId, int& redLightValue, int& greenLightValue, int& blueLightValue, int& pointLightValue);
///
/// 获取相机图像。调用后会阻塞,直到有新的相机图像时才返回
///
/// 相机Id
///
/// 成功返回0,否则返回错误码
long GrabImage(int iCameraId, ImageInfo& image);
///
/// 获取相机列表
///
/// 相机列表
/// 成功返回0,否则返回错误码
long GetCameraList(vector& vecCamera);
///
/// 相机移动到显示位置
///
///
///
///
///
long CameraMove(int iCameraId, double x, double y);
//设置相机显示回调
long SetVideoCallBackFunc(int iCameraId, CallVideoBack func);
};
}