From 34e8435ed9ef5fb9a11db55bc77966907d5a7ab5 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 28 Sep 2021 08:51:38 +0200 Subject: [PATCH 1/6] fix SDK upload --- .gitlab-ci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6e3ebc71..4d068b36 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -119,7 +119,12 @@ SDK: - '& "$env:NUGET_PATH" restore MAPO.sln -verbosity quiet' - *version-fix script: - - *sendSDK + - '& "$env:MSBUILD_PATH" MapoSDK/MapoSDK.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/Release /verbosity:minimal /m' + - '& Remove-Item *.nupkg' + - '& $env:NUGET_PATH pack MapoSDK\MapoSDK.csproj -properties Configuration=$env:APP_CONF -Description="Mapo SDK helper library" -Author=EgalWar - Version $env:NEW_REL' + - '& $env:NUGET_PATH setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source https://nexus.steamware.net/repository/nuget-hosted' + - '& $env:NUGET_PATH push MapoSDK.$env:NEW_REL.nupkg -Source https://nexus.steamware.net/repository/nuget-hosted' + # - *sendSDK ADM:build: stage: build From c79e17c66adb9189dd3097834c216fbba147a0a9 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 28 Sep 2021 08:53:50 +0200 Subject: [PATCH 2/6] fix nuget syntax author --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4d068b36..263e4be7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -121,7 +121,7 @@ SDK: script: - '& "$env:MSBUILD_PATH" MapoSDK/MapoSDK.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/Release /verbosity:minimal /m' - '& Remove-Item *.nupkg' - - '& $env:NUGET_PATH pack MapoSDK\MapoSDK.csproj -properties Configuration=$env:APP_CONF -Description="Mapo SDK helper library" -Author=EgalWar - Version $env:NEW_REL' + - '& $env:NUGET_PATH pack MapoSDK\MapoSDK.csproj -properties Configuration=$env:APP_CONF -Author=EgalWare -Version $env:NEW_REL' - '& $env:NUGET_PATH setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source https://nexus.steamware.net/repository/nuget-hosted' - '& $env:NUGET_PATH push MapoSDK.$env:NEW_REL.nupkg -Source https://nexus.steamware.net/repository/nuget-hosted' # - *sendSDK From 86f075109168986b855d2a2a778d23adc9fd9e61 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 28 Sep 2021 08:54:40 +0200 Subject: [PATCH 3/6] no parametro author --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 263e4be7..14bf835c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -121,7 +121,7 @@ SDK: script: - '& "$env:MSBUILD_PATH" MapoSDK/MapoSDK.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/Release /verbosity:minimal /m' - '& Remove-Item *.nupkg' - - '& $env:NUGET_PATH pack MapoSDK\MapoSDK.csproj -properties Configuration=$env:APP_CONF -Author=EgalWare -Version $env:NEW_REL' + - '& $env:NUGET_PATH pack MapoSDK\MapoSDK.csproj -properties Configuration=$env:APP_CONF -Version $env:NEW_REL' - '& $env:NUGET_PATH setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source https://nexus.steamware.net/repository/nuget-hosted' - '& $env:NUGET_PATH push MapoSDK.$env:NEW_REL.nupkg -Source https://nexus.steamware.net/repository/nuget-hosted' # - *sendSDK From d9e05d80b7da93b4eb74fff78145033f32df46c2 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 28 Sep 2021 09:03:10 +0200 Subject: [PATCH 4/6] commentato send non funzionante come tag helper --- .gitlab-ci.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 14bf835c..f8832a75 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -79,14 +79,14 @@ variables: echo "mCurl -s -u GitLab:$NEXUS_PASSWD --upload-file $FileCLogOut https://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$version/LAST/ChangeLog.html" mCurl -s -u GitLab:$NEXUS_PASSWD --upload-file $FileCLogOut https://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$version/LAST/ChangeLog.html -# helper x send su NEXUS di pack SDK in formato nuget -.sendSDK: &sendSDK - - | - '& "$env:MSBUILD_PATH" MapoSDK/MapoSDK.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/Release /verbosity:minimal /m' - '& Remove-Item *.nupkg' - '& $env:NUGET_PATH pack MapoSDK\MapoSDK.csproj -properties Configuration=$env:APP_CONF -Description="Mapo SDK helper library" -Author=EgalWare -Version $env:NEW_REL' - '& $env:NUGET_PATH setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source https://nexus.steamware.net/repository/nuget-hosted' - '& $env:NUGET_PATH push MapoSDK.$env:NEW_REL.nupkg -Source https://nexus.steamware.net/repository/nuget-hosted' +# # helper x send su NEXUS di pack SDK in formato nuget +# .sendSDK: &sendSDK +# - | +# '& "$env:MSBUILD_PATH" MapoSDK/MapoSDK.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/Release /verbosity:minimal /m' +# '& Remove-Item *.nupkg' +# '& $env:NUGET_PATH pack MapoSDK\MapoSDK.csproj -properties Configuration=$env:APP_CONF -Description="Mapo SDK helper library" -Author=EgalWare -Version $env:NEW_REL' +# '& $env:NUGET_PATH setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source https://nexus.steamware.net/repository/nuget-hosted' +# '& $env:NUGET_PATH push MapoSDK.$env:NEW_REL.nupkg -Source https://nexus.steamware.net/repository/nuget-hosted' # helper x fix version number .version-fix: &version-fix From d3efe7688a79e541146394c29cce604759abdaaf Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 26 Oct 2021 18:35:52 +0200 Subject: [PATCH 5/6] =?UTF-8?q?Aggiunto=20in=20SDK=20gestione=20unit=C3=A0?= =?UTF-8?q?=20di=20misura?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MapoSDK/Objects.cs | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/MapoSDK/Objects.cs b/MapoSDK/Objects.cs index d38ca404..ad72c8b9 100644 --- a/MapoSDK/Objects.cs +++ b/MapoSDK/Objects.cs @@ -310,6 +310,11 @@ namespace MapoSDK [JsonConverter(typeof(StringEnumConverter))] public plcDataType tipoMem { get; set; } = plcDataType.Int; + /// + /// Unità di misura del parametro + /// + public string unit { get; set; } = ""; + /// /// Valore parametro (come stringa, decimali con ",", default VUOTO), poi LETTO da PLC (o appena scritto) /// @@ -819,6 +824,20 @@ namespace MapoSDK #endregion Public Properties } + public class StCheckOverride + { + #region Public Properties + + public bool CanForce { get; set; } = false; + public string CodGruppo { get; set; } = ""; + public string CodTipo { get; set; } = ""; + public int IdxST { get; set; } = 0; + public int Num { get; set; } = 0; + public int Oggetto { get; set; } = 0; + + #endregion Public Properties + } + /// /// Classe oggetto base TimeSeries /// @@ -982,14 +1001,4 @@ namespace MapoSDK #endregion Public Properties } - - public class StCheckOverride - { - public bool CanForce { get; set; } = false; - public string CodGruppo { get; set; } = ""; - public string CodTipo { get; set; } = ""; - public int IdxST { get; set; } = 0; - public int Num { get; set; } = 0; - public int Oggetto { get; set; } = 0; - } } \ No newline at end of file From fde6e72f4fb48d69a063cc40f714728fc76befd3 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 26 Oct 2021 18:36:34 +0200 Subject: [PATCH 6/6] Compeltamento aggiornamento datalayer --- MP-IO/Controllers/IOBController.cs | 10 +++++----- MapoDb/DataLayer.cs | 4 +--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/MP-IO/Controllers/IOBController.cs b/MP-IO/Controllers/IOBController.cs index b412ec5c..f169145a 100644 --- a/MP-IO/Controllers/IOBController.cs +++ b/MP-IO/Controllers/IOBController.cs @@ -70,7 +70,7 @@ namespace MP_IO.Controllers } else { - logger.lg.scriviLog($"addTask2Exe: impossibile riconoscere il comando {taskName} come uno deitipi ammessi, NON aggiunto", tipoLog.ERROR); + logger.lg.scriviLog($"addTask2Exe: impossibile riconoscere il comando {taskName} come uno dei tipi ammessi, NON aggiunto", tipoLog.ERROR); } answ = getTask2Exe(id); } @@ -685,7 +685,7 @@ namespace MP_IO.Controllers try { DataLayer DataLayerObj = new DataLayer(); - // deserializzo. + // deserializzo currParams = DataLayerObj.getCurrObjItems(id); // se != null --> salvo! if (currParams != null) @@ -695,7 +695,7 @@ namespace MP_IO.Controllers } catch (Exception exc) { - logger.lg.scriviLog($"Errore in getCurrParams{Environment.NewLine}{exc}"); + logger.lg.scriviLog($"Errore in getObjItems{Environment.NewLine}{exc}"); answ = "NO"; } } @@ -722,7 +722,7 @@ namespace MP_IO.Controllers try { DataLayer DataLayerObj = new DataLayer(); - // deserializzo. + // deserializzo currParams = DataLayerObj.getCurrObjItemsPendigWrite(id); // se != null --> salvo! if (currParams != null) @@ -1348,7 +1348,7 @@ namespace MP_IO.Controllers } catch (Exception exc) { - logger.lg.scriviLog($"Errore in setCurrParams{Environment.NewLine}{exc}"); + logger.lg.scriviLog($"Errore in upsertObjItems{Environment.NewLine}{exc}"); answ = "NO"; } } diff --git a/MapoDb/DataLayer.cs b/MapoDb/DataLayer.cs index 75b89af8..7a4c44ef 100644 --- a/MapoDb/DataLayer.cs +++ b/MapoDb/DataLayer.cs @@ -849,7 +849,6 @@ namespace MapoDb } catch { } - // chiamo update come task di scrittura return answ; } @@ -2084,7 +2083,7 @@ namespace MapoDb } catch (Exception exc) { - logger.lg.scriviLog(string.Format("Errore in recupero dati SAVED TASK x Redis mSavedTaskMacchina - idxMacchina {2}:{0}{1}", Environment.NewLine, exc, idxMacchina)); + logger.lg.scriviLog($"Errore in recupero dati SAVED TASK x Redis mSavedTaskMacchina | idxMacchina {idxMacchina}{Environment.NewLine}{exc}"); } return answ; } @@ -3491,7 +3490,6 @@ namespace MapoDb { string serVal = JsonConvert.SerializeObject(currValues); memLayer.ML.setRSV(currParametersHash(idxMacchina), serVal); - // controllo se ha valori write... foreach (var item in currValues) {