tbf/TestBenchFramework/BenchControl/GenericDevices/IFlowMeter.cs

70 lines
2.2 KiB
C#

///
/// Copyright (c) 2013-2015 Sensus Metering Systems
///
using System.Collections.Generic;
using TBF.BenchControl.Generic;
using TBF.Boxes;
namespace TBF.BenchControl.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>
float NominalFlow { get; }
/// <summary>
/// Nominal (uncorrected) volume per flowmeter pulse in [l].
/// </summary>
float LtrPerPulse { get; }
/// <summary>
/// Corrected volume per flowmeter pulse in [l].
/// </summary>
/// <param name="flow">Water flow in [m3/h]</param>
float LtrPerPulseCorrected(double flow);
/// <summary>
/// Reference flow meter communicated to the board: 1-based index, 0 for flow meter twins
/// </summary>
int Idx1 { get; }
/// <summary>
/// Measurement correction table
/// </summary>
IList<Config.Entities.MeasurementCorrection> Corrections { 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);
}
}