inserita gestione contapezzi con get/set su server...

This commit is contained in:
Samuele E. Locatelli
2018-04-16 11:55:18 +02:00
parent 106abbe9d3
commit f64d83f2c6
4 changed files with 54 additions and 9 deletions
+3 -4
View File
@@ -20,9 +20,9 @@
<!-- ciclo corto x invio a server: ms -->
<add key="timerIntMs" value="10" />
<add key="fastCount" value="20" />
<add key="normCount" value="50" />
<add key="slowCount" value="400" />
<add key="verySlowCount" value="1000" />
<add key="normCount" value="200" />
<add key="slowCount" value="500" />
<add key="verySlowCount" value="3000" />
<add key="sampleMemCount" value="6000" />
<add key="waitEndCycle" value="0" />
<add key="comCheckTOut" value="10" />
@@ -68,7 +68,6 @@
<!--conf x testing FANUC-->
<add key="ClientSettingsProvider.ServiceUri" value="" />
<add key="pzCountDelay" value="3000"/>
<add key="tmpPzCount" value="300"/>
</appSettings>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+12 -4
View File
@@ -138,10 +138,16 @@ namespace IOB_WIN
hasBigEndian = false;
lg.Info("Start init Adapter FANUC all'IP {0}:{1} per IOB {2}", IOBConf.cncIpAddr, IOBConf.cncPort, IOBConf.codIOB);
// !!!FARE!!! deve leggere da DB centrale ULTIMO valore CONTPEZZI al riavvio... se gestione con contapezzi STD... x ora leggo valore tmp da app.config
contapezzi = utils.CRI("tmpPzCount");
// legge da IO server ULTIMO valore CONTPEZZI al riavvio...
string currServerCount = utils.callUrl(urlGetPzCount);
if (currServerCount != "")
{
int.TryParse(currServerCount, out contapezzi);
}
else
{
contapezzi = 0;
}
// Creo oggetto connessione NC
parentForm.commPlcActive = true;
@@ -462,6 +468,8 @@ namespace IOB_WIN
{
contapezzi = lastCount;
}
// invio a server contapezzi (aggiornato)
utils.callUrl(urlSetPzCount + contapezzi.ToString());
}
}
else // area "normale" byte.bit
+38
View File
@@ -1043,6 +1043,44 @@ namespace IOB_WIN
return answ;
}
}
/// <summary>
/// URL per salvataggio contapezzi...
/// </summary>
public string urlSetPzCount
{
get
{
string answ = "";
try
{
answ = string.Format(@"{0}{1}{2}/setCounter/{3}?counter=", currIobConf.serverData.MPIP, currIobConf.serverData.MPURL, currIobConf.serverData.CMDALIVE, currIobConf.codIOB);
}
catch (Exception exc)
{
lg.Error(exc, "Errore in composizione urlSetPzCount");
}
return answ;
}
}
/// <summary>
/// URL per recupero contapezzi...
/// </summary>
public string urlGetPzCount
{
get
{
string answ = "";
try
{
answ = string.Format(@"{0}{1}{2}/getCounter/{3}", currIobConf.serverData.MPIP, currIobConf.serverData.MPURL, currIobConf.serverData.CMDALIVE, currIobConf.codIOB);
}
catch (Exception exc)
{
lg.Error(exc, "Errore in composizione urlGetPzCount");
}
return answ;
}
}
public string GetMACAddress()
{
NetworkInterface[] nics = NetworkInterface.GetAllNetworkInterfaces();
Vendored
+1 -1
View File
@@ -14,7 +14,7 @@ pipeline {
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
script {
withEnv(['NEXT_BUILD_NUMBER=224']) {
withEnv(['NEXT_BUILD_NUMBER=225']) {
// env.versionNumber = VersionNumber(versionNumberString : '1.17.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true)
env.versionNumber = VersionNumber(versionNumberString : '1.17.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
env.APP_NAME = 'MAPO-IOB-WIN'