Exemplo n.º 1
0
        private void GetCalibration()
        {
            CalibrationForAIO calibrationForAio = null;

            try
            {
                calibrationForAio = channel.GetCalibrationForAIO(this.Id);
            }
            catch (System.Exception ex)
            {
                logger.LogException(LogLevel.Info, string.Format("MonitoringAIOServer.GetCalibration.{0}", this.Id), ex);
                return;
            }

            if (calibrationForAio == null)
            {
                IsCalibrationFetched = true;
                return;
            }

            this.Calibration          = calibrationForAio.CalibrationValue;
            this.CalibrationOperation = (CalibrationOperation)calibrationForAio.CalibrationOperation;

            IsCalibrationFetched = true;
        }
Exemplo n.º 2
0
        private void GetCalibration()
        {
            CalibrationForAIO result = null;

            try
            {
                result = channel.GetCalibrationForAIO(this.Id);
            }
            catch (System.Exception ex)
            {
                logger.LogException(LogLevel.Info, string.Format("MonitoringAIO.GetCalibration.{0}", this.Id), ex);
                return;
            }

            if (result != null)
            {
                this.Calibration          = result.CalibrationValue;
                this.CalibrationOperation = (CalibrationOperation)result.CalibrationOperation;
            }

            IsCalibrationFetched = true;
        }