diff --git a/IOB-UT-NEXT/ToMapo.cs b/IOB-UT-NEXT/ToMapo.cs
index 7a318db4..6b391f1a 100644
--- a/IOB-UT-NEXT/ToMapo.cs
+++ b/IOB-UT-NEXT/ToMapo.cs
@@ -188,25 +188,18 @@ namespace IOB_UT_NEXT
#endregion Public Methods
}
+#if false
///
/// Struttura della conf memoria ModBus
///
public class BaseModbusConf
{
- #region Public Enums
-
public enum DataType
{
ND = 0,
- Bit,
- Int,
- Real
- }
-
- public enum MemDirection
- {
- R,
- W
+ BIT,
+ INT,
+ REAL
}
public enum MemType
@@ -218,53 +211,58 @@ namespace IOB_UT_NEXT
HoldingRegister = 4
}
- #endregion Public Enums
-
- #region Public Properties
+ ///
+ /// Elenco aree memoria ModBus in lettura
+ ///
+ public List mMapRead { get; set; } = new List();
///
- /// Elenco aree memoria mobdus
+ /// Elenco aree memoria ModBus in scrittura
///
- public List MemoryList { get; set; } = new List();
-
- #endregion Public Properties
-
- #region Public Classes
+ public List mMapWrite { get; set; } = new List();
///
/// struttura di base memoria ModBus
///
public class ModbusMemArea
{
- #region Public Properties
-
public ushort BaseAddr { get; set; } = 0;
public string RawAddr { get; set; } = "";
- public ushort Size { get; set; } = 2;
+ public ushort Size { get; set; } = 0;
+
+ [JsonConverter(typeof(StringEnumConverter))]
public MemType Type { get; set; } = MemType.ND;
public List VarList { get; set; } = new List();
-
- #endregion Public Properties
}
public class VarConf
{
- #region Public Properties
+ public string description { get; set; } = "";
+ public int factor { get; set; } = 1;
- public MemDirection Direction { get; set; } = MemDirection.R;
- public ushort MemAddr { get; set; } = 0;
- public string Name { get; set; } = "ND";
- public int RangeMax { get; set; } = 0;
- public int RangeMin { get; set; } = 0;
- public ushort Size { get; set; } = 2;
- public DataType Type { get; set; } = DataType.ND;
+ public bool hasRange
+ {
+ get
+ {
+ return !this.minVal.Equals(this.maxVal);
+ }
+ }
- #endregion Public Properties
+ public ushort index { get; set; } = 0;
+ public int maxVal { get; set; } = 0;
+ public string memAddr { get; set; } = "";
+ public int minVal { get; set; } = 0;
+ public string name { get; set; } = "none";
+ public ushort size { get; set; } = 0;
+
+ [JsonConverter(typeof(StringEnumConverter))]
+ public DataType tipoMem { get; set; } = DataType.ND;
+
+ public string value { get; set; } = "";
}
-
- #endregion Public Classes
}
+#endif
///
/// Classe gestione configurazione parametri di base x configuraizone estesa (es MTConnect, OPC-UA, ...)