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

110 lines
4.4 KiB
C#

using System;
using System.Collections.Generic;
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, double qFrom, double qTo, int pulsesCount);
/// <summary>
/// Get operation for a Flying 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 FlyingStartStopTestOp(Test test, double qFrom, double qTo, int pulsesCount);
/// <summary>
/// Get operation for a Flying start-stop test with a diverter
/// Events: OpArgumentError ...... invalid arguments, test cannot be started
/// StartingTest ......... starting a test
/// TestInProgress ....... test was successfully started, test is running
/// TestPart2InProgress .. first part when water is diverted to a tank was successfully completed, part2 in progress,
/// prolonged method only: (massPulsesCount GT 0) and (massPulsesCount LT pulsesCount)
/// TestCompleted ........ test was successfully completed
/// Error ................ unspecified error while running a test
/// </summary>
/// <returns>Operation running a test</returns>
IOperation FlyingStartStopTestWithDivOp(Test test, double qFrom, double qTo, int pulsesCount, int massPulsesCount, bool readDivTransition);
IOperation ReadDiverterTransitionOp(bool isStart, Sequences.Statistics plotter, int batchNr, string testName, int repetition);
/// <summary>
/// Returns operation with events: Event.MeasurementCompleted or Event.None
/// </summary>
/// <returns>Operation</returns>
IOperation QueryMeasurementEndOp();
IOperation StopPreviousOp();
}
}