From c4956e5b63a0e93527c2b97bbbf6517e241c9ddc Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 29 May 2025 12:38:34 +0200 Subject: [PATCH 1/2] Update definizione ed ordinamento VC --- MapoSDK/dataConf.cs | 44 ++++++++++++++++++++--------------------- MapoSDK/dataConfTSVC.cs | 6 +++--- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/MapoSDK/dataConf.cs b/MapoSDK/dataConf.cs index 94551b4a..565a8ab4 100644 --- a/MapoSDK/dataConf.cs +++ b/MapoSDK/dataConf.cs @@ -11,40 +11,31 @@ namespace MapoSDK { #region Public Properties + /// + /// NOME parametro + /// + public string name { get; set; } = "none"; + /// /// DESCRIZIONE parametro /// public string description { get; set; } = ""; - /// - /// Fattore per eventuale scalatura (es leggo 1234 --> 12,34 con factor=0.01, 123'400 con factor=100) - /// - public double factor { get; set; } = 1; - - /// - /// Indice nell'area di memoria (da valore iniziale = 0) - /// - public int index { get; set; } = 0; - - /// - /// Valore massimo ammesso (ove usato, es simulazione) - /// - public int maxVal { get; set; } = 9999; - /// /// Nome "assoluto" della posizione nell'area di memoria (anche diverso da indice) /// public string memAddr { get; set; } = ""; /// - /// Valore minimo ammesso (ove usato, es simulazione) + /// Tipo di dato /// - public int minVal { get; set; } = 0; + [JsonConverter(typeof(StringEnumConverter))] + public plcDataType tipoMem { get; set; } = plcDataType.Int; /// - /// NOME parametro + /// Indice nell'area di memoria (da valore iniziale = 0) /// - public string name { get; set; } = "none"; + public int index { get; set; } = 0; /// /// Size in byte @@ -52,10 +43,19 @@ namespace MapoSDK public int size { get; set; } = 0; /// - /// Tipo di dato + /// Fattore per eventuale scalatura (es leggo 1234 --> 12,34 con factor=0.01, 123'400 con factor=100) /// - [JsonConverter(typeof(StringEnumConverter))] - public plcDataType tipoMem { get; set; } = plcDataType.Int; + public double factor { get; set; } = 1; + + /// + /// Valore massimo ammesso (ove usato, es simulazione) + /// + public int maxVal { get; set; } = 9999; + + /// + /// Valore minimo ammesso (ove usato, es simulazione) + /// + public int minVal { get; set; } = 0; /// /// Unità di misura del parametro diff --git a/MapoSDK/dataConfTSVC.cs b/MapoSDK/dataConfTSVC.cs index 70d80d08..d3669dcf 100644 --- a/MapoSDK/dataConfTSVC.cs +++ b/MapoSDK/dataConfTSVC.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; namespace MapoSDK { /// - /// Struttura conf tipo dati + /// Struttura conf tipo dati con estensione TimeSeries + VarCalc /// public class dataConfTSVC : dataConf { @@ -30,12 +30,12 @@ namespace MapoSDK /// /// Valore della DeadBand per rilevare variazioni in valore assoluto, se nullo non impiegato /// - public double? thresholdAbs { get; set; } = null; + public double? thresholdAbs { get; set; } /// /// Valore della DeadBand per rilevare variazioni in valore percentuale (5% = 0.05), se nullo non impiegato /// - public double? thresholdPerc { get; set; } = null; + public double? thresholdPerc { get; set; } #endregion Public Properties From 15c66f067051ca4d4f7854af914a35afcbf0a641 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 29 May 2025 12:39:32 +0200 Subject: [PATCH 2/2] Reordeing plcMemMap --- MapoSDK/dataConf.cs | 3 +++ MapoSDK/dataConfTSVC.cs | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/MapoSDK/dataConf.cs b/MapoSDK/dataConf.cs index 565a8ab4..988c7c46 100644 --- a/MapoSDK/dataConf.cs +++ b/MapoSDK/dataConf.cs @@ -2,6 +2,9 @@ using Newtonsoft.Json.Converters; using System.Collections.Generic; +// +// This is here so CodeMaid doesn't reorganize this document +// namespace MapoSDK { /// diff --git a/MapoSDK/dataConfTSVC.cs b/MapoSDK/dataConfTSVC.cs index d3669dcf..94a04c0a 100644 --- a/MapoSDK/dataConfTSVC.cs +++ b/MapoSDK/dataConfTSVC.cs @@ -1,7 +1,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; -using System.Collections.Generic; +// +// This is here so CodeMaid doesn't reorganize this document +// namespace MapoSDK { ///