tbf/TBF/Rig/GenericDevices/IFlowMeter.cs
2021-10-26 19:38:09 +02:00

65 lines
2.0 KiB
C#

///
/// Copyright (c) 2013-2018 Sensus Slovensko a.s.
///
using System.Collections.Generic;
using TBF.Rig.Generic;
using TBF.Boxes;
namespace TBF.Rig.GenericDevices
{
/// <summary>
/// Basic flow meter functions
/// </summary>
public interface IFlowMeter : IComponent
{
/// <summary>
/// Nominal flow in m3/h at the maximum (2kHz) output frequency.
/// In case of a flowmeter couple, the sum of two nominal flows (reached at 4kHz of summed pulses).
/// </summary>
double NominalFlow { get; }
/// <summary>
/// Nominal (uncorrected) volume per flowmeter pulse in [l].
/// </summary>
double LtrPerPulse { get; }
/// <summary>
/// Corrected volume per flowmeter pulse in [l].
/// </summary>
/// <param name="flow">Water flow in [m3/h]</param>
double LtrPerPulseCorrected(double flow, int rangeIx);
/// <summary>
/// Reference flow meter communicated to the board: 1-based index, 0 for flow meter twins
/// </summary>
int Idx1 { get; }
/// <summary>
/// Returns current flow value in [m3/h]
/// </summary>
/// <returns>Flow in m3/h</returns>
double ReadFlow();
/// <summary>
/// Returns current flow meter frequency value in [Hz]
/// </summary>
/// <returns>Frequency in Hz</returns>
double ReadFrequency();
/// <summary>
/// Events: FlowDone, Error
/// </summary>
/// <param name="flow">Reference to a variable for the measured flow in xxx</param>
/// <returns>ReadFlowOp instance reference casted to IOperaton</returns>
IOperation ReadFlowOp(ref DoubleBox flow);
/// <summary>
/// Events: flowDone, Error
/// </summary>
/// <param name="flow">Reference to a variable for the measured flow in xxx</param>
/// <param name="flowDone">Event returned when measurement done</param>
/// <returns>ReadFlowOp instance reference casted to IOperaton</returns>
IOperation ReadFlowOp(ref DoubleBox flow, Event flowDone);
}
}