using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IOB_UT_NEXT.DataModel
{
    /// <summary>
    /// Classe per salvare info relative ai dati di flusso utili a gestione
    /// - DeadBand
    /// - Sampling interval
    /// - Storicizzazione
    /// </summary>
    [Serializable]
    public class FluxData
    {
        /// <summary>
        /// ID (univoco) dell'oggetto fluxLog
        /// </summary>
        public string CodFlux { get; set; } = "";

        /// <summary>
        /// Valore (in sec) del periodo di downsampling (0 --> NON usato)
        /// </summary>
        public int SamplePeriod { get; set; } = 600;

        /// <summary>
        /// Valore soglia DeadBand (0 --> non usata)
        /// </summary>
        public double DeadBand{ get; set; } = 0;

        /// <summary>
        /// Valore Registrato in formato stringa
        /// </summary>
        public string Value { get; set; } = "";

        /// <summary>
        /// Valore in formato byte array
        /// </summary>
        public byte[] ValueRawByte { get; set; } = new byte[1];

        /// <summary>
        /// Timestamp ultimo aggiornamento
        /// </summary>
        public DateTime LastUpdated { get; set; } = DateTime.Now;
    }
}
