Esempio n. 1
0
        /// <summary>
        /// 方法:设置触发信号边缘
        /// [注:用于触发源为硬触发
        /// 并非大恒USB2.0相机支持边缘信号
        /// 故不再设置触发信号边缘]
        /// </summary>
        /// <param name="dege">边缘信号</param>
        /// <returns></returns>
        protected override bool DoSetTriggerActivation(ProCommon.Communal.EffectiveSignal edge)
        {
            bool rt = false;

            USBCamera.HVSTATUS status = USBCamera.HVSTATUS.STATUS_OK;
            try
            {
                if (_deviceRef != System.IntPtr.Zero)
                {
                    switch (edge)
                    {
                    case ProCommon.Communal.EffectiveSignal.FallEdge:
                        break;

                    case ProCommon.Communal.EffectiveSignal.RaiseEdge:
                        break;

                    default:
                        break;
                    }

                    rt = (USBCamera.HVSTATUS.STATUS_OK == status) ? true : false;
                    if (!rt)
                    {
                        if (DriverExceptionDel != null)
                        {
                            DriverExceptionDel(string.Format("错误:大恒USB2.0相机设置触发信号边沿失败!\n错误代码:{0:X8}", System.Convert.ToInt32(status)));
                        }
                    }
                }
                else
                {
                    if (DriverExceptionDel != null)
                    {
                        DriverExceptionDel(string.Format("错误:大恒USB2.0相机设置设备采集模式失败!\n错误描述:{0}", "设备未连接"));
                    }
                }
            }
            catch
            {
            }
            finally
            {
            }

            return(rt);
        }
Esempio n. 2
0
 public bool SetTriggerActivation(ProCommon.Communal.EffectiveSignal edge)
 {
     return(DoSetTriggerActivation(edge));
 }
Esempio n. 3
0
 protected abstract bool DoSetTriggerActivation(ProCommon.Communal.EffectiveSignal edge);