Пример #1
0
        public virtual void update(Observable paramObservable, object paramObject)
        {
            logger.info("start update method ");
            if (paramObject == null || !(paramObject is p2DeviceNotificationResult))
            {
                setChanged();
                notifyObservers(new p2AppManagerNotification(-1, p2Enumerations.p2AppManagerStatus.INVALID_NOTIFICATION_ERROR.NumVal, null));
            }
            p2DeviceNotificationResult p2DeviceNotificationResult = (p2DeviceNotificationResult)paramObject;

            p2Enumerations.p2DeviceAction p2DeviceAction = p2DeviceNotificationResult.Action;
            if (p2DeviceAction == null)
            {
                setChanged();
                notifyObservers(new p2AppManagerNotification(-1, p2Enumerations.p2AppManagerStatus.INVALID_ACTION_ERROR.NumVal, null));
            }
            string str = p2DeviceNotificationResult.DeviceId;

            if (p2AppManagerUtils.isEmptyString(str))
            {
                setChanged();
                notifyObservers(new p2AppManagerNotification(-1, p2Enumerations.p2AppManagerStatus.INVALID_DEVICE_ERROR.NumVal, null));
            }
            switch (null.a[p2DeviceAction.ordinal()])
            {
            case 1:
                logger.info("initialize core....");
                a(str, p2DeviceNotificationResult.Status);
                return;

            case 2:
                logger.info("run inter spec....");
                b(str, p2DeviceNotificationResult.Status);
                return;

            case 3:
                logger.info("run FFT settings inter spec....");
                c(str, p2DeviceNotificationResult.Status);
                return;

            case 4:
                logger.info("run FFT settings spec....");
                d(str, p2DeviceNotificationResult.Status);
                return;

            case 5:
                logger.info("run Gain Adjustment InterSpec....");
                e(str, p2DeviceNotificationResult.Status);
                return;

            case 6:
                logger.info("run Gain Adjustment Spec BG....");
                f(str, p2DeviceNotificationResult.Status);
                return;

            case 7:
                logger.info("run Gain Adjustment Spec Sample....");
                g(str, p2DeviceNotificationResult.Status);
                return;

            case 8:
                logger.info("run background ....");
                h(str, p2DeviceNotificationResult.Status);
                return;

            case 9:
                logger.info("run spectrocopy ....");
                i(str, p2DeviceNotificationResult.Status);
                return;

            case 10:
                logger.info("run BG wavelength calibration ....");
                j(str, p2DeviceNotificationResult.Status);
                return;

            case 11:
                logger.info("run wavelength calibration ....");
                k(str, p2DeviceNotificationResult.Status);
                return;

            case 12:
                logger.info("Setting Actuation....");
                l(str, p2DeviceNotificationResult.Status);
                return;

            case 13:
                logger.info("Burn Working Settings....");
                o(str, p2DeviceNotificationResult.Status);
                return;

            case 14:
                logger.info("Restore Default Settings");
                m(str, p2DeviceNotificationResult.Status);
                return;

            case 15:
                logger.info("run Interferogram Corr ....");
                n(str, p2DeviceNotificationResult.Status);
                return;
            }
            setChanged();
            notifyObservers(new p2AppManagerNotification(-1, p2Enumerations.p2AppManagerStatus.INVALID_ACTION_ERROR.NumVal, null));
        }
Пример #2
0
        public virtual void update(Observable paramObservable, object paramObject)
        {
            c_Conflict.info("start update method ");
            if (paramObject == null || !(paramObject is p2DeviceNotificationResult))
            {
                setChanged();
                notifyObservers(new p2AppManagerNotification(-1, p2Enumerations.p2AppManagerStatus.INVALID_NOTIFICATION_ERROR.NumVal, null));
            }
            p2DeviceNotificationResult p2DeviceNotificationResult = (p2DeviceNotificationResult)paramObject;

            p2Enumerations.p2DeviceAction p2DeviceAction = p2DeviceNotificationResult.Action;
            if (p2DeviceAction == null)
            {
                setChanged();
                notifyObservers(new p2AppManagerNotification(-1, p2Enumerations.p2AppManagerStatus.INVALID_ACTION_ERROR.NumVal, null));
            }
            string str = p2DeviceNotificationResult.DeviceId;

            if (p2AppManagerUtils.isEmptyString(str))
            {
                setChanged();
                notifyObservers(new p2AppManagerNotification(-1, p2Enumerations.p2AppManagerStatus.INVALID_DEVICE_ERROR.NumVal, null));
            }
            switch (null.a[p2DeviceAction.ordinal()])
            {
            case 1:
                c_Conflict.info("initialize core....");
                a(str, p2DeviceNotificationResult.Status);
                return;

            case 2:
                c_Conflict.info("run inter spec....");
                b(str, p2DeviceNotificationResult.Status);
                return;

            case 3:
                c_Conflict.info("run FFT settings inter spec....");
                c(str, p2DeviceNotificationResult.Status);
                return;

            case 4:
                c_Conflict.info("run FFT settings spec....");
                d(str, p2DeviceNotificationResult.Status);
                return;

            case 5:
                c_Conflict.info("run Gain Adjustment InterSpec....");
                e(str, p2DeviceNotificationResult.Status);
                return;

            case 6:
                c_Conflict.info("run Gain Adjustment Spec BG....");
                f(str, p2DeviceNotificationResult.Status);
                return;

            case 7:
                c_Conflict.info("run Gain Adjustment Spec Sample....");
                g(str, p2DeviceNotificationResult.Status);
                return;

            case 8:
                c_Conflict.info("run background ....");
                k(str, p2DeviceNotificationResult.Status);
                return;

            case 9:
                c_Conflict.info("run spectrocopy ....");
                l(str, p2DeviceNotificationResult.Status);
                return;

            case 10:
                c_Conflict.info("run BG wavelength calibration ....");
                m(str, p2DeviceNotificationResult.Status);
                return;

            case 11:
                c_Conflict.info("run wavelength calibration ....");
                n(str, p2DeviceNotificationResult.Status);
                return;

            case 12:
                c_Conflict.info("run SNR ....");
                h(str, p2DeviceNotificationResult.Status);
                return;

            case 13:
                c_Conflict.info("run Stability ....");
                i(str, p2DeviceNotificationResult.Status);
                return;

            case 14:
                c_Conflict.info("run Interferogram Corr ....");
                j(str, p2DeviceNotificationResult.Status);
                return;

            case 15:
                c_Conflict.info("Setting Actuation....");
                o(str, p2DeviceNotificationResult.Status);
                return;

            case 16:
                c_Conflict.info("Run CapTime Calibration....");
                p(str, p2DeviceNotificationResult.Status);
                return;

            case 17:
                c_Conflict.info("Run DelayCompensation Calibration....");
                q(str, p2DeviceNotificationResult.Status);
                return;

            case 18:
                c_Conflict.info("Run Core Calibration....");
                r(str, p2DeviceNotificationResult.Status);
                return;

            case 19:
                c_Conflict.info("Generate Calibration....");
                s(str, p2DeviceNotificationResult.Status);
                return;

            case 20:
                c_Conflict.info("Run Cap Current....");
                t(str, p2DeviceNotificationResult.Status);
                return;

            case 21:
                c_Conflict.info("Burn SampleID....");
                u(str, p2DeviceNotificationResult.Status);
                return;

            case 22:
                c_Conflict.info("Burn Sample Folders....");
                v(str, p2DeviceNotificationResult.Status);
                return;

            case 23:
                c_Conflict.info("Read Sample Folders....");
                y(str, p2DeviceNotificationResult.Status);
                return;

            case 24:
                c_Conflict.info("Read Temp....");
                z(str, p2DeviceNotificationResult.Status);
                return;

            case 25:
                c_Conflict.info("Read ASIC Registers....");
                A(str, p2DeviceNotificationResult.Status);
                return;

            case 26:
                c_Conflict.info("Write ASIC Registers....");
                B(str, p2DeviceNotificationResult.Status);
                return;

            case 27:
                c_Conflict.info("Calculate Response....");
                C(str, p2DeviceNotificationResult.Status);
                return;

            case 28:
                c_Conflict.info("Calculate Parameters....");
                D(str, p2DeviceNotificationResult.Status);
                return;

            case 29:
                c_Conflict.info("Trim Coefficients....");
                E(str, p2DeviceNotificationResult.Status);
                return;

            case 30:
                c_Conflict.info("Trim Phase....");
                F(str, p2DeviceNotificationResult.Status);
                return;

            case 31:
                c_Conflict.info("Trim Phase....");
                G(str, p2DeviceNotificationResult.Status);
                return;

            case 32:
                c_Conflict.info("Check Stability....");
                H(str, p2DeviceNotificationResult.Status);
                return;

            case 33:
                c_Conflict.info("Run Waveform....");
                I(str, p2DeviceNotificationResult.Status);
                return;

            case 34:
                c_Conflict.info("Burn Working Settings....");
                x(str, p2DeviceNotificationResult.Status);
                return;

            case 35:
                c_Conflict.info("Restore Default Settings");
                w(str, p2DeviceNotificationResult.Status);
                return;
            }
            setChanged();
            notifyObservers(new p2AppManagerNotification(-1, p2Enumerations.p2AppManagerStatus.INVALID_ACTION_ERROR.NumVal, null));
        }