NUOVA VERSIONE CON RILETTURA periodica DEL CONTAPEZZI DA SERVER CENTRALE

This commit is contained in:
Samuele E. Locatelli
2018-06-06 18:35:36 +02:00
parent 1a2458b3ad
commit 42602b1a1d
4 changed files with 30 additions and 29 deletions
+2 -13
View File
@@ -213,19 +213,7 @@ namespace IOB_WIN
{
if (currIobConf.optPar["PZCOUNT_MODE"].StartsWith("STD"))
{
// legge da IO server ULTIMO valore CONTPEZZI al riavvio...
lgInfo("Lettura contapezzi dall'url {0}", urlGetPzCount);
string currServerCount = utils.callUrl(urlGetPzCount);
if (currServerCount != "")
{
int.TryParse(currServerCount, out contapezzi);
lgInfo("Ricevuta conferma da server di {0} pezzi registrati per ODL", currServerCount);
}
else
{
contapezzi = 0;
lgInfo("Errore lettura contapezzi (empty)");
}
pzCntReload();
// per adesso imposto lettura fanuc == contapezzi (poi farà vera lettura...)
lastCountCNC = contapezzi;
}
@@ -249,6 +237,7 @@ namespace IOB_WIN
// finisco INIT ADAPTER
lgInfo("End init Adapter FANUC");
}
/// <summary>
/// Override disconnessione
+26 -2
View File
@@ -17,7 +17,7 @@ namespace IOB_WIN
public class IobGeneric
{
#region variabili ed oggetti base
/// <summary>
/// Contapezzi attuale
/// </summary>
@@ -354,7 +354,6 @@ namespace IOB_WIN
// fix parametri generali...
enablePrgName = true;
}
/// <summary>
/// Effettua logging INFO corretto impostanto anche la variabile IOB prima di scrivere...
/// </summary>
@@ -438,6 +437,25 @@ namespace IOB_WIN
#region metodi adapter
/// <summary>
/// Effettua rilettura del contapezzi dal server MP/IO
/// </summary>
protected void pzCntReload()
{
// legge da IO server ULTIMO valore CONTPEZZI al riavvio...
lgInfo("Lettura contapezzi dall'url {0}", urlGetPzCount);
string currServerCount = utils.callUrl(urlGetPzCount);
if (currServerCount != "")
{
int.TryParse(currServerCount, out contapezzi);
lgInfo("Ricevuta conferma da server di {0} pezzi registrati per ODL", currServerCount);
}
else
{
contapezzi = 0;
lgInfo("Errore lettura contapezzi (empty)");
}
}
/// <summary>
/// lettura file di persistenza
/// </summary>
@@ -563,6 +581,12 @@ namespace IOB_WIN
}
else if (ciclo == gatherCycle.VLF)
{
if (utils.CRB("enableContapezzi"))
{
// rilettura contapezzi da server... SE ABILITATA
pzCntReload();
}
// dati dinamici
processDynData();
// recupero dati SETUP (sysinfo) e li invio/mostro se variati...
processSysInfo();
+1 -13
View File
@@ -300,19 +300,7 @@ namespace IOB_WIN
{
if (currIobConf.optPar["PZCOUNT_MODE"].StartsWith("STD"))
{
// legge da IO server ULTIMO valore CONTPEZZI al riavvio...
lgInfo("Lettura contapezzi dall'url {0}", urlGetPzCount);
string currServerCount = utils.callUrl(urlGetPzCount);
if (currServerCount != "")
{
int.TryParse(currServerCount, out contapezzi);
lgInfo("Ricevuta conferma da server di {0} pezzi registrati per ODL", currServerCount);
}
else
{
contapezzi = 0;
lgInfo("Errore lettura contapezzi (empty)");
}
pzCntReload();
// per adesso imposto lettura fanuc == contapezzi (poi farà vera lettura...)
lastCountCNC = contapezzi;
}
Vendored
+1 -1
View File
@@ -14,7 +14,7 @@ pipeline {
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
script {
withEnv(['NEXT_BUILD_NUMBER=266']) {
withEnv(['NEXT_BUILD_NUMBER=268']) {
// env.versionNumber = VersionNumber(versionNumberString : '1.18.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true)
env.versionNumber = VersionNumber(versionNumberString : '1.18.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
env.APP_NAME = 'MAPO-IOB-WIN'