ProductionUiCordonel: - Service SIRT handling
This commit is contained in:
parent
61c3583a95
commit
b7edd319d4
@ -34,7 +34,7 @@
|
||||
|
||||
|
||||
<appSettings>
|
||||
<add key="Mode" value="2" /> <!--1 = EOL ; 2 = Picking-->
|
||||
<add key="Mode" value="1" /> <!--1 = EOL ; 2 = Picking-->
|
||||
<!--add key="SirtComport433" value="14" /--> <!--Thomas 14; Roland ; Stoyan ; VFM1 9; VFM4 7-->
|
||||
<!--add key="SirtComport868" value="15" /--> <!--Thomas 15; Roland ; Stoyan ; VFM1 10; VFM4 8-->
|
||||
<!--add key="SirtBoxNr" value="2" /--> <!--Thomas 2; Roland 2; Stoyan 2; VFM1 1; VFM4 3-->
|
||||
|
||||
@ -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<int>();
|
||||
var cport = 0;
|
||||
if (sirtConfig.ServiceSirtComport433MHz != null && int.TryParse(sirtConfig.ServiceSirtComport433MHz.Replace("COM", ""), out cport))
|
||||
var ServicePorts = new List<Int32>();
|
||||
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);
|
||||
|
||||
@ -933,6 +933,15 @@ namespace Xylem.Common.Production.ProductionUiCordonel.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to ERROR: RSSI SIRT could not be initialized .
|
||||
/// </summary>
|
||||
internal static string StrErrorMsgRssiSirt {
|
||||
get {
|
||||
return ResourceManager.GetString("StrErrorMsgRssiSirt", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to ERROR: Order number scan failed.
|
||||
/// </summary>
|
||||
@ -978,6 +987,24 @@ namespace Xylem.Common.Production.ProductionUiCordonel.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to ERROR: Service SIRT programming failed .
|
||||
/// </summary>
|
||||
internal static string StrErrorMsgServiceSirtProgramming {
|
||||
get {
|
||||
return ResourceManager.GetString("StrErrorMsgServiceSirtProgramming", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to ERROR: Service SIRT message server start failed .
|
||||
/// </summary>
|
||||
internal static string StrErrorMsgServiceSirtServerStart {
|
||||
get {
|
||||
return ResourceManager.GetString("StrErrorMsgServiceSirtServerStart", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to ERROR: Error saving RSSI to database failed.
|
||||
/// </summary>
|
||||
@ -987,15 +1014,6 @@ namespace Xylem.Common.Production.ProductionUiCordonel.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to ERROR: SIRT could not be initialized .
|
||||
/// </summary>
|
||||
internal static string StrErrorMsgSirt {
|
||||
get {
|
||||
return ResourceManager.GetString("StrErrorMsgSirt", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to ERROR: SIRT telegram is too short.
|
||||
/// </summary>
|
||||
@ -2498,5 +2516,14 @@ namespace Xylem.Common.Production.ProductionUiCordonel.Properties {
|
||||
return ResourceManager.GetString("StrWarningMsgRepeatedAccumulatorReset", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to WARNING: Service SIRT alarm mask setup skipped .
|
||||
/// </summary>
|
||||
internal static string StrWarningMsgServiceSirtSkipped {
|
||||
get {
|
||||
return ResourceManager.GetString("StrWarningMsgServiceSirtSkipped", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -424,8 +424,17 @@
|
||||
<data name="StrErrorMsgRadioNotInCustomerMode" xml:space="preserve">
|
||||
<value>FEHLER: Funkmodul nicht im Kundenmodus</value>
|
||||
</data>
|
||||
<data name="StrErrorMsgSirt" xml:space="preserve">
|
||||
<value>FEHLER: SIRT konnte nicht initialisiert werden</value>
|
||||
<data name="StrErrorMsgRssiSirt" xml:space="preserve">
|
||||
<value>FEHLER: RSSI SIRT konnte nicht initialisiert werden</value>
|
||||
</data>
|
||||
<data name="StrErrorMsgServiceSirtProgramming" xml:space="preserve">
|
||||
<value>FEHLER: Service SIRT Programmierung fehlgeschlagen </value>
|
||||
</data>
|
||||
<data name="StrErrorMsgServiceSirtServerStart" xml:space="preserve">
|
||||
<value>FEHLER: Service SIRT Start des Messageserves fehlgeschlagen </value>
|
||||
</data>
|
||||
<data name="StrWarningMsgServiceSirtSkipped" xml:space="preserve">
|
||||
<value>WARNUNG: Service SIRT Alarmmaskeneinstellung übersprungen </value>
|
||||
</data>
|
||||
<data name="StrErrorMsgRadioKey" xml:space="preserve">
|
||||
<value>FEHLER: Funkverschlüsselungscode fehlerhaft</value>
|
||||
|
||||
@ -424,8 +424,17 @@
|
||||
<data name="StrErrorMsgRadioNotInCustomerMode" xml:space="preserve">
|
||||
<value>ERROR: Radio not in customer mode</value>
|
||||
</data>
|
||||
<data name="StrErrorMsgSirt" xml:space="preserve">
|
||||
<value>ERROR: SIRT could not be initialized </value>
|
||||
<data name="StrErrorMsgRssiSirt" xml:space="preserve">
|
||||
<value>ERROR: RSSI SIRT could not be initialized </value>
|
||||
</data>
|
||||
<data name="StrErrorMsgServiceSirtProgramming" xml:space="preserve">
|
||||
<value>ERROR: Service SIRT programming failed </value>
|
||||
</data>
|
||||
<data name="StrErrorMsgServiceSirtServerStart" xml:space="preserve">
|
||||
<value>ERROR: Service SIRT message server start failed </value>
|
||||
</data>
|
||||
<data name="StrWarningMsgServiceSirtSkipped" xml:space="preserve">
|
||||
<value>WARNING: Service SIRT alarm mask setup skipped </value>
|
||||
</data>
|
||||
<data name="StrErrorMsgRadioKey" xml:space="preserve">
|
||||
<value>ERROR: Radio encryption code wrong</value>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user