95 lines
2.9 KiB
C#
95 lines
2.9 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace IOB_UT_NEXT.Config.Base
|
|
{
|
|
/// <summary>
|
|
/// Parametri specifici gestione ODL:
|
|
/// - AutoOdl
|
|
/// - Split
|
|
/// - reset contapezzi secondo condizioni speciali
|
|
/// </summary>
|
|
public class OdlDto
|
|
{
|
|
/// <summary>
|
|
/// Gestione automatica del cambio ODL
|
|
/// </summary>
|
|
public bool AutoChangeOdl { get; set; } = false;
|
|
|
|
/// <summary>
|
|
/// Modalità di esecuzione del cambio ODL automatico (tipicamente a tempo/simulazione su qty)
|
|
/// - TIME (default)
|
|
/// - SIMUL
|
|
/// - DAILY
|
|
/// - ...
|
|
/// </summary>
|
|
public string ChangeOdlMode { get; set; } = "TIME";
|
|
|
|
|
|
/// <summary>
|
|
/// Periodo minimo tra richieste ODL corrente al server remoto
|
|
/// </summary>
|
|
public double VetoCheckOdlSec { get; set; } = 5;
|
|
|
|
/// <summary>
|
|
/// Disabilitazione gestione ODL (lettura e gestione)
|
|
/// </summary>
|
|
public bool DisableOdl { get; set; } = false;
|
|
|
|
/// <summary>
|
|
/// Durata minima ODL in Ore (ODL corrente) prima di eseguire una richiesta di cambio ODL automatico
|
|
/// </summary>
|
|
public int OdlDurationHours { get; set; } = 24;
|
|
|
|
/// <summary>
|
|
/// Durata minima in minuti dello stato idle prima di eseguire una richiesta di cambio ODL
|
|
/// Serve ad evitare un cambio ODL mentre la amcchina è in RUN
|
|
/// </summary>
|
|
public int IdleStateMin { get; set; } = 0;
|
|
|
|
/// <summary>
|
|
/// Abilitazione cambio ODL in caso di Reset Contapezzi guardando parametri ResetCount Min/Max...
|
|
/// </summary>
|
|
public bool ChangeOnResetCount { get; set; } = false;
|
|
|
|
/// <summary>
|
|
/// Soglia minima valori x cambio al reset
|
|
/// </summary>
|
|
public int ResetCountMinPre { get; set; } = 100;
|
|
|
|
/// <summary>
|
|
/// Soglia minima valori x cambio al reset
|
|
/// </summary>
|
|
public int ResetCountMaxPost { get; set; } = 10;
|
|
|
|
#if false
|
|
/// <summary>
|
|
/// Parametri opzionali di configurazione cambio ODL, ad esempio
|
|
/// - OdlDurationHours
|
|
/// - IdleStateMin
|
|
/// - ResetMinCountPre
|
|
/// - ResetMaxCountPost
|
|
/// </summary>
|
|
public Dictionary<string, string> OptPar { get; set; } = new Dictionary<string, string>();
|
|
|
|
/// <summary>
|
|
/// Recupera valore della chiave specifica richiesta
|
|
/// </summary>
|
|
/// <param name="key"></param>
|
|
/// <returns></returns>
|
|
public string OptParGet(string key)
|
|
{
|
|
string answ = "";
|
|
if (OptPar != null && OptPar.Count > 0 && OptPar.ContainsKey(key))
|
|
{
|
|
answ = OptPar[key];
|
|
}
|
|
return answ;
|
|
}
|
|
#endif
|
|
}
|
|
}
|