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