tolti riferimenti a nameRemap
This commit is contained in:
@@ -12,10 +12,12 @@ namespace OPC_UA_REDIS
|
||||
/// Oggetto elenco allarmi
|
||||
/// </summary>
|
||||
public allarme[] elencoAllarmi { get; set; }
|
||||
#if false
|
||||
/// <summary>
|
||||
/// Dizionario conversione nome variabili COMPLETE (per gestione REDIS "_" --> ":")
|
||||
/// </summary>
|
||||
public Dictionary<string, string> nameRemap { get; set; }
|
||||
public Dictionary<string, string> nameRemap { get; set; }
|
||||
#endif
|
||||
/// <summary>
|
||||
/// Dizionario conversione nome variabili con replace "like" (per gestione REDIS "_" --> ":")
|
||||
/// </summary>
|
||||
@@ -47,7 +49,9 @@ namespace OPC_UA_REDIS
|
||||
ServerPort = sPort;
|
||||
ServerAddr = sAddress;
|
||||
Verbose = verbose;
|
||||
nameRemap = new Dictionary<string, string>();
|
||||
#if false
|
||||
nameRemap = new Dictionary<string, string>();
|
||||
#endif
|
||||
nameReplace = new Dictionary<string, string>();
|
||||
itemNodes = new Dictionary<string, itemNode>();
|
||||
conditionNodes = new Dictionary<string, itemNode>();
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -30,10 +30,12 @@ namespace SCMA.AdapterCom
|
||||
/// Oggetto elenco allarmi
|
||||
/// </summary>
|
||||
public allarme[] elencoAllarmi;
|
||||
#if false
|
||||
/// <summary>
|
||||
/// Dizionario conversione nome variabili COMPLETE (per gestione REDIS "_" --> ":")
|
||||
/// </summary>
|
||||
public Dictionary<string, string> nameRemap = new Dictionary<string, string>();
|
||||
public Dictionary<string, string> nameRemap = new Dictionary<string, string>();
|
||||
#endif
|
||||
/// <summary>
|
||||
/// Dizionario conversione nome variabili con replace "like" (per gestione REDIS "_" --> ":")
|
||||
/// </summary>
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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"));
|
||||
|
||||
Reference in New Issue
Block a user