Files
tbf/TBF/Rig/ControlBoard/IControlBoard.cs
T

83 lines
2.7 KiB
C#

using System;
using Config.Entities;
using Dirichlet.Numerics;
using TBF.Rig.Generic;
using TBF.Rig.GenericDevices;
namespace TBF.Rig.ControlBoard
{
public interface IControlBoard : IDevice, IValveControl
{
void SpecifyInvertedValves(UInt128 valvesToInvert);
/// <summary>
/// Called on beginning of a test
/// </summary>
void ClearProcessValues();
///
/// Values valid always
///
UInt128 Route { get; } /// State of valves
UInt64 DigitalInputs { get; } /// Inputs
///
/// Values valid during a test
///
int FlowmeterId { get; }
double RefFrequency { get; }
///
/// Last test results
///
double TestTime { get; }
int RefPulses { get; }
double TestTimeWM(int wmNr1);
int RefPulsesWM(int wmNr1);
int PulsesWM(int wmNr1);
float ValveOpenCloseTime { get; } /// Start valve open or close time in sec
/// <summary>
/// Select devices used for control and measurement
/// </summary>
/// <param name="outPath"></param>
OutputPath Devices { set; get; }
/// <summary>
/// Returns operation which sets the flow. Events:
/// </summary>
/// <param name="qFrom">Lower limit for the water flow</param>
/// <param name="qTo">Upper limit for the water flow</param>
/// <param name="measuredFlow">Reference to calss keeping current flow value</param>
/// <param name="timeout">Timeout in seconds</param>
/// <returns>Operation</returns>
IOperation SetFlowOp(double qFrom, double qTo, TBF.Boxes.DoubleBox measuredFlow, int timeout);
IOperation StopFlowRegulationOp();
/// <summary>
/// Get operation for a Standing start-stop test
/// Events: OpArgumentError .... invalid arguments, test cannot be started
/// StartingTest ....... starting a test
/// TestInProgress ..... test was successfully started, test is running
/// TestCompleted ...... test was successfully completed
/// Error .............. unspecified error while running a test
/// </summary>
/// <returns>Operation running a test</returns>
IOperation StandingStartStopTestOp(Test test, int pulsesCount, bool withDiverter);
/// <summary>
/// Returns operation with events: Event.MeasurementCompleted or Event.None
/// </summary>
/// <returns>Operation</returns>
IOperation QueryMeasurementEndOp();
void StopFlowControl(bool isFromUI, int regVId);
void StopAll(bool isFromUI);
}
}