///
/// Copyright (c) 2013-2022 Sensus Slovensko a.s.
///
using System.Collections.Generic;
using TBF.Rig.Generic;
using TBF.Boxes;
namespace TBF.Rig.GenericDevices
{
///
/// Basic flow meter functions
///
public interface IFlowMeter : IComponent
{
///
/// Reference flow meter communicated to the board: 1-based index, 0 for parallel flow meters
///
int Idx1 { get; }
///
/// Nominal (uncorrected) volume per flowmeter pulse in [l].
///
double LtrPerPulse { get; }
///
/// Corrected volume per flowmeter pulse in [l].
///
/// Water flow in [m3/h]
/// Water temperature in [°C]
double LtrPerPulseCorrected(double flow, float temperature);
///
/// Nominal flow in m3/h at the nominal output frequency (see below).
/// In case of a flowmeter couple, the sum of two nominal flows (reached at sum of nominal freq.).
///
double NominalFlow { get; }
///
/// Nominal frequency in Hz.
///
double NominalFreq { get; }
///
/// Returns current flow value in [m3/h]
///
/// Flow in m3/h
double ReadFlow();
///
/// Returns current flow meter frequency value in [Hz]
///
/// Frequency in Hz
double ReadFrequency();
///
/// Events: FlowDone, Error
///
/// Reference to a variable for the measured flow in xxx
/// ReadFlowOp instance reference casted to IOperaton
IOperation ReadFlowOp(ref DoubleBox flow);
///
/// Events: flowDone, Error
///
/// Reference to a variable for the measured flow in xxx
/// Event returned when measurement done
/// ReadFlowOp instance reference casted to IOperaton
IOperation ReadFlowOp(ref DoubleBox flow, Event flowDone);
bool MsrmntAvailable { get; }
double MeasuredVal { get; }
double MsrdValLimLo { get; }
double MsrdValLimHi { get; }
string MsrdFormat { get; }
Common.Unit MsrdUnit { get; }
string AltString { get; }
}
}