예제 #1
0
        public override void GoToNextState(MDB_BOARD board, bool state)
        {
            state_number = 4;
            board.test_result[state_number] = state ? 1 : 0;
            board.UpdateList(state_number, state);

            if (board.MDB_MOD)
            {
                board.test_result[5]  = state ? 1 : 0;
                board.BoardTestStatus = state ? 1 : 0;

                if (usb_volt != null)
                {
                    board.UpdateList(5, state);
                }

                board.State = new SQL_Update();
            }
            else if (state)
            {
                board.UpdateMessage = "Device Current: " + device_current + "mA";
                board.State         = new Led_State();
            }
            else
            {
                board.BoardErrorDescription = "Failed to Read Device Current";
                board.UpdateMessage         = "Failed to Read Device Current";
                board.State = new ErrorState();
            }
        }
예제 #2
0
        public override void GoToNextState(MDB_BOARD board, bool state)
        {
            state_number = 1;
            board.UpdateList(0, state);
            board.UpdateList(state_number, state);


            board.test_result[0]            = state ? 1 : 0;
            board.test_result[state_number] = state ? 1 : 0;

            if (state)
            {
                board.UpdateMessage = "Leds Test Passed";
                board.State         = new RelayState();
            }
            else
            {
                board.BoardErrorDescription = "Leds Test Failed";
                board.UpdateMessage         = "Leds Test Failed";
                board.State = new ErrorState();
            }
        }
예제 #3
0
        public override void GoToNextState(MDB_BOARD board, bool state)
        {
            state_number = 3;
            board.test_result[state_number] = state ? 1 : 0;
            board.UpdateList(state_number, state);

            if (state)
            {
                board.UpdateMessage = "RS232 Test Passed";
                board.State         = new DeviceCurrent();
            }
            else
            {
                board.BoardErrorDescription = "RS232 Test Failed";
                board.UpdateMessage         = "RS232 Test Failed";
                board.State = new ErrorState();
            }
        }