Files
Samuele Locatelli bbfad99ebc Update adapter OPC-UA
- gestita conf actLog
- legge davvero da OPC-UA
- invia ACT LOG!!!!
2022-06-15 19:47:52 +02:00

188 lines
6.2 KiB
C#

using static MP.MONO.Core.Enums;
namespace MP.MONO.Core.CONF
{
/// <summary>
/// Classe gestione configurazione parametri specifici OPC-UA da BaseParamConf
/// </summary>
public class OpcUaParamConf : BaseParamConf
{
#region Public Properties
/// <summary>
/// Identificativo nodo iniziale
/// </summary>
public string BrowseFullVal { get; set; } = "ns=2;s=Scalar_Static";
/// <summary>
/// Parametri identity x accesso con nome/pwd
/// </summary>
public UserIdent Identity { get; set; } = new UserIdent();
/// <summary>
/// Indice NS da cui fare il browse dei file
/// </summary>
public ushort BrowseNSIndex { get; set; } = 4;
/// <summary>
/// ID del nodo da cui partire x il browse di identificazione nodi iniziale
/// </summary>
public uint BrowseValue { get; set; } = 5001;
/// <summary>
/// Struttura dati x check condizione Contapezzi Abilitato (se vuoto = sempre abilitato)
/// </summary>
public diCheckCondSetup condCountEnabled { get; set; } = new diCheckCondSetup();
/// <summary>
/// Struttura dati x check condizione Errore
/// </summary>
public diCheckCondSetup condError { get; set; } = new diCheckCondSetup();
/// <summary>
/// Struttura dati x check condizione Emergenza
/// </summary>
public diCheckCondSetup condEStop { get; set; } = new diCheckCondSetup();
/// <summary>
/// Struttura dati x check condizione Manual
/// </summary>
public diCheckCondSetup condManual { get; set; } = new diCheckCondSetup();
/// <summary>
/// Struttura dati x check condizione PowerOn
/// </summary>
public diCheckCondSetup condPowerOn { get; set; } = new diCheckCondSetup();
/// <summary>
/// Struttura dati x check condizione READY
/// </summary>
public diCheckCondSetup condReady { get; set; } = new diCheckCondSetup();
/// <summary>
/// Struttura dati x check condizione Setup
/// </summary>
public diCheckCondSetup condSetup { get; set; } = new diCheckCondSetup();
/// <summary>
/// Struttura dati x check condizione WarmUp - CoolDown
/// </summary>
public diCheckCondSetup condWarmUpCoolDown { get; set; } = new diCheckCondSetup();
/// <summary>
/// Struttura dati x check condizione Warning
/// </summary>
public diCheckCondSetup condWarning { get; set; } = new diCheckCondSetup();
/// <summary>
/// Struttura dati x check condizione Errore
/// </summary>
public diCheckCondSetup condWorkOpc { get; set; } = new diCheckCondSetup();
/// <summary>
/// Elenco dei NodeId da ignorare intesi come interi rami (se vuoto NON filtro)
/// </summary>
public List<string> filterItemsNodeId { get; set; } = new List<string>();
/// <summary>
/// Aree di memoria lettura
/// </summary>
public Dictionary<string, dataConfTSVC> mMapRead { get; set; } = new Dictionary<string, dataConfTSVC>();
/// <summary>
/// Aree di memoria scrittura
/// </summary>
public Dictionary<string, dataConf> mMapWrite { get; set; } = new Dictionary<string, dataConf>();
/// <summary>
/// Elenco item RAW sottoscritti e relative configurazioni di decodifica da byte[]
/// </summary>
public Dictionary<string, string> rawSubscribedItemsConf { get; set; } = new Dictionary<string, string>();
/// <summary>
/// Conf gestione setup macchina
/// </summary>
public MachineSetupConf SetupConf { get; set; } = new MachineSetupConf();
/// <summary>
/// Elenco dei SOLI item sottoscritti (se vuoto TUTTI)
/// </summary>
public List<string> subscribedItems { get; set; } = new List<string>();
/// <summary>
/// Conf Gestione WatchDog
/// </summary>
public WatchDogConf WatchDog { get; set; } = new WatchDogConf();
#endregion Public Properties
#region Public Classes
/// <summary>
/// Classe gestione ITEM di un OBJ (machine) generico (read/write)
/// </summary>
public class objItem
{
#region Public Properties
/// <summary>
/// Ultimo messaggio associato (conferma scrittura, errore, ...)
/// </summary>
public string lastMessage { get; set; } = "";
/// <summary>
/// DataOra ultima lettura
/// </summary>
public DateTime lastRead { get; set; } = DateTime.Now.AddHours(-1);
/// <summary>
/// DataOra ultima richiesta scrittura
/// </summary>
public DateTime lastRequest { get; set; } = DateTime.Now.AddDays(-1);
/// <summary>
/// NOME item
/// </summary>
public string name { get; set; } = "";
/// <summary>
/// Indica il NUOVO valore richiesto x l'item
/// </summary>
public string reqValue { get; set; } = "";
/// <summary>
/// UID univoco
/// </summary>
public string uid { get; set; } = "";
/// <summary>
/// Unità Misura parametro
/// </summary>
public string UM { get; set; } = "#";
/// <summary>
/// Valore MASSIMO (SE impostato)
/// </summary>
public int valMax { get; set; }
/// <summary>
/// Valore minimo (SE impostato)
/// </summary>
public int valMin { get; set; }
/// <summary>
/// Valore parametro (come stringa, decimali con ",", default VUOTO), sul CNC/PLC
/// </summary>
public string value { get; set; } = "";
/// <summary>
/// Indica se sia abilitato in scrittura (WRITE)
/// </summary>
public bool writable { get; set; } = false;
#endregion Public Properties
}
#endregion Public Classes
}
}