Esempio n. 1
0
 /// <summary>
 ///
 /// </summary>
 protected RuntimeDeviceBase(IApplicationSettingsService applicationSettingsService,
                             IRuntimeModeDriversService runtimeModeDriversService,
                             ApplicationConnectionService.ApplicationConnectionService applicationConnectionService,
                             IDeviceTimerInterrogationService timerInterrigationService, IDefectState defectState,
                             IDeviceDataCache deviceDataCache, IAnalogData analogData, IResistorFactory resistorFactory,
                             ICustomItemsFactory customItemsFactory, ConnectionLogger connectionLogger)
 {
     _applicationSettingsService   = applicationSettingsService;
     _runtimeModeDriversService    = runtimeModeDriversService;
     _applicationConnectionService = applicationConnectionService;
     _timerInterrigationService    = timerInterrigationService;
     _resistorFactory    = resistorFactory;
     _customItemsFactory = customItemsFactory;
     _connectionLogger   = connectionLogger;
     this._starterToLighttingModeDictionary = new Dictionary <int, LightingModeEnum>();
     this._starterToLighttingModeDictionary.Add(1, LightingModeEnum.UNDEFINED);
     this._starterToLighttingModeDictionary.Add(2, LightingModeEnum.UNDEFINED);
     this._starterToLighttingModeDictionary.Add(3, LightingModeEnum.UNDEFINED);
     _timerInterrigationService.SetDeviceForInterrogation(this);
     _timerInterrigationService.InterrogationCycleComplete += () =>
     {
         DeviceValuesUpdated?.Invoke();
     };
     DefectState       = defectState;
     DeviceDataCache   = deviceDataCache;
     AnalogData        = analogData;
     ResistorsOnDevice = new List <IResistor>();
     StartersOnDevice  = new List <IStarter>();
 }
Esempio n. 2
0
 /// <summary>
 ///     Creates an instance of <see cref="DefaultRuntimeModeDevicesService" />
 /// </summary>
 /// <param name="persistanceService">
 ///     An instance of <see cref="IPersistanceService" /> to use
 /// </param>
 /// <param name="container"></param>
 /// <param name="driversService">
 ///     An instance of <see cref="DefaultRuntimeModeDevicesService" /> to use
 /// </param>
 public DefaultRuntimeModeDevicesService(IPersistanceService persistanceService,
                                         IUnityContainer container,
                                         IRuntimeModeDriversService driversService)
 {
     this._persistanceService = persistanceService;
     _container           = container;
     this._driversService = driversService;
     this.Initialization  = this.OnInitializating();
 }
Esempio n. 3
0
 public Runo3RuntimeDevice(IApplicationSettingsService applicationSettingsService,
                           IRuntimeModeDriversService runtimeModeDriversService, IRuno3StarterFactory runo3StarterFactory,
                           ApplicationConnectionService.ApplicationConnectionService applicationConnectionService,
                           IDeviceTimerInterrogationService timerInterrigationService, IDefectState defectState, IDeviceDataCache deviceDataCache, IAnalogData analogData, IResistorFactory resistorFactory, ICustomItemsFactory customItemsFactory, ConnectionLogger connectionLogger) : base(
         applicationSettingsService, runtimeModeDriversService,
         applicationConnectionService, timerInterrigationService, defectState, deviceDataCache, analogData, resistorFactory, customItemsFactory, connectionLogger)
 {
     _runo3StarterFactory = runo3StarterFactory;
 }
Esempio n. 4
0
 public Picon2RuntimeDevice(IApplicationSettingsService applicationSettingsService,
                            IRuntimeModeDriversService runtimeModeDriversService, Picon2StarterFactory picon2StarterFactory,
                            ApplicationConnectionService.ApplicationConnectionService applicationConnectionService,
                            IDeviceTimerInterrogationService timerInterrigationService, IDefectState defectState, IDeviceDataCache deviceDataCache, IAnalogData analogData, IResistorFactory resistorFactory, ICustomItemsFactory customItemsFactory, ConnectionLogger connectionLogger) : base(
         applicationSettingsService, runtimeModeDriversService,
         applicationConnectionService, timerInterrigationService, defectState, deviceDataCache, analogData, resistorFactory, customItemsFactory, connectionLogger)
 {
     _picon2StarterFactory = picon2StarterFactory;
     Picon2ModuleInfo      = new Picon2ModuleInfo();
 }
Esempio n. 5
0
 private void OnDispose()
 {
     this._persistanceService = null;
     this._driversService     = null;
 }
Esempio n. 6
0
        /// <summary>
        ///     Create a instance of <see cref="SchemeModeRuntimeViewModel"/>
        /// </summary>
        public SchemeModeRuntimeViewModel(IInteractionService interactionService,
                                          IPersistanceService persistanceService, IRuntimeModeDevicesServices devicesServices,
                                          IRuntimeModeDriversService driversService, IDeviceCommandQueueViewModel deviceCommandQueueViewModel,
                                          IDataLoadingService dataLoadingService, IGlobalDefectAcknowledgingService globalDefectAcknowledgingService,
                                          ILogInteractionViewModel logInteractionViewModel,
                                          IOutgoingLinesViewModelFactory outgoingLinesViewModelFactory, IAnalogMeterViewModelFactory analogMeterViewModelFactory, IUnityContainer container)
        {
            Guard.AgainstNullReference(interactionService, "interactionService");
            Guard.AgainstNullReference(persistanceService, "persistanceService");
            Guard.AgainstNullReference(devicesServices, "devicesServices");
            Guard.AgainstNullReference(driversService, "driversService");
            this._interactionService          = interactionService;
            this._persistanceService          = persistanceService;
            this._devicesServices             = devicesServices;
            this._driversService              = driversService;
            _dataLoadingService               = dataLoadingService;
            _globalDefectAcknowledgingService = globalDefectAcknowledgingService;
            _logInteractionViewModel          = logInteractionViewModel;
            _outgoingLinesViewModelFactory    = outgoingLinesViewModelFactory;
            _analogMeterViewModelFactory      = analogMeterViewModelFactory;
            _container = container;
            DeviceCommandQueueViewModel = deviceCommandQueueViewModel;

            this.BusLinkVisibleCollection = new ObservableCollection <bool>(new List <bool> {
                false, false, false
            });

            this.Starter1ToResistorsLink = new ObservableCollection <bool>(new List <bool>(8))
            {
                false,
                false,
                false,
                false,
                false,
                false,
                false,
                false,
                false,
                false,
                false
            };
            this.Starter2ToResistorsLink =
                new ObservableCollection <bool>(new List <bool>(8)
            {
                false,
                false,
                false,
                false,
                false,
                false,
                false,
                false,
                false,
                false,
                false
            });
            this.Starter3ToResistorsLink =
                new ObservableCollection <bool>(new List <bool>(8)
            {
                false,
                false,
                false,
                false,
                false,
                false,
                false,
                false,
                false,
                false,
                false
            });
            this._linksCollections    = new ObservableCollection <bool> [3];
            this._linksCollections[0] = Starter1ToResistorsLink;
            this._linksCollections[1] = Starter2ToResistorsLink;
            this._linksCollections[2] = Starter3ToResistorsLink;

            OpenPicon2ModuleInformationCommand = new DelegateCommand(OnOpenPicon2ModuleInformationExecute);
        }