tbf/TBF/Rig/GenericDevices/IScaleOrTank.cs
2021-04-03 00:54:18 +02:00

54 lines
1.5 KiB
C#

///
/// Copyright (c) 2018 Sensus Slovensko a.s.
///
using System.Collections.Generic;
using TBF.Rig.Generic;
using TBF.Boxes;
namespace TBF.Rig.GenericDevices
{
/// <summary>
/// Water tank functions (either on a scale or with height/volume measurement)
/// </summary>
public interface IScaleOrTank : IComponent
{
/// <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>
/// For a given temperature in [°C] returns evaporation rate in [kg/s]
/// </summary>
/// <param name="flow">Water temperature in [°C]</param>
/// <returns>Evaporation rate in [kg/s]</returns>
double EvaporationRate(double temperature);
/// <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; }
}
}