2015-04-15 18:32:56 +00:00
|
|
|
|
///
|
|
|
|
|
|
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
|
|
|
|
|
///
|
|
|
|
|
|
using System;
|
2014-07-28 07:54:35 +00:00
|
|
|
|
using System.Collections.Generic;
|
2016-05-03 17:00:15 +00:00
|
|
|
|
using System.Reflection;
|
2014-07-28 07:54:35 +00:00
|
|
|
|
|
2015-12-04 16:17:20 +00:00
|
|
|
|
namespace Config.Entities
|
2014-07-28 07:54:35 +00:00
|
|
|
|
{
|
2016-05-03 17:00:15 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Helper class to assign descriptions to enum values
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public class Description : Attribute
|
|
|
|
|
|
{
|
|
|
|
|
|
public string Text;
|
|
|
|
|
|
public Description(string t)
|
|
|
|
|
|
{
|
|
|
|
|
|
Text = t;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static class GetDescription
|
|
|
|
|
|
{
|
|
|
|
|
|
/// Extension method for enum-s
|
|
|
|
|
|
public static string ToDescription(this Enum en)
|
|
|
|
|
|
{
|
|
|
|
|
|
Type type = en.GetType();
|
|
|
|
|
|
MemberInfo[] memInfo = type.GetMember(en.ToString());
|
|
|
|
|
|
|
|
|
|
|
|
if (memInfo != null && memInfo.Length > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
object[] attrs = memInfo[0].GetCustomAttributes(typeof(Description), false);
|
|
|
|
|
|
if (attrs != null && attrs.Length > 0)
|
|
|
|
|
|
return ((Description)attrs[0]).Text;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return en.ToString(); /// Return ToString() value in case there is no description
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2015-12-31 17:20:03 +00:00
|
|
|
|
/// <summary> Identifies the type of a database </summary>
|
|
|
|
|
|
public enum DBType
|
|
|
|
|
|
{
|
|
|
|
|
|
MySql, /// MySQL database
|
|
|
|
|
|
SQLite, /// SQLite
|
|
|
|
|
|
DbTypesCount,
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2015-12-31 21:48:22 +00:00
|
|
|
|
/// <summary> Identifies the database based on the content </summary>
|
|
|
|
|
|
public enum DBKind
|
|
|
|
|
|
{
|
|
|
|
|
|
Config,
|
|
|
|
|
|
Results,
|
|
|
|
|
|
Count,
|
|
|
|
|
|
}
|
2015-12-31 17:20:03 +00:00
|
|
|
|
|
2015-11-26 22:51:49 +00:00
|
|
|
|
public enum ProcedureState
|
|
|
|
|
|
{
|
|
|
|
|
|
Active,
|
|
|
|
|
|
History,
|
|
|
|
|
|
Template,
|
|
|
|
|
|
Count,
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2015-12-31 21:48:22 +00:00
|
|
|
|
/// <summary> Kind of meters for the procedure / test </summary>
|
2014-07-28 07:54:35 +00:00
|
|
|
|
public enum MetersKind
|
|
|
|
|
|
{
|
2015-03-25 04:35:05 +00:00
|
|
|
|
Single,
|
2014-07-28 07:54:35 +00:00
|
|
|
|
Combined,
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2015-12-31 23:00:03 +00:00
|
|
|
|
public enum CompoundMeterId : byte
|
|
|
|
|
|
{
|
|
|
|
|
|
Single,
|
|
|
|
|
|
CompoundMain,
|
|
|
|
|
|
CompoundAux,
|
|
|
|
|
|
Compound,
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2015-08-01 20:21:43 +00:00
|
|
|
|
public enum Medium
|
|
|
|
|
|
{
|
2016-05-19 22:10:16 +00:00
|
|
|
|
[Description("")] NotSpecified,
|
2015-08-01 20:21:43 +00:00
|
|
|
|
ColdWater,
|
|
|
|
|
|
HotWater,
|
2016-05-19 22:10:16 +00:00
|
|
|
|
Count
|
|
|
|
|
|
}
|
2015-08-01 20:21:43 +00:00
|
|
|
|
|
2016-05-03 17:00:15 +00:00
|
|
|
|
public enum Mounting
|
2016-05-02 10:55:17 +00:00
|
|
|
|
{
|
2016-05-04 13:16:14 +00:00
|
|
|
|
[Description("")] NotSpecified,
|
2016-05-03 17:00:15 +00:00
|
|
|
|
[Description("H")] H, /// horizontal
|
|
|
|
|
|
[Description("V")] V, /// vertical
|
|
|
|
|
|
[Description("S")] S, /// steig
|
|
|
|
|
|
[Description("F")] F, /// fall
|
2016-05-02 10:55:17 +00:00
|
|
|
|
Count
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2016-05-03 17:00:15 +00:00
|
|
|
|
public enum TemperatureClass
|
2016-05-02 10:55:17 +00:00
|
|
|
|
{
|
2016-05-04 13:16:14 +00:00
|
|
|
|
[Description("")] NotSpecified,
|
2016-05-03 17:00:15 +00:00
|
|
|
|
[Description("T30")] T30,
|
|
|
|
|
|
[Description("T50")] T50,
|
|
|
|
|
|
[Description("T70")] T70,
|
|
|
|
|
|
[Description("T90")] T90,
|
|
|
|
|
|
[Description("T130")] T130,
|
|
|
|
|
|
[Description("T180")] T180,
|
|
|
|
|
|
[Description("T30/70")] T30_70,
|
|
|
|
|
|
[Description("T30/90")] T30_90,
|
|
|
|
|
|
[Description("T30/130")] T30_130,
|
|
|
|
|
|
[Description("T30/180")] T30_180,
|
|
|
|
|
|
[Description("30")] t30,
|
|
|
|
|
|
[Description("50")] t50,
|
|
|
|
|
|
[Description("70")] t70,
|
|
|
|
|
|
[Description("90")] t90,
|
|
|
|
|
|
[Description("130")] t130,
|
|
|
|
|
|
[Description("180")] t180,
|
2016-05-02 10:55:17 +00:00
|
|
|
|
Count
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public enum FlowProfileSensitivityClass
|
|
|
|
|
|
{
|
2016-05-04 13:16:14 +00:00
|
|
|
|
[Description("")] NotSpecified,
|
2016-05-03 17:00:15 +00:00
|
|
|
|
[Description("U0")] U0, /// ?
|
|
|
|
|
|
[Description("D0")] D0, /// ?
|
2016-05-02 10:55:17 +00:00
|
|
|
|
Count
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public enum PressureLossClass
|
|
|
|
|
|
{
|
2016-05-04 13:16:14 +00:00
|
|
|
|
[Description("")] NotSpecified,
|
2016-05-03 17:00:15 +00:00
|
|
|
|
[Description("dp63")] dp63, /// 0.063 MPa = 0.63 bar, TODO: Change to "Δp63"
|
|
|
|
|
|
[Description("dp40")] dp40, /// 0.040 MPa = 0.40 bar
|
|
|
|
|
|
[Description("dp25")] dp25, /// 0.025 MPa = 0.25 bar
|
|
|
|
|
|
[Description("dp16")] dp16, /// 0.016 MPa = 0.16 bar
|
|
|
|
|
|
[Description("dp10")] dp10, /// 0.010 MPa = 0.10 bar
|
2016-05-02 10:55:17 +00:00
|
|
|
|
Count
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary> Maximum Admissible Pressure </summary>
|
|
|
|
|
|
public enum MaxAdmissiblePressure
|
|
|
|
|
|
{
|
2016-05-04 13:16:14 +00:00
|
|
|
|
[Description("")] NotSpecified,
|
2016-05-03 17:00:15 +00:00
|
|
|
|
[Description("MAP6")] MAP6,
|
|
|
|
|
|
[Description("MAP10")] MAP10,
|
|
|
|
|
|
[Description("MAP16")] MAP16,
|
|
|
|
|
|
[Description("MAP25")] MAP25,
|
|
|
|
|
|
[Description("MAP40")] MAP40,
|
2016-05-02 10:55:17 +00:00
|
|
|
|
Count
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2015-12-31 21:48:22 +00:00
|
|
|
|
/// <summary> Transition step is finished when this condition is fulfilled </summary>
|
2015-05-22 08:29:56 +00:00
|
|
|
|
public enum StepCondition
|
2014-07-28 07:54:35 +00:00
|
|
|
|
{
|
2015-05-22 08:29:56 +00:00
|
|
|
|
None,
|
|
|
|
|
|
Scale1Empty,
|
|
|
|
|
|
Scale2Empty,
|
|
|
|
|
|
Scale3Empty,
|
|
|
|
|
|
AllScalesEmpty,
|
2016-05-02 10:55:17 +00:00
|
|
|
|
Count
|
2014-07-28 07:54:35 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
2016-02-29 14:33:31 +00:00
|
|
|
|
public enum Publish : sbyte
|
2016-02-25 17:04:18 +00:00
|
|
|
|
{
|
2016-06-06 09:10:36 +00:00
|
|
|
|
#if MUNICH
|
2016-06-22 14:54:16 +00:00
|
|
|
|
/// nemecky
|
2016-06-06 09:10:36 +00:00
|
|
|
|
[Description("nie")] Never = 0,
|
|
|
|
|
|
[Description("immer")] Always = 1,
|
|
|
|
|
|
[Description("Bildschirm")] OnScreen = 2,
|
|
|
|
|
|
[Description("intern")] Internal = 3,
|
2016-06-22 14:54:16 +00:00
|
|
|
|
#elif CEVAK || BADGER_MALA_TRAT || BADGER_VELKA_TRAT
|
|
|
|
|
|
/// cesky
|
2016-06-06 09:10:36 +00:00
|
|
|
|
[Description("nikdy")] Never = 0,
|
|
|
|
|
|
[Description("vždy")] Always = 1,
|
|
|
|
|
|
[Description("na obrazovku")] OnScreen = 2,
|
|
|
|
|
|
[Description("interně")] Internal = 3,
|
2016-06-22 14:54:16 +00:00
|
|
|
|
#elif IPERLST || IPERLST_SPECIAL || SLM_50
|
|
|
|
|
|
/// slovensky
|
|
|
|
|
|
[Description("nikdy")] Never = 0,
|
|
|
|
|
|
[Description("vždy")] Always = 1,
|
|
|
|
|
|
[Description("na obrazovku")] OnScreen = 2,
|
|
|
|
|
|
[Description("interne")] Internal = 3,
|
2016-06-06 09:10:36 +00:00
|
|
|
|
#else
|
|
|
|
|
|
[Description("Never")] Never = 0,
|
|
|
|
|
|
[Description("Always")] Always = 1,
|
|
|
|
|
|
[Description("On screen")] OnScreen = 2,
|
|
|
|
|
|
[Description("Internal")] Internal = 3,
|
|
|
|
|
|
#endif
|
|
|
|
|
|
Count
|
2016-02-25 17:04:18 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
2014-07-28 07:54:35 +00:00
|
|
|
|
public enum TestRedType
|
|
|
|
|
|
{
|
|
|
|
|
|
Fix,
|
|
|
|
|
|
/// etc.
|
|
|
|
|
|
Count,
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public enum FQC1
|
|
|
|
|
|
{
|
|
|
|
|
|
FQC1,
|
|
|
|
|
|
FQP1,
|
|
|
|
|
|
Count,
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2016-01-08 18:18:45 +00:00
|
|
|
|
public enum Progress
|
|
|
|
|
|
{
|
|
|
|
|
|
JustStarted,
|
|
|
|
|
|
TransitionBefore,
|
|
|
|
|
|
SwitchingFlowDetection,
|
|
|
|
|
|
FlowSetting,
|
|
|
|
|
|
Test,
|
|
|
|
|
|
TransitionAfter,
|
|
|
|
|
|
Completed,
|
|
|
|
|
|
Count,
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2015-01-18 10:22:53 +00:00
|
|
|
|
public enum Device
|
|
|
|
|
|
{
|
|
|
|
|
|
Screen,
|
|
|
|
|
|
Printer,
|
|
|
|
|
|
Disk,
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2015-09-17 22:10:06 +00:00
|
|
|
|
public enum PageOrientation
|
|
|
|
|
|
{
|
|
|
|
|
|
Portrait,
|
|
|
|
|
|
Landscape,
|
|
|
|
|
|
Count,
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2015-04-28 14:32:21 +00:00
|
|
|
|
public enum UnitsVolume
|
|
|
|
|
|
{
|
|
|
|
|
|
Liter,
|
|
|
|
|
|
CubicMtr,
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2015-12-31 21:48:22 +00:00
|
|
|
|
/// <summary> Possible modes of operation of components and devices. </summary>
|
2014-07-28 07:54:35 +00:00
|
|
|
|
public enum DebugMode
|
|
|
|
|
|
{
|
|
|
|
|
|
DetectedOff = -2,
|
|
|
|
|
|
DetectedOn = -1,
|
2015-08-24 11:52:06 +00:00
|
|
|
|
Normal = 0, /// Normal operation
|
|
|
|
|
|
AutoDetect, /// The component (device) will be auto-detected
|
|
|
|
|
|
FailureDuringOperation, /// Failure during operation -> disabled
|
|
|
|
|
|
Off, /// The component is off
|
2014-07-28 07:54:35 +00:00
|
|
|
|
Record,
|
|
|
|
|
|
Reply,
|
2015-08-24 11:52:06 +00:00
|
|
|
|
Simulate, /// Test bench simulation, this mode does not require any hardware
|
2014-07-28 07:54:35 +00:00
|
|
|
|
Inherit,
|
|
|
|
|
|
Count,
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public enum LogLevel
|
|
|
|
|
|
{
|
|
|
|
|
|
Off,
|
|
|
|
|
|
Fatal,
|
|
|
|
|
|
Error,
|
|
|
|
|
|
Warn,
|
|
|
|
|
|
Info,
|
|
|
|
|
|
Debug,
|
|
|
|
|
|
All,
|
|
|
|
|
|
Count,
|
|
|
|
|
|
}
|
2015-12-04 16:17:20 +00:00
|
|
|
|
|
|
|
|
|
|
|
2015-12-31 21:48:22 +00:00
|
|
|
|
/// <summary> Arrangement of tests </summary>
|
2015-12-04 16:17:20 +00:00
|
|
|
|
public enum TestsArrangement
|
|
|
|
|
|
{
|
|
|
|
|
|
Rows,
|
|
|
|
|
|
Columns,
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2015-12-31 21:48:22 +00:00
|
|
|
|
/// <summary> Arrangement of meters </summary>
|
2015-12-04 16:17:20 +00:00
|
|
|
|
public enum MetersArrangement
|
|
|
|
|
|
{
|
|
|
|
|
|
Vertically,
|
|
|
|
|
|
Horizontally,
|
|
|
|
|
|
}
|
2016-04-29 05:40:34 +00:00
|
|
|
|
|
|
|
|
|
|
public enum Alignment
|
|
|
|
|
|
{
|
|
|
|
|
|
Left,
|
|
|
|
|
|
Center,
|
|
|
|
|
|
Right,
|
|
|
|
|
|
Justified,
|
|
|
|
|
|
Count
|
|
|
|
|
|
}
|
2014-07-28 07:54:35 +00:00
|
|
|
|
}
|
|
|
|
|
|
|