tbf/TBF/BenchControl/GenericDevices/IScaleOrTank.cs

57 lines
1.5 KiB
C#

///
/// Copyright (c) 2018 Sensus Slovensko a.s.
///
using System.Collections.Generic;
using TBF.BenchControl.Generic;
using TBF.Boxes;
namespace TBF.BenchControl.GenericDevices
{
/// <summary>
/// Water tank functions (either on a scale or with height/volume measurement)
/// </summary>
public interface IScaleOrTank : IComponent
{
/// <summary>
/// Balance number: 0-based index required for communication with the Elde component
/// </summary>
int ScaleNr { get; }
/// <summary>
/// Balance water tank capacity in kg or ltr
/// </summary>
double Capacity { get; }
/// <summary>
/// Water tank drain valve or 'null'. DrainValve2 is open in the 2nd half of drain time period
/// </summary>
IValve DrainValve { get; }
IValve DrainValve2 { get; }
/// <summary>
/// Returns true if tank is empty, the last measured mass is less then some threshold
/// </summary>
bool IsEmpty();
/// <summary>
/// Returns true if tank contains more then 'thld' kg or l of water
/// </summary>
bool ContainsMoreThen(float thld);
/// <summary>
/// Format string to be used as ToString() argument (e.g. "F3" to obtain resolution 1g)
/// </summary>
string Format { get; }
/// <summary>
/// Time in seconds to empty the tank completely when it is full
/// </summary>
int EmptyTimeSec { get; }
/// <summary>
/// Measurement correction table
/// </summary>
IList<Config.Entities.MeasurementCorrection> Corrections { get; }
}
}