riorganizzato gestione hasError

This commit is contained in:
Samuele E. Locatelli
2019-11-21 19:19:00 +01:00
parent 64363d31a3
commit d91c09bcea
2 changed files with 21 additions and 29 deletions
+20 -28
View File
@@ -636,8 +636,23 @@ namespace IOB_WIN
get
{
bool answ = false;
//!!! fare con check su conditions
// controllo TUTTE le conditions...
foreach (var item in dataItemMem)
{
// se NON HO GIA' allarmi attivi...
if (!answ)
{
// se è una condition...
if (item.Value.Category == MTConnect.DataItemCategory.CONDITION)
{
// se ha valore !="" --> allarmi attivi
if (!string.IsNullOrEmpty(item.Value.value))
{
answ = true;
}
}
}
}
return answ;
}
}
@@ -659,6 +674,8 @@ namespace IOB_WIN
* B4: manuale
*
*
* contapezzi: Path_01_PZ_TOT
*
*
* E_Path_01_RUN_MODE
* public enum MtcRunMode
@@ -701,7 +718,6 @@ namespace IOB_WIN
B_input = testPing == IPStatus.Success ? 1 : 0;
// variabili appoggio...
bool hasError = false;
string currExe = "";
string currRun = "";
string currUnOpStatus = "";
@@ -744,33 +760,13 @@ namespace IOB_WIN
// se ho run mode != auto --> manual
B_input += (1 << 4);
}
// controllo TUTTE le conditions...
foreach (var item in dataItemMem)
{
// se nON HO GIA' allarmia ttivi...
if (!hasError)
{
// se è una condition...
if (item.Value.Category == MTConnect.DataItemCategory.CONDITION)
{
// se ha valore !="" --> allarmi attivi
if (!string.IsNullOrEmpty(item.Value.value))
{
hasError = true;
}
}
}
}
// se ho almeno 1 allarme --> ALARM!
if (hasError)
{
B_input += (1 << 3);
}
#if false
// process ODL e contapezzi
@@ -820,10 +816,6 @@ namespace IOB_WIN
{
// valore non presente in vers default... se gestito fare override
Dictionary<string, string> outVal = new Dictionary<string, string>();
#if false
outVal.Add("kgAct", pesoRilevato.ToString());
outVal.Add("kgImp", pesoRichiesto.ToString());
#endif
return outVal;
}
/// <summary>
Vendored
+1 -1
View File
@@ -16,7 +16,7 @@ pipeline {
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
script {
withEnv(['NEXT_BUILD_NUMBER=539']) {
withEnv(['NEXT_BUILD_NUMBER=540']) {
// env.versionNumber = VersionNumber(versionNumberString : '2.5.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true)
env.versionNumber = VersionNumber(versionNumberString : '2.5.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
env.APP_NAME = 'MAPO-IOB-WIN'