using Cognex.VisionPro;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LampInspectionMachine.Cameralibs
{
public interface ICamera
{
string Name { get; }
Guid ID { get; }
///
/// 相机品牌
///
CameraBrand CameraBrand { get; }
///
/// 厂商名
///
string ManufacturerName { get; }
///
/// 相机型号
///
string ModelName { get; }
///
/// 相机序列号
///
string SerialNumber { get; }
///
/// 相机类型
///
CameraType CameraType { get; }
///
/// 正在采集图像
///
bool IsGrabbing { get; }
///
/// 相机图像
///
ICogImage Image { get; }
bool IsConnected { get; }
///
/// 采集用时
///
TimeSpan TotalTime { get; }
///
/// 错误信息
///
string ErrorMessage { get; }
List GetListEnum();
///
/// 打开相机
///
///
bool OpenDevice();
///
/// 关闭相机
///
void CloseDevice();
void SetTriggerModeOn();
void SetTriggerModeOff();
void SetTriggerSoftware(int value = 7);
///
/// 采集单张图片
///
///
ICogImage Grab();
///
/// 开始实时采集图像
///
void StartGrabbing();
///
/// 停止实时采集图像
///
void StopGrabbing();
///
/// 设置曝光时间
///
///
///
bool SetExposureTime(float ExposureTime);
///
/// 获取曝光时间
///
///
float GetExposureTime();
///
/// 设置增益
///
///
///
bool SetGain(float Gain);
///
/// 获取增益
///
///
float GetGain();
///
/// 图像回调
///
event Action ImageCallbackEvent;
///
/// 相机连接状态变更时
///
event Action CameraConnectChangedEvent;
bool CheckImageCallbackEvent(Action action);
}
}