Files
Samuele Locatelli cc4dbeb79c FANUC:
- spostamento in 2 WorkerLoop (mono Thread e PooledThred
- test 3029 Jetco OK
2026-02-18 10:03:57 +01:00

64 lines
1.7 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace IOB_UT_NEXT
{
/// <summary>
/// Classe di gestione info Timer per esecuzione ordinata processi secondo priorità
/// </summary>
public class TimerMan
{
#region Public Constructors
/// <summary>
/// Init classe timer
/// </summary>
/// <param name="contesto"></param>
public TimerMan(ContextType contesto)
{
Contesto = contesto;
}
#endregion Public Constructors
#region Public Enums
/// <summary>
/// Tipologia contesto timer
/// </summary>
public enum ContextType
{
Machine = 0,
Server
}
#endregion Public Enums
#region Public Properties
/// <summary>
/// Contesto del timer
/// </summary>
public ContextType Contesto { get; private set; } = ContextType.Machine;
/// <summary>
/// Contatore chiamate timers x debug timing
/// </summary>
public Dictionary<gatherCycle, int> CycleCount { get; set; } = new Dictionary<gatherCycle, int>();
/// <summary>
/// Contatore durata exec x debug timing
/// </summary>
public Dictionary<gatherCycle, double> CycleElaps { get; set; } = new Dictionary<gatherCycle, double>();
/// <summary>
/// Dizionario scadenza timers interni x esecuzione dei vari task a differente frequenza di chiamata
/// </summary>
public Dictionary<gatherCycle, DateTime> Veto { get; set; } = new Dictionary<gatherCycle, DateTime>();
#endregion Public Properties
}
}