Esempio n. 1
0
 public bool SwitchDetector(DataModelLaserInnolas.InnolasChannelSwitch channelNumber, string calibrationFilePath)
 {
     try
     {
         _laserCalibrationFile = new LaserCalibrationTable();
         string errorMessage;
         if (!_laserCalibrationFile.LoadFile(calibrationFilePath, out errorMessage))
         {
             /**/ //  HardwareMonitorReport((ulong)DeviceErrorCode.CalibrationFileError, new string[] { errorMessage });
             GUI_Communicator.sendStatus("Laser", "HardwareMonitor", errorMessage);
         }
         else
         {
             if (_previousUndividedTriggerRate != 0)
             {
                 if (_previousUndividedTriggerRate != _laserCalibrationFile.LaserUndividedTriggerRate)
                 {
                     /**/ //       MSOTService.IMSOTLog.HandleError(EnumLogType.Warning, DisplayName,
                     /**/ //           "Laser Calibration file defines a different undivided trigger rate than the previous file, new: " + _laserCalibrationFile.LaserUndividedTriggerRate +
                     /**/ //    " old: "+_previousUndividedTriggerRate);
                     GUI_Communicator.sendError("Laser", "ErrorDisplay", "Laser Calibration file defines a different undivided trigger rate than the previous file, new: " + _laserCalibrationFile.LaserUndividedTriggerRate + " old: " + _previousUndividedTriggerRate);
                 }
             }
             _previousUndividedTriggerRate = _laserCalibrationFile.LaserUndividedTriggerRate;
             /**/ //     MSOTService.IMSOTLog.HandleError(EnumLogType.Info, DisplayName, "Laser Calibration file info: " + _laserCalibrationFile.Description);
             GUI_Communicator.sendStatus("Laser", "ErrorDisplay", "Laser Calibration file info: " + _laserCalibrationFile.Description);
             string laserFileSummary;
             AvailableTriggerRates = new ObservableCollection <double>(_laserCalibrationFile.GetTriggerRates(out laserFileSummary));
             switchChannel(channelNumber);
             /**/ //  MSOTService.IMSOTLog.HandleError(EnumLogType.Info, DisplayName, laserFileSummary);
             GUI_Communicator.sendStatus("Laser", "ErrorDisplay", laserFileSummary);
             return(true);
         }
Esempio n. 2
0
 protected abstract bool switchChannel(DataModelLaserInnolas.InnolasChannelSwitch number);