Ejemplo n.º 1
0
 public TestResults()
 {
     RCC = RCCResult.OPRESULT_NONE;
 }
Ejemplo n.º 2
0
        internal DeviceState Start(TestParameters Parameters, Types.Commutation.TestParameters commParameters, out RCCResult resultRCC)
        {
            m_Parameters = Parameters;

            if (m_State == DeviceState.InProcess)
            {
                throw new Exception("RCC test is already started.");
            }

            m_Result            = new TestResults();
            m_Result.TestTypeId = m_Parameters.TestTypeId;

            m_Stop = false;

            if (!m_IsEmulation)
            {
                //результат прозвонки цепи катод-катод не определён
                resultRCC = RCCResult.OPRESULT_NONE;

                //смотрим состояние Gate
                m_IOGate.ClearWarning();
                ushort State = m_IOGate.ReadDeviceState();

                switch (State)
                {
                case (ushort)Types.Gate.HWDeviceState.Fault:
                    ushort faultReason = m_IOGate.ReadFaultReason();
                    FireNotificationEvent(ComplexParts.Gate, (ushort)HWProblemReason.None, (ushort)HWWarningReason.None, faultReason, (ushort)HWDisableReason.None);

                    return((DeviceState)State);

                case (ushort)Types.Gate.HWDeviceState.Disabled:
                    ushort disableReason = m_IOGate.ReadDisableReason();
                    FireNotificationEvent(ComplexParts.Gate, (ushort)HWProblemReason.None, (ushort)HWWarningReason.None, (ushort)HWFaultReason.None, disableReason);

                    return((DeviceState)State);
                }
            }

            MeasurementLogicRoutine(commParameters);

            resultRCC = m_Result.RCC;

            return(m_State);
        }