diff --git a/MTC_Adapter/OPC-UA-REDIS/AdapterRed.cs b/MTC_Adapter/OPC-UA-REDIS/AdapterRed.cs
index 1c7eea4..da4b728 100644
--- a/MTC_Adapter/OPC-UA-REDIS/AdapterRed.cs
+++ b/MTC_Adapter/OPC-UA-REDIS/AdapterRed.cs
@@ -12,10 +12,12 @@ namespace OPC_UA_REDIS
/// Oggetto elenco allarmi
///
public allarme[] elencoAllarmi { get; set; }
+#if false
///
/// Dizionario conversione nome variabili COMPLETE (per gestione REDIS "_" --> ":")
///
- public Dictionary nameRemap { get; set; }
+ public Dictionary nameRemap { get; set; }
+#endif
///
/// Dizionario conversione nome variabili con replace "like" (per gestione REDIS "_" --> ":")
///
@@ -47,7 +49,9 @@ namespace OPC_UA_REDIS
ServerPort = sPort;
ServerAddr = sAddress;
Verbose = verbose;
- nameRemap = new Dictionary();
+#if false
+ nameRemap = new Dictionary();
+#endif
nameReplace = new Dictionary();
itemNodes = new Dictionary();
conditionNodes = new Dictionary();
@@ -262,17 +266,17 @@ namespace OPC_UA_REDIS
// se la variabile è "^"+ qualcosa --> cerco inizio
if (item.StartsWith("^"))
{
- trovato = answ.StartsWith(item);
+ trovato = answ.StartsWith(item.Replace("^", ""));
}
// se la variabile è qualcosa + "$" --> cerco fine
else if (item.EndsWith("$"))
{
- trovato = answ.EndsWith(item);
+ trovato = answ.EndsWith(item.Replace("$", ""));
}
// se la variabile è "%" + qualcosa --> cerco OVUNQUE
else if (item.StartsWith("%"))
{
- trovato = answ.IndexOf(item) >= 0;
+ trovato = answ.IndexOf(item.Replace("%", "")) >= 0;
}
else
{
diff --git a/MTC_Adapter/SCMA/AdapterCom/Gateway.cs b/MTC_Adapter/SCMA/AdapterCom/Gateway.cs
index e24205c..afa846a 100644
--- a/MTC_Adapter/SCMA/AdapterCom/Gateway.cs
+++ b/MTC_Adapter/SCMA/AdapterCom/Gateway.cs
@@ -30,10 +30,12 @@ namespace SCMA.AdapterCom
/// Oggetto elenco allarmi
///
public allarme[] elencoAllarmi;
+#if false
///
/// Dizionario conversione nome variabili COMPLETE (per gestione REDIS "_" --> ":")
///
- public Dictionary nameRemap = new Dictionary();
+ public Dictionary nameRemap = new Dictionary();
+#endif
///
/// Dizionario conversione nome variabili con replace "like" (per gestione REDIS "_" --> ":")
///
diff --git a/MTC_Adapter/SCMA/AdapterCom/GatewaySOURS.cs b/MTC_Adapter/SCMA/AdapterCom/GatewaySOURS.cs
index 76b0610..5918e87 100644
--- a/MTC_Adapter/SCMA/AdapterCom/GatewaySOURS.cs
+++ b/MTC_Adapter/SCMA/AdapterCom/GatewaySOURS.cs
@@ -73,7 +73,9 @@ namespace SCMA.AdapterCom
// passo le tabelle di remap/replace
mAdapter.ServerPort = 6379; // !!! port hard coded
mAdapter.ServerAddr = "127.0.0.1"; // !!! IP hard coded
- mAdapter.nameRemap = nameRemap;
+#if false
+ mAdapter.nameRemap = nameRemap;
+#endif
mAdapter.nameReplace = nameReplace;
// !!! TOGLIERE?!?
mAdapter.elencoAllarmi = elencoAllarmi;
diff --git a/MTC_Adapter/SCMA/AdapterGeneric.cs b/MTC_Adapter/SCMA/AdapterGeneric.cs
index c552eb2..a20d690 100644
--- a/MTC_Adapter/SCMA/AdapterGeneric.cs
+++ b/MTC_Adapter/SCMA/AdapterGeneric.cs
@@ -1311,13 +1311,14 @@ namespace SCMA
if (utils.CRB("verbose"))
{
lg.Info("Inizio caricamento dizionario remapping nomi variabili");
- }
+ }
string linea;
string fileName = "";
int rumRiga = 0;
string[] dictKVP;
StreamReader file;
+#if false
// processo file name REMAP copleto
fileName = string.Format(@"{0}\{1}", utils.confDir, utils.CRS("NameRemapList"));
// carica da file...
@@ -1334,7 +1335,8 @@ namespace SCMA
}
}
// chiudo file
- file.Close();
+ file.Close();
+#endif
// processo file pre REPLACE parziale (con like)
fileName = string.Format(@"{0}\{1}", utils.confDir, utils.CRS("NameReplaceList"));