ProductionUiCordonel: - check final params after RSSI test

This commit is contained in:
Thomas Wiedebusch 2025-10-13 15:08:53 +02:00
parent 6e113adb18
commit 07f2d97b91
8 changed files with 39 additions and 30 deletions

View File

@ -70,7 +70,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.EolPr
// Access to meter requires login
if (!Meter.IsLoggedOn)
{
Meter.Login();
Meter.ReLogin();
if (!Meter.IsLoggedOn)
{
ErrorMsgDispatcher(Resources.StrErrorMsgCordonelLogin);
@ -95,9 +95,11 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.EolPr
if (retValBol)
{
EolProgress.ParametrizationCompareChecked = EOLStatus.OK;
Meter?.Logout();
return StatusReturn.Okay;
}
EolProgress.ParametrizationCompareChecked = EOLStatus.FAIL;
Meter?.Logout();
return StatusReturn.Failed;
}
catch (Exception ex)

View File

@ -223,7 +223,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.EolPr
{
if (!Meter.IsLoggedOn)
{
Meter.Login();
Meter.ReLogin();
if (!Meter.IsLoggedOn)
{
return SetTestFailed(Resources.StrErrorMsgCordonelLogin);
@ -328,12 +328,15 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.EolPr
if (!SIRTServer.StartProgramming(Convert.ToInt32(freq), _radioAddressCordonel,
meterEncryptionKey))
{
SIRTServer.Dispose();
return SetTestFailed(Resources.StrErrorMsgServiceSirtProgramming);
}
SIRTServer.Dispose();
}
catch (Exception ex)
{
ErrorMsgDispatcher(ex.Message);
SIRTServer.Dispose();
return SetTestFailed(ex.Message);
}
}
else
@ -458,8 +461,10 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.EolPr
EolProgress.RadioCheckId = _radioResultCheckId;
EolProgress.FinalRadioSystemState = _finalRadioSystemState;
// Essential to logout from meter at any exit
// Essential to logout from meter at any exit to give the radio app the chance
// to access the parameters and config file
Meter?.Logout();
Thread.Sleep(1000);
_stateMachine?.Stop();
_stateMachine = null;

View File

@ -214,16 +214,6 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.EolPr
processState: ProcessState.RebootCordonel,
processInfo: Resources.StrStateRebootCordonel,
productionProcessNo: 8,
nextStateOnSuccess: ProcessState.CheckFinalParametrization),
// Precondition: - The reboot process including the store all configurations has to be
// completed.
// Check final configuration has to be executed exclusively with automatic
new ProcessStateStruct(
productionProcess: new CheckFinalParametrization(Resources.StrStateCheckParametrization),
processState: ProcessState.CheckFinalParametrization,
processInfo: Resources.StrStateCheckParametrization,
productionProcessNo: 9,
nextStateOnSuccess: ProcessState.CheckRadio),
// Precondition: - The final parametrization, reboot process including the store all
@ -234,9 +224,19 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.EolPr
productionProcess: new CheckRadio(Resources.StrStateRadioCheck),
processState: ProcessState.CheckRadio,
processInfo: Resources.StrStateRadioCheck,
productionProcessNo: 9,
nextStateOnSuccess: ProcessState.CheckFinalParametrization),
// Precondition: - The reboot process including the store all configurations has to be
// completed.
// Check final configuration has to be executed exclusively with automatic
new ProcessStateStruct(
productionProcess: new CheckFinalParametrization(Resources.StrStateCheckParametrization),
processState: ProcessState.CheckFinalParametrization,
processInfo: Resources.StrStateCheckParametrization,
productionProcessNo: 10,
nextStateOnSuccess: ProcessState.CheckOrderNumber),
// This scans the order number, it has to be executed exclusively with automatic
new ProcessStateStruct(
productionProcess: new CheckOrderNumber(Resources.StrStateCheckOrderNumber),

View File

@ -92,7 +92,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.EolPr
// access to meter requires login
if (!Meter.IsLoggedOn)
{
Meter.Login();
Meter.ReLogin();
if (!Meter.IsLoggedOn)
{
ErrorMsgDispatcher(Resources.StrErrorMsgCordonelLogin);

View File

@ -186,7 +186,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.EolPr
ucPwd.UpdateImage(ucPwd.imgWriteToMeter, ImgState.Active);
if (!Meter.IsLoggedOn)
Meter.Login();
Meter.ReLogin();
// Install and check password file
var retryCtr = 2;

View File

@ -69,7 +69,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.EolPr
// access to meter requires login
if (!Meter.IsLoggedOn)
{
Meter.Login();
Meter.ReLogin();
if (!Meter.IsLoggedOn)
{
ErrorMsgDispatcher(Resources.StrErrorMsgCordonelLogin);
@ -98,7 +98,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.EolPr
// access to meter requires login
if (!Meter.IsLoggedOn)
{
Meter.Login();
Meter.ReLogin();
if (!Meter.IsLoggedOn)
{
ErrorMsgDispatcher(Resources.StrErrorMsgCordonelLogin);

View File

@ -44,7 +44,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.EolPr
// access to meter requires login
if (!Meter.IsLoggedOn)
{
Meter.Login();
Meter.ReLogin();
if (!Meter.IsLoggedOn)
{
ErrorMsgDispatcher(Resources.StrErrorMsgCordonelLogin);

View File

@ -457,7 +457,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses
}
}
}
/// <summary>
/// Returns the currentGenesis information for display
/// </summary>
@ -469,7 +469,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses
{
return _cordonelRequirements;
}
/// <summary>
/// Returns the currentGenesis information for display
/// </summary>
@ -481,8 +481,8 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses
{
return _genesisMeter;
}
/// <summary>
/// Clears all collected data on new genesisMeter and reminds the detected for next
/// detection and run of this comparison.
@ -526,7 +526,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses
InitNewMeter();
InitProcesses(ppNo);
ResetCancellationToken();
// Remind actual genesis for next call
_lastPcbId = _genesisMeter?.PcbId;
@ -584,7 +584,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses
return state;
}
/// <summary>
/// Error handler
/// </summary>
@ -615,6 +615,8 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses
pp.RetryProcess();
pp = _processStateDef.GetProcessOfState(ProcessState.RebootCordonel);
pp.RetryProcess();
pp = _processStateDef.GetProcessOfState(ProcessState.CheckRadio);
pp.RetryProcess();
pp = _processStateDef.GetProcessOfState(ProcessState.CheckFinalParametrization);
pp.RetryProcess();
}
@ -635,7 +637,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses
OnProcessProgressChanged?.Invoke(this, new ProcessProgressArgs(_maxOverallProcessesSteps,
ProcessProgressArgs.ProcessProgressType.MaxOverallProcessSteps));
}
/// <summary>
/// Calculate all processes which are completed or skipped and signal to GUI.
/// </summary>
@ -682,9 +684,9 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses
process.IdleProcess();
// All processes from and behind this process will be killed to kep the preceding as is
else if ( _processStateDef.GetProductionProcessNoOfProcess(process) >= productionProcessNo)
else if (_processStateDef.GetProductionProcessNoOfProcess(process) >= productionProcessNo)
process.IdleProcess();
// Add process to list to feed the process window in main screen
if (Processes.All(pp => pp.ProcessName != process.ProcessName))
{
@ -928,7 +930,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses
if (productionProcessNo == null)
pp.IdleProcess();
// All processes from and behind this process will be killed to kep the preceding as is
else if ( _processStateDef.GetProductionProcessNoOfProcess(pp) >= productionProcessNo)
else if (_processStateDef.GetProductionProcessNoOfProcess(pp) >= productionProcessNo)
pp.IdleProcess();
}
}