61 lines
2.1 KiB
C#
61 lines
2.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace IOB_MAN.Core.SDK
|
|
{
|
|
public class plcMemMapExt : plcMemMap
|
|
{
|
|
#region Public Properties
|
|
|
|
/// <summary>
|
|
/// Dizionario di dizionari di decodifica, chiave è nome/tipo dizionario e poi dizionario da impiegare
|
|
/// Usato ad esempio x decodifica stati da valore intero o degli step di esecuzione di un ciclo (es Fape v2+)
|
|
/// </summary>
|
|
public Dictionary<string, Dictionary<string, string>> DataDecodMap { get; set; } = new Dictionary<string, Dictionary<string, string>>();
|
|
|
|
/// <summary>
|
|
/// Dizionario x decodifica file
|
|
/// </summary>
|
|
public Dictionary<string, int> FileDecod { get; set; } = new Dictionary<string, int>();
|
|
|
|
/// <summary>
|
|
/// Dizionario opzionale di configurazione memorie WRITE con "alias",
|
|
/// impiegato tipicamente per poter gestire scritture valori INT su CNC/PLC che non accettano stringhe (es FANUC)
|
|
/// </summary>
|
|
public Dictionary<string, string> mMapWriteLink { get; set; } = new Dictionary<string, string>();
|
|
|
|
/// <summary>
|
|
/// Lista ulteriori configurazioni KeyValuePair
|
|
/// </summary>
|
|
public Dictionary<string, string> OptKVP { get; set; } = new Dictionary<string, string>();
|
|
|
|
/// <summary>
|
|
/// Dizionario parametri opzionali
|
|
/// </summary>
|
|
public Dictionary<string, string> OptMemPar { get; set; } = new Dictionary<string, string>();
|
|
|
|
#endregion Public Properties
|
|
|
|
#region Public Methods
|
|
|
|
/// <summary>
|
|
/// Recupera valore della chiave specifica richiesta x OptKVP
|
|
/// </summary>
|
|
/// <param name="key"></param>
|
|
/// <returns></returns>
|
|
public string OptKVPGet(string key)
|
|
{
|
|
string answ = "";
|
|
if (OptKVP != null && OptKVP.Count > 0 && OptKVP.ContainsKey(key))
|
|
{
|
|
answ = OptKVP[key];
|
|
}
|
|
return answ;
|
|
}
|
|
|
|
#endregion Public Methods
|
|
}
|
|
} |