diff --git a/Common/Production/ProductionUiCordonel/App.config b/Common/Production/ProductionUiCordonel/App.config index 23952da7..45ce790e 100644 --- a/Common/Production/ProductionUiCordonel/App.config +++ b/Common/Production/ProductionUiCordonel/App.config @@ -34,7 +34,7 @@ - + diff --git a/Common/Production/ProductionUiCordonel/ProductionProcesses/EolProcesses/CheckRadio.cs b/Common/Production/ProductionUiCordonel/ProductionProcesses/EolProcesses/CheckRadio.cs index 799d0572..7f8f7085 100644 --- a/Common/Production/ProductionUiCordonel/ProductionProcesses/EolProcesses/CheckRadio.cs +++ b/Common/Production/ProductionUiCordonel/ProductionProcesses/EolProcesses/CheckRadio.cs @@ -6,7 +6,6 @@ using System.Collections.Generic; using System.Linq; using System.Net; using System.Threading; -using System.Windows.Interop; using System.Windows.Threading; using System.Xml.Linq; using Xylem.Common.CommonCore.Configuration; @@ -236,7 +235,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.EolPr // Initialize the SIRT if (!SirtInit()) { - return SetTestFailed(Resources.StrErrorMsgSirt); + return SetTestFailed(Resources.StrErrorMsgRssiSirt); } //FrequencyIndicator @@ -286,9 +285,8 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.EolPr int.TryParse(sirtConfig.SirtComport868MHz.Replace("COM", ""), out _sirtComport); } - var ServicePorts = new List(); - var cport = 0; - if (sirtConfig.ServiceSirtComport433MHz != null && int.TryParse(sirtConfig.ServiceSirtComport433MHz.Replace("COM", ""), out cport)) + var ServicePorts = new List(); + if (sirtConfig.ServiceSirtComport433MHz != null && int.TryParse(sirtConfig.ServiceSirtComport433MHz.Replace("COM", ""), out var cport)) { ServicePorts.Add(cport); } @@ -316,14 +314,26 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.EolPr { try { - SIRTServer.StartServer(SuccessMsgDispatcher, ErrorMsgDispatcher, ServicePorts.ToArray()); - SIRTServer.StartProgramming(Convert.ToInt32(freq), _radioAddressCordonel, meterEncryptionKey); + if (!SIRTServer.StartServer(SuccessMsgDispatcher, ErrorMsgDispatcher, ServicePorts.ToArray())) + { + return SetTestFailed(Resources.StrErrorMsgServiceSirtServerStart); + } + + if (!SIRTServer.StartProgramming(Convert.ToInt32(freq), _radioAddressCordonel, + meterEncryptionKey)) + { + return SetTestFailed(Resources.StrErrorMsgServiceSirtProgramming); + } } catch (Exception ex) { ErrorMsgDispatcher(ex.Message); } } + else + { + WarningMsgDispatcher(Resources.StrWarningMsgServiceSirtSkipped); + } // Clear the measurement as on a retry started from main control the old values will be displayed ClearRssiMeasurement(); @@ -365,7 +375,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.EolPr // If radio check is enabled the signal level has to be in range and the test has to be finished || (!skipRadioCheck && (!_successSignalLevel || !_sirtComOkay || !_testFinished))) { - return SetTestFailed(!_sirtComOkay ? Resources.StrErrorMsgSirt : Resources.StrErrorMsgRadioCheck); + return SetTestFailed(!_sirtComOkay ? Resources.StrErrorMsgRssiSirt : Resources.StrErrorMsgRadioCheck); } SuccessMsgDispatcher(Resources.StrSuccessMsgRadioInCustomerMode); diff --git a/Common/Production/ProductionUiCordonel/Properties/Resources.Designer.cs b/Common/Production/ProductionUiCordonel/Properties/Resources.Designer.cs index 42ea54cb..c1830684 100644 --- a/Common/Production/ProductionUiCordonel/Properties/Resources.Designer.cs +++ b/Common/Production/ProductionUiCordonel/Properties/Resources.Designer.cs @@ -933,6 +933,15 @@ namespace Xylem.Common.Production.ProductionUiCordonel.Properties { } } + /// + /// Looks up a localized string similar to ERROR: RSSI SIRT could not be initialized . + /// + internal static string StrErrorMsgRssiSirt { + get { + return ResourceManager.GetString("StrErrorMsgRssiSirt", resourceCulture); + } + } + /// /// Looks up a localized string similar to ERROR: Order number scan failed. /// @@ -978,6 +987,24 @@ namespace Xylem.Common.Production.ProductionUiCordonel.Properties { } } + /// + /// Looks up a localized string similar to ERROR: Service SIRT programming failed . + /// + internal static string StrErrorMsgServiceSirtProgramming { + get { + return ResourceManager.GetString("StrErrorMsgServiceSirtProgramming", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ERROR: Service SIRT message server start failed . + /// + internal static string StrErrorMsgServiceSirtServerStart { + get { + return ResourceManager.GetString("StrErrorMsgServiceSirtServerStart", resourceCulture); + } + } + /// /// Looks up a localized string similar to ERROR: Error saving RSSI to database failed. /// @@ -987,15 +1014,6 @@ namespace Xylem.Common.Production.ProductionUiCordonel.Properties { } } - /// - /// Looks up a localized string similar to ERROR: SIRT could not be initialized . - /// - internal static string StrErrorMsgSirt { - get { - return ResourceManager.GetString("StrErrorMsgSirt", resourceCulture); - } - } - /// /// Looks up a localized string similar to ERROR: SIRT telegram is too short. /// @@ -2498,5 +2516,14 @@ namespace Xylem.Common.Production.ProductionUiCordonel.Properties { return ResourceManager.GetString("StrWarningMsgRepeatedAccumulatorReset", resourceCulture); } } + + /// + /// Looks up a localized string similar to WARNING: Service SIRT alarm mask setup skipped . + /// + internal static string StrWarningMsgServiceSirtSkipped { + get { + return ResourceManager.GetString("StrWarningMsgServiceSirtSkipped", resourceCulture); + } + } } } diff --git a/Common/Production/ProductionUiCordonel/Properties/Resources.de.resx b/Common/Production/ProductionUiCordonel/Properties/Resources.de.resx index 65982e8f..96c77a5f 100644 --- a/Common/Production/ProductionUiCordonel/Properties/Resources.de.resx +++ b/Common/Production/ProductionUiCordonel/Properties/Resources.de.resx @@ -424,8 +424,17 @@ FEHLER: Funkmodul nicht im Kundenmodus - - FEHLER: SIRT konnte nicht initialisiert werden + + FEHLER: RSSI SIRT konnte nicht initialisiert werden + + + FEHLER: Service SIRT Programmierung fehlgeschlagen + + + FEHLER: Service SIRT Start des Messageserves fehlgeschlagen + + + WARNUNG: Service SIRT Alarmmaskeneinstellung übersprungen FEHLER: Funkverschlüsselungscode fehlerhaft diff --git a/Common/Production/ProductionUiCordonel/Properties/Resources.resx b/Common/Production/ProductionUiCordonel/Properties/Resources.resx index a5bd96f2..95a131c4 100644 --- a/Common/Production/ProductionUiCordonel/Properties/Resources.resx +++ b/Common/Production/ProductionUiCordonel/Properties/Resources.resx @@ -424,8 +424,17 @@ ERROR: Radio not in customer mode - - ERROR: SIRT could not be initialized + + ERROR: RSSI SIRT could not be initialized + + + ERROR: Service SIRT programming failed + + + ERROR: Service SIRT message server start failed + + + WARNING: Service SIRT alarm mask setup skipped ERROR: Radio encryption code wrong