using Cognex.VisionPro; using LampInspectionMachine.Cameralibs; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace LampInspectionMachine.Interfaces { 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; } UInt32 ImageWidth { get; } UInt32 ImageHeight { get; } /// /// 打开相机 /// /// bool OpenDevice(); /// /// 关闭相机 /// void CloseDevice(); /// /// 采集单张图片 /// /// ICogImage Grab(); /// /// 开始实时采集图像 /// void StartGrabbing(); /// /// 停止实时采集图像 /// void StopGrabbing(); /// /// 设置曝光时间 /// /// /// bool SetExposureTime(float ExposureTime); /// /// 获取曝光时间 /// /// float GetExposureTime(); /// /// 设置增益 /// /// /// bool SetGain(float Gain); /// /// 获取增益 /// /// float GetGain(); /// /// 获取触发模式 /// /// bool GetTriggerMode(); /// /// 设置触发模式 /// /// /// /// bool SetTriggerMode(bool mode, int triggerSource); /// /// 设置触发源 /// /// /// bool SetTriggerSource(int source); /// /// 获取触发源 /// /// int GetTriggerSource(); /// /// 软触发 /// void TriggerSoftware(); /// /// 图像回调 /// event Action ImageCallbackEvent; /// /// 触发取图回调事件 /// event Action GrabImageCallbackEvent; /// /// 相机连接状态变更时 /// event Action CameraConnectChangedEvent; } }