Ejemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="Channel">Dut Channel</param>
        /// <returns></returns>
        private bool TriggerOutputSelect(int Channel) // 150511
        {
            lock (syncRoot)
            {
                try
                {
                    int TempValue = Convert.ToInt16(Channel - 1);
                    Bert_25G_V1.TriggerOutputWrite((ushort)TempValue, pDevice);

                    ushort TriggerIndex;

                    Bert_25G_V1.TriggerOutputRead(pDevice, out TriggerIndex);

                    if (TriggerIndex == (ushort)TempValue)
                    {
                        return(true);
                    }

                    return(false);
                }
                catch (InnoExCeption error)
                {
                    Log.SaveLogToTxt("ErrorCode=" + ExceptionDictionary.Code._Funtion_Fatal_0x05002 + "Reason=" + error.TargetSite.Name + "Fail");
                    throw error;
                }

                catch (Exception error)
                {
                    Log.SaveLogToTxt("ErrorCode=" + ExceptionDictionary.Code._Funtion_Fatal_0x05002 + "Reason=" + error.TargetSite.Name + "Fail");
                    throw new InnoExCeption(ExceptionDictionary.Code._Funtion_Fatal_0x05002, error.StackTrace);
                    // throw new InnoExCeption(ex);
                }
            }
        }