public override int Execute()
        {
            tcc.NotifyUI(TestCoreMessages.TypeMessage.WARNING, rm.GetString("tcMobIntStationCExecuting"));

            try
            {
                for (int i = 0; i <= recycle; i++)
                {
                    result = AdbManager.DTV.Tune(frequency, tcc.ManageUsb);
                    if (result.Result != AdbManager.CommandResult.OK)
                    {
                        base.ResulTest = TestEvaluateResult.BLOCKED;
                        tcc.NotifyUI(TestCoreMessages.TypeMessage.ERROR, rm.GetString("tcMobIntComFailTuneFrequency"));
                        tcc.NotifyUI(TestCoreMessages.TypeMessage.ERROR, "\t" + result.Comments);
                        return(TestCoreMessages.ERROR);
                    }
                }
            }
            catch (Exception ex)
            {
                base.ResulTest = TestEvaluateResult.BLOCKED;
                tcc.NotifyUI(TestCoreMessages.TypeMessage.ERROR, rm.GetString("tcMobIntComFailTuneFrequency"));
                tcc.NotifyUI(TestCoreMessages.TypeMessage.ERROR, "\t" + ex.Message);
                return(TestCoreMessages.ERROR);
            }

            return(TestCoreMessages.SUCCESS);
        }
Beispiel #2
0
        public override int Prepare()
        {
            try
            {
                tcc.NotifyUI(TestCoreMessages.TypeMessage.WARNING, rm.GetString("tcLedVerificationPreparing"));

                //Turn PSU2 ON
                if (tcc.PwrSupply.SetCharger5V() != TestCoreMessages.SUCCESS)
                {
                    base.ResulTest = TestEvaluateResult.BLOCKED;
                    tcc.NotifyUI(TestCoreMessages.TypeMessage.ERROR, rm.GetString("tcLedVerificationFailSetCharger"));
                    return(TestCoreMessages.ERROR);
                }

                //Turn off all SNAP Leds
                result = adbManagerLed.TurnAllOff();
                if (result.Result != AdbManager.CommandResult.OK)
                {
                    base.ResulTest = TestEvaluateResult.BLOCKED;
                    tcc.NotifyUI(TestCoreMessages.TypeMessage.ERROR, rm.GetString("tcLedVerificationFailTurnOffAllLeds"));
                    tcc.NotifyUI(TestCoreMessages.TypeMessage.ERROR, "\t" + result.Comments);
                    return(TestCoreMessages.ERROR);
                }
            }
            catch (Exception ex)
            {
                base.ResulTest = TestEvaluateResult.BLOCKED;
                tcc.NotifyUI(TestCoreMessages.TypeMessage.ERROR, rm.GetString("tcLedVerificationFailTurnOffAllLeds"));
                tcc.NotifyUI(TestCoreMessages.TypeMessage.ERROR, "\t" + ex.Message);
                return(TestCoreMessages.ERROR);
            }

            return(TestCoreMessages.SUCCESS);
        }
        public override int Prepare()
        {
            tcc.NotifyUI(TestCoreMessages.TypeMessage.WARNING, rm.GetString("tcTunerVerificationPreparing"));

            try
            {
                //TODO: Injetar a frequencia no celular pelo DTV Generator...

                result = AdbManager.DTV.Tune(frequency, tcc.ManageUsb);
                if (result.Result != AdbManager.CommandResult.OK)
                {
                    base.ResulTest = TestEvaluateResult.BLOCKED;
                    tcc.NotifyUI(TestCoreMessages.TypeMessage.ERROR, rm.GetString("tcTunerVerificationFailTuneFrequency"));
                    tcc.NotifyUI(TestCoreMessages.TypeMessage.ERROR, "\t" + result.Comments);
                    return(TestCoreMessages.ERROR);
                }

                if (result.Comments.Equals("LOCK=NO"))
                {
                    base.ResulTest = TestEvaluateResult.BLOCKED;
                    tcc.NotifyUI(TestCoreMessages.TypeMessage.ERROR, rm.GetString("tcTunerVerificationFrequencyHasNoSignal"));
                    tcc.NotifyUI(TestCoreMessages.TypeMessage.ERROR, "\t" + result.Comments);
                    return(TestCoreMessages.ERROR);
                }
            }
            catch (Exception ex)
            {
                base.ResulTest = TestEvaluateResult.BLOCKED;
                tcc.NotifyUI(TestCoreMessages.TypeMessage.ERROR, rm.GetString("tcTunerVerificationFailPreparing"));
                tcc.NotifyUI(TestCoreMessages.TypeMessage.ERROR, "\t" + ex.Message);
                return(TestCoreMessages.ERROR);
            }

            return(TestCoreMessages.SUCCESS);
        }
Beispiel #4
0
        public override int Prepare()
        {
            tcc.NotifyUI(TestCoreMessages.TypeMessage.WARNING, rm.GetString("tcLedVerifyWithCamPreparing"));

            try
            {
                tcc.NotifyUI(TestCoreMessages.TypeMessage.START_CAMERA, "Starting Camera...");

                //Turn off all SNAP Leds
                adbResult = adbManagerLed.TurnAllOff();
                if (adbResult.Result != AdbManager.CommandResult.OK)
                {
                    base.ResulTest = TestEvaluateResult.BLOCKED;
                    tcc.NotifyUI(TestCoreMessages.TypeMessage.ERROR, rm.GetString("tcLedVerifyWithCamFailTurnOffAllLeds"));
                    tcc.NotifyUI(TestCoreMessages.TypeMessage.ERROR, "\t" + adbResult.Comments);
                    return(TestCoreMessages.ERROR);
                }
            }
            catch (Exception ex)
            {
                tcc.NotifyUI(TestCoreMessages.TypeMessage.ERROR, ex.Message);
                tcc.NotifyUI(TestCoreMessages.TypeMessage.STOP_CAMERA, ex.Message);
                return(TestCoreMessages.ERROR);
            }

            return(TestCoreMessages.SUCCESS);
        }
Beispiel #5
0
        public override int Execute()
        {
            tcc.NotifyUI(TestCoreMessages.TypeMessage.WARNING, rm.GetString("tcLedVerifyWithCamExecuting"));

            try
            {
                //Test leds
                tcc.NotifyUI(TestCoreMessages.TypeMessage.GET_FRAME_LED_OFF, "Turning all LEDs off...");
                if (captureLedFrame(AdbManager.LED.ID.LED25) == TestCoreMessages.SUCCESS)
                {
                    tcc.NotifyUI(TestCoreMessages.TypeMessage.PROCESS_DETECTION, "Detecting LED 25%...");
                    AutomatedInspection.waitUntilProcessingDetection();
                    autInspResultLed025 = AutomatedInspection.getResult();
                    tcc.NotifyUI(TestCoreMessages.TypeMessage.INFORMATION, autInspResultLed025.ToString());
                }

                tcc.NotifyUI(TestCoreMessages.TypeMessage.GET_FRAME_LED_OFF, "Turning all LEDs off...");
                if (captureLedFrame(AdbManager.LED.ID.LED50) == TestCoreMessages.SUCCESS)
                {
                    tcc.NotifyUI(TestCoreMessages.TypeMessage.PROCESS_DETECTION, "Detecting LED 50%...");
                    AutomatedInspection.waitUntilProcessingDetection();
                    autInspResultLed050 = AutomatedInspection.getResult();
                    tcc.NotifyUI(TestCoreMessages.TypeMessage.INFORMATION, autInspResultLed050.ToString());
                }

                tcc.NotifyUI(TestCoreMessages.TypeMessage.GET_FRAME_LED_OFF, "Turning all LEDs off...");
                if (captureLedFrame(AdbManager.LED.ID.LED75) == TestCoreMessages.SUCCESS)
                {
                    tcc.NotifyUI(TestCoreMessages.TypeMessage.PROCESS_DETECTION, "Detecting LED 75%...");
                    AutomatedInspection.waitUntilProcessingDetection();
                    autInspResultLed075 = AutomatedInspection.getResult();
                    tcc.NotifyUI(TestCoreMessages.TypeMessage.INFORMATION, autInspResultLed075.ToString());
                }

                tcc.NotifyUI(TestCoreMessages.TypeMessage.GET_FRAME_LED_OFF, "Turning all LEDs off...");
                if (captureLedFrame(AdbManager.LED.ID.LED100) == TestCoreMessages.SUCCESS)
                {
                    tcc.NotifyUI(TestCoreMessages.TypeMessage.PROCESS_DETECTION, "Detecting LED 100%...");
                    AutomatedInspection.waitUntilProcessingDetection();
                    autInspResultLed100 = AutomatedInspection.getResult();
                    tcc.NotifyUI(TestCoreMessages.TypeMessage.INFORMATION, autInspResultLed100.ToString());
                }
            }
            catch (Exception ex)
            {
                tcc.NotifyUI(TestCoreMessages.TypeMessage.ERROR, ex.Message);
                return(TestCoreMessages.ERROR);
            }

            adbResult = adbManagerLed.TurnAllOff();

            return(TestCoreMessages.SUCCESS);
        }
Beispiel #6
0
        public override int Execute()
        {
            tcc.NotifyUI(TestCoreMessages.TypeMessage.WARNING, rm.GetString("tcLedVerificationExecuting"));

            //Get Idle current
            for (int i = 0; i <= recycle; i++)
            {
                idleCurrent += tcc.PwrSupply.ReadChargerCurrent();
            }

            idleCurrent = idleCurrent / recycle;


            //Turn on all leds
            result = adbManagerLed.TurnAllOn();
            if (result == null || result.Result == AdbManager.CommandResult.FAIL)
            {
                base.ResulTest = TestEvaluateResult.BLOCKED;
                tcc.NotifyUI(TestCoreMessages.TypeMessage.ERROR, rm.GetString("tcLedVerificationFailTurnOnAllLeds"));
                tcc.NotifyUI(TestCoreMessages.TypeMessage.ERROR, "\t" + result.Comments);
                return(TestCoreMessages.ERROR);
            }

            //Get LEDS current
            for (int i = 0; i <= recycle; i++)
            {
                ledsCurrent += tcc.PwrSupply.ReadChargerCurrent();
            }

            if (recycle > 0)
            {
                ledsCurrent = ledsCurrent / recycle;
            }

            //Turn off all SNAP Leds
            result = adbManagerLed.TurnAllOff();
            if (result.Result != AdbManager.CommandResult.OK)
            {
                base.ResulTest = TestEvaluateResult.BLOCKED;
                tcc.NotifyUI(TestCoreMessages.TypeMessage.ERROR, rm.GetString("tcLedVerificationFailTurnOffAllLeds"));
                return(TestCoreMessages.ERROR);
            }

            return(TestCoreMessages.SUCCESS);
        }
Beispiel #7
0
        private int captureLedFrame(AdbManager.LED.ID led)
        {
            adbResult = adbManagerLed.TurnOn(led);
            if (adbResult == null || adbResult.Result == AdbManager.CommandResult.FAIL)
            {
                base.ResulTest = TestEvaluateResult.BLOCKED;
                tcc.NotifyUI(TestCoreMessages.TypeMessage.ERROR, rm.GetString("tcLedVerificationFailTurnOnAllLeds"));
                tcc.NotifyUI(TestCoreMessages.TypeMessage.ERROR, "\t" + adbResult.Comments);
                return(TestCoreMessages.ERROR);
            }

            tcc.NotifyUI(TestCoreMessages.TypeMessage.GET_FRAME_LED_ON, "Turning LED " + led + " on...");

            Thread.Sleep(1000);
            while (!AutomatedInspection.hasCapturedFrameLedTurnedOn())
            {
                Thread.Sleep(1000);
            }
            return(TestCoreMessages.SUCCESS);
        }
        public override int Execute()
        {
            tcc.NotifyUI(TestCoreMessages.TypeMessage.WARNING, rm.GetString("tcTunerVerificationExecuting"));

            try
            {
                result = AdbManager.DTV.GetRssi(frequency, tcc.ManageUsb);

                if (result.Result != AdbManager.CommandResult.OK)
                {
                    base.ResulTest = TestEvaluateResult.BLOCKED;
                    tcc.NotifyUI(TestCoreMessages.TypeMessage.ERROR, rm.GetString("tcTunerVerificationFailGetRssi"));
                    tcc.NotifyUI(TestCoreMessages.TypeMessage.ERROR, "\t" + result.Comments);
                    return(TestCoreMessages.ERROR);
                }

                string[] tempResult;

                tempResult = result.Comments.Split('=');

                measures += Double.Parse(tempResult[1]);

                if (recycle > 0)
                {
                    measures = measures / recycle;
                }
            }
            catch (Exception ex)
            {
                base.ResulTest = TestEvaluateResult.BLOCKED;
                tcc.NotifyUI(TestCoreMessages.TypeMessage.ERROR, rm.GetString("tcTunerVerificationFailExecuting"));
                tcc.NotifyUI(TestCoreMessages.TypeMessage.ERROR, "\t" + ex.Message);
                return(TestCoreMessages.ERROR);
            }

            return(TestCoreMessages.SUCCESS);
        }