149 lines
4.5 KiB
C#
149 lines
4.5 KiB
C#
using Newtonsoft.Json;
|
|
using Newtonsoft.Json.Converters;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
|
|
namespace IOB_UT
|
|
{
|
|
/// <summary>
|
|
/// Classe gestione configurazione parametri di base x configuraizone estesa (es MTConnect, OPC-UA, ...)
|
|
/// </summary>
|
|
public class BaseParamConf
|
|
{
|
|
#region Public Properties
|
|
|
|
/// <summary>
|
|
/// Struttura dati x check condizione LAVORA / Green
|
|
/// </summary>
|
|
public List<diCheckCondition> condWork { get; set; } = new List<diCheckCondition>();
|
|
|
|
/// <summary>
|
|
/// Elenco items FILTRATI da invio come dynData --> FluxLog (events o samples)
|
|
/// </summary>
|
|
public List<string> fluxLogVeto { get; set; } = new List<string>();
|
|
|
|
/// <summary>
|
|
/// Array degli elementi di traduzione item
|
|
/// </summary>
|
|
public Dictionary<string, string> itemTranslation { get; set; } = new Dictionary<string, string>();
|
|
|
|
/// <summary>
|
|
/// Nome variabile x EmergencyStop
|
|
/// </summary>
|
|
public string keyEStop { get; set; } = "";
|
|
|
|
/// <summary>
|
|
/// Nome variabile x pezzi FATTI
|
|
/// </summary>
|
|
public string keyPartCount { get; set; } = "";
|
|
|
|
/// <summary>
|
|
/// Nome variabile x Codice Articolo
|
|
/// </summary>
|
|
public string keyPartId { get; set; } = "";
|
|
|
|
/// <summary>
|
|
/// Nome variabile x pezzi RICHIESTI
|
|
/// </summary>
|
|
public string keyPartReq { get; set; } = "";
|
|
|
|
/// <summary>
|
|
/// Nome variabile x NOME PROGRAMMA
|
|
/// </summary>
|
|
public string keyProgName { get; set; } = "";
|
|
|
|
/// <summary>
|
|
/// Nome variabile x RunMode
|
|
/// </summary>
|
|
public string keyRunMode { get; set; } = "";
|
|
|
|
/// <summary>
|
|
/// Dictionary dei nomi da cercare come "endsWith" a cui applicare la soglia indicata
|
|
/// </summary>
|
|
public Dictionary<string, int> paramsEndThresh { get; set; } = new Dictionary<string, int>();
|
|
|
|
/// <summary>
|
|
/// Indica se il ping sia un criterio valido x determinare powerON impianto
|
|
/// </summary>
|
|
public bool pingAsPowerOn { get; set; } = true;
|
|
|
|
#endregion Public Properties
|
|
}
|
|
|
|
/// <summary>
|
|
/// Classe per rappresentare oggetti chaive/valore target x controlo condizioni multiple
|
|
/// </summary>
|
|
public class diCheckCondition
|
|
{
|
|
#region Public Properties
|
|
|
|
/// <summary>
|
|
/// nome variabile
|
|
/// </summary>
|
|
public string keyName { get; set; } = "";
|
|
|
|
/// <summary>
|
|
/// valore target per esito richeisto
|
|
/// </summary>
|
|
public string targetValue { get; set; } = "";
|
|
|
|
#endregion Public Properties
|
|
}
|
|
|
|
/// <summary>
|
|
/// Classe gestione configurazione parametri specifici MTC da BaseParamConf
|
|
/// </summary>
|
|
public class MtcParamConf : BaseParamConf
|
|
{
|
|
#region Public Properties
|
|
|
|
/// <summary>
|
|
/// Struttura dati x check condizione PowerOn
|
|
/// </summary>
|
|
public diCheckCondition condPowerOn { get; set; } = new diCheckCondition();
|
|
|
|
#endregion Public Properties
|
|
}
|
|
|
|
/// <summary>
|
|
/// Classe gestione configurazione parametri specifici OPC-UA da BaseParamConf
|
|
/// </summary>
|
|
public class OpcUaParamConf : BaseParamConf
|
|
{
|
|
#region Public Properties
|
|
|
|
/// <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 Errore
|
|
/// </summary>
|
|
public List<diCheckCondition> condError { get; set; } = new List<diCheckCondition>();
|
|
|
|
/// <summary>
|
|
/// Struttura dati x check condizione Emergenza
|
|
/// </summary>
|
|
public List<diCheckCondition> condEStop { get; set; } = new List<diCheckCondition>();
|
|
|
|
/// <summary>
|
|
/// Struttura dati x check condizione PowerOn
|
|
/// </summary>
|
|
public List<diCheckCondition> condPowerOn { get; set; } = new List<diCheckCondition>();
|
|
|
|
/// <summary>
|
|
/// Struttura dati x check condizione READY
|
|
/// </summary>
|
|
public List<diCheckCondition> condReady { get; set; } = new List<diCheckCondition>();
|
|
|
|
#endregion Public Properties
|
|
}
|
|
} |