Elde.TempMeterInternal and Elde.PressureMeterInternal component added, version 1.4.43.

This commit is contained in:
Milan Hanajik 2015-05-21 17:48:27 +02:00
parent d2b76cc58d
commit ae3f3bb762
17 changed files with 1555 additions and 3 deletions

View File

@ -0,0 +1,64 @@
///
/// Copyright (c) 2015 Sensus Metering Systems
/// Author: Milan Hanajik
///
using System;
using System.Collections.Generic;
using log4net;
using TBF.BenchControl.Generic;
using TBF.Boxes;
namespace TBF.BenchControl.Elde.PressureMeterInternal
{
public class PressureMeter : ComponentBase, GenericDevices.IPressureMeter
{
private static readonly ILog log = LogManager.GetLogger(typeof(PressureMeter));
public override string ToString() { return string.Format("PressureMeter({0})", Cfg.ToString(1)); }
readonly PressureMeterCfg pressureMeterCfg;
public readonly ControlBoardDev ControlBoard;
public int Idx0 { get { return pressureMeterCfg.Idx0; } } /// 0..7
public PressureMeter(PressureMeterCfg cfg, IList<Generic.IComponent> components)
: base(cfg)
{
pressureMeterCfg = cfg;
ControlBoard = (ControlBoardDev)TbfComponents.FindComponent(cfg.ParentName, components);
if (ControlBoard == null) throw new Exception("Cannot find " + Name + " parent");
/// Prepare data for SendCalibData() control board component method
ControlBoard.TempCalibData[pressureMeterCfg.CoefsIdx0, 0] = pressureMeterCfg.A1;
ControlBoard.TempCalibData[pressureMeterCfg.CoefsIdx0, 1] = pressureMeterCfg.A2;
ControlBoard.TempCalibData[pressureMeterCfg.CoefsIdx0, 2] = pressureMeterCfg.A3;
ControlBoard.TempCalibData[pressureMeterCfg.CoefsIdx0, 3] = pressureMeterCfg.A4;
ControlBoard.TempCalibData[pressureMeterCfg.CoefsIdx0, 4] = pressureMeterCfg.A5;
ControlBoard.MeretRS485Address[0] = 0; /// This disables Merets, Groch temperatures, enables on-board A/D pressure and temperature
log.Debug(this.ToString());
}
/// <summary>
/// Events: PressureDone, Error
/// </summary>
/// <param name="pressure">Reference to a variable for the pressure in Bar</param>
/// <returns>ReadPressureOp instance reference casted to IOperaton</returns>
public IOperation ReadPressureOp(ref FloatBox pressure)
{
return new ReadPressureOp(this, ref pressure);
}
/// <summary>
/// Events: pressureDone, Error
/// </summary>
/// <param name="pressure">Reference to a variable for the pressure in Bar</param>
/// <param name="pressureDone">Event returned when measurement done</param>
/// <returns>ReadPressureOp instance reference casted to IOperaton</returns>
public IOperation ReadPressureOp(ref FloatBox pressure, Event pressureDone)
{
return new ReadPressureOp(this, ref pressure, pressureDone);
}
}
}

View File

@ -0,0 +1,58 @@
///
/// Copyright (c) 2015 Sensus Metering Systems
/// Author: Milan Hanajik
///
using System;
using System.Collections.Generic;
using System.IO;
using System.Xml.Serialization;
using TBF.BenchControl.Generic;
namespace TBF.BenchControl.Elde.PressureMeterInternal
{
public class PressureMeterCfg : ComponentCfgBase, IChildComponentCfg
{
public IComponent GetComponent(IList<IComponent> components) { return new PressureMeter(this, components); }
public IComponentCfgCtrl GetControl() { return new PressureMeterCfgCtrl(); }
///
/// Serialized parameters
///
public int Idx0; /// 0..7
public int CoefsIdx0; /// 0..7
public float A1;
public float A2;
public float A3;
public float A4;
public float A5;
/// Private parameterless constructor invoked by all other (public) constructors
PressureMeterCfg()
{
Name = "Pr";
ParentName = "CB";
Idx0 = 0;
CoefsIdx0 = 0;
A1 = 0;
A2 = 0;
A3 = 0;
A4 = 0;
A5 = 0;
}
public PressureMeterCfg(IComponentFactory factory)
: this()
{
this.Factory = factory;
}
public string ToString(int i)
{
return string.Format("Name={0}, Parent={1}, Idx0={2}, CoefsIdx0={3}, A1={4}, A2={5}, A3={6}, A4={7}, A5={8}",
Name,
(string.IsNullOrEmpty(ParentName) ? "-" : ParentName),
Idx0, CoefsIdx0,
A1, A2, A3, A4, A5);
}
}
}

View File

@ -0,0 +1,272 @@
///
/// Copyright (c) 2015 Sensus Metering Systems
/// Author: Milan Hanajik
///
namespace TBF.BenchControl.Elde.PressureMeterInternal
{
partial class PressureMeterCfgCtrl
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.positionTextBox = new System.Windows.Forms.TextBox();
this.positionLabel = new System.Windows.Forms.Label();
this.parentNameLabel = new System.Windows.Forms.Label();
this.nameTextBox = new System.Windows.Forms.TextBox();
this.nameLabel = new System.Windows.Forms.Label();
this.classNameLabel = new System.Windows.Forms.Label();
this.a1TextBox = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.a2TextBox = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.a3TextBox = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.a5TextBox = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.a4TextBox = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.parentNameComboBox = new System.Windows.Forms.ComboBox();
this.coefsIdxTextBox = new System.Windows.Forms.TextBox();
this.coefsIdxLabel = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// positionTextBox
//
this.positionTextBox.Enabled = false;
this.positionTextBox.Location = new System.Drawing.Point(130, 81);
this.positionTextBox.Name = "positionTextBox";
this.positionTextBox.Size = new System.Drawing.Size(46, 20);
this.positionTextBox.TabIndex = 6;
//
// positionLabel
//
this.positionLabel.AutoSize = true;
this.positionLabel.Location = new System.Drawing.Point(20, 84);
this.positionLabel.Name = "positionLabel";
this.positionLabel.Size = new System.Drawing.Size(44, 13);
this.positionLabel.TabIndex = 5;
this.positionLabel.Text = "Position";
//
// parentNameLabel
//
this.parentNameLabel.AutoSize = true;
this.parentNameLabel.Location = new System.Drawing.Point(20, 60);
this.parentNameLabel.Name = "parentNameLabel";
this.parentNameLabel.Size = new System.Drawing.Size(69, 13);
this.parentNameLabel.TabIndex = 3;
this.parentNameLabel.Text = "Parent Name";
//
// nameTextBox
//
this.nameTextBox.Enabled = false;
this.nameTextBox.Location = new System.Drawing.Point(130, 34);
this.nameTextBox.Name = "nameTextBox";
this.nameTextBox.Size = new System.Drawing.Size(130, 20);
this.nameTextBox.TabIndex = 2;
//
// nameLabel
//
this.nameLabel.AutoSize = true;
this.nameLabel.Location = new System.Drawing.Point(20, 37);
this.nameLabel.Name = "nameLabel";
this.nameLabel.Size = new System.Drawing.Size(35, 13);
this.nameLabel.TabIndex = 1;
this.nameLabel.Text = "Name";
//
// classNameLabel
//
this.classNameLabel.AutoSize = true;
this.classNameLabel.Location = new System.Drawing.Point(127, 10);
this.classNameLabel.Name = "classNameLabel";
this.classNameLabel.Size = new System.Drawing.Size(83, 13);
this.classNameLabel.TabIndex = 0;
this.classNameLabel.Text = "ComonentName";
//
// a1TextBox
//
this.a1TextBox.Enabled = false;
this.a1TextBox.Location = new System.Drawing.Point(130, 127);
this.a1TextBox.Name = "a1TextBox";
this.a1TextBox.Size = new System.Drawing.Size(130, 20);
this.a1TextBox.TabIndex = 10;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(20, 130);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(20, 13);
this.label1.TabIndex = 9;
this.label1.Text = "A1";
//
// a2TextBox
//
this.a2TextBox.Enabled = false;
this.a2TextBox.Location = new System.Drawing.Point(130, 148);
this.a2TextBox.Name = "a2TextBox";
this.a2TextBox.Size = new System.Drawing.Size(130, 20);
this.a2TextBox.TabIndex = 12;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(20, 151);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(20, 13);
this.label2.TabIndex = 11;
this.label2.Text = "A2";
//
// a3TextBox
//
this.a3TextBox.Enabled = false;
this.a3TextBox.Location = new System.Drawing.Point(130, 169);
this.a3TextBox.Name = "a3TextBox";
this.a3TextBox.Size = new System.Drawing.Size(130, 20);
this.a3TextBox.TabIndex = 14;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(20, 172);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(20, 13);
this.label3.TabIndex = 13;
this.label3.Text = "A3";
//
// a5TextBox
//
this.a5TextBox.Enabled = false;
this.a5TextBox.Location = new System.Drawing.Point(130, 211);
this.a5TextBox.Name = "a5TextBox";
this.a5TextBox.Size = new System.Drawing.Size(130, 20);
this.a5TextBox.TabIndex = 18;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(20, 214);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(20, 13);
this.label5.TabIndex = 17;
this.label5.Text = "A5";
//
// a4TextBox
//
this.a4TextBox.Enabled = false;
this.a4TextBox.Location = new System.Drawing.Point(130, 190);
this.a4TextBox.Name = "a4TextBox";
this.a4TextBox.Size = new System.Drawing.Size(130, 20);
this.a4TextBox.TabIndex = 16;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(20, 193);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(20, 13);
this.label4.TabIndex = 15;
this.label4.Text = "A4";
//
// parentNameComboBox
//
this.parentNameComboBox.Enabled = false;
this.parentNameComboBox.FormattingEnabled = true;
this.parentNameComboBox.Location = new System.Drawing.Point(130, 57);
this.parentNameComboBox.Name = "parentNameComboBox";
this.parentNameComboBox.Size = new System.Drawing.Size(130, 21);
this.parentNameComboBox.TabIndex = 4;
//
// coefsIdxTextBox
//
this.coefsIdxTextBox.Enabled = false;
this.coefsIdxTextBox.Location = new System.Drawing.Point(130, 104);
this.coefsIdxTextBox.Name = "coefsIdxTextBox";
this.coefsIdxTextBox.Size = new System.Drawing.Size(46, 20);
this.coefsIdxTextBox.TabIndex = 8;
//
// coefsIdxLabel
//
this.coefsIdxLabel.AutoSize = true;
this.coefsIdxLabel.Location = new System.Drawing.Point(20, 107);
this.coefsIdxLabel.Name = "coefsIdxLabel";
this.coefsIdxLabel.Size = new System.Drawing.Size(78, 13);
this.coefsIdxLabel.TabIndex = 7;
this.coefsIdxLabel.Text = "Coeficients idx.";
//
// TempMeterCfgCtrl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.coefsIdxTextBox);
this.Controls.Add(this.coefsIdxLabel);
this.Controls.Add(this.parentNameComboBox);
this.Controls.Add(this.a5TextBox);
this.Controls.Add(this.label5);
this.Controls.Add(this.a4TextBox);
this.Controls.Add(this.label4);
this.Controls.Add(this.a3TextBox);
this.Controls.Add(this.label3);
this.Controls.Add(this.a2TextBox);
this.Controls.Add(this.label2);
this.Controls.Add(this.a1TextBox);
this.Controls.Add(this.label1);
this.Controls.Add(this.positionTextBox);
this.Controls.Add(this.positionLabel);
this.Controls.Add(this.parentNameLabel);
this.Controls.Add(this.nameTextBox);
this.Controls.Add(this.nameLabel);
this.Controls.Add(this.classNameLabel);
this.Name = "TempMeterCfgCtrl";
this.Size = new System.Drawing.Size(300, 240);
this.Load += new System.EventHandler(this.TempMeterCfgCtrl_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TextBox positionTextBox;
private System.Windows.Forms.Label positionLabel;
private System.Windows.Forms.Label parentNameLabel;
private System.Windows.Forms.TextBox nameTextBox;
private System.Windows.Forms.Label nameLabel;
private System.Windows.Forms.Label classNameLabel;
private System.Windows.Forms.TextBox a1TextBox;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox a2TextBox;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox a3TextBox;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox a5TextBox;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox a4TextBox;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.ComboBox parentNameComboBox;
private System.Windows.Forms.TextBox coefsIdxTextBox;
private System.Windows.Forms.Label coefsIdxLabel;
}
}

View File

@ -0,0 +1,163 @@
///
/// Copyright (c) 2015 Sensus Metering Systems
/// Author: Milan Hanajik
///
using System;
using System.Globalization;
using System.Windows.Forms;
using log4net;
using TBF.BenchControl.Generic;
namespace TBF.BenchControl.Elde.PressureMeterInternal
{
public partial class PressureMeterCfgCtrl : UserControl, IComponentCfgCtrl
{
static readonly ILog log = LogManager.GetLogger(typeof(PressureMeterCfgCtrl));
ComponentParametersDlg parent;
public bool ShowMore { get { return false; } }
PressureMeterCfg config;
public IComponentCfg Config
{
get { return config as IComponentCfg; }
set
{
config = value as PressureMeterCfg;
Redraw();
}
}
public PressureMeterCfgCtrl()
{
InitializeComponent();
}
private void TempMeterCfgCtrl_Load(object sender, EventArgs e)
{
parent = ParentForm as ComponentParametersDlg;
if (parent == null) return;
if (parent.TbfComponents != null)
{
foreach (var cmpnt in parent.TbfComponents)
{
if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is Elde.ControlBoardFactory)
{
parentNameComboBox.Items.Add(cmpnt.Name);
}
}
}
Redraw();
}
public void Closing()
{
}
void Redraw()
{
if (config == null) return; /// Control was not loaded, settings were not changed
classNameLabel.Text = config.Factory.ClassName;
nameTextBox.Text = config.Name;
parentNameComboBox.Text = string.IsNullOrEmpty(config.ParentName) ? "---" : config.ParentName;
positionTextBox.Text = config.Idx0.ToString();
coefsIdxTextBox.Text = config.CoefsIdx0.ToString();
a1TextBox.Text = config.A1.ToString();
a2TextBox.Text = config.A2.ToString();
a3TextBox.Text = config.A3.ToString();
a4TextBox.Text = config.A4.ToString();
a5TextBox.Text = config.A5.ToString();
}
public void Unlock()
{
nameTextBox.Enabled = true;
parentNameComboBox.Enabled = true;
positionTextBox.Enabled = true;
coefsIdxTextBox.Enabled = true;
a1TextBox.Enabled = true;
a2TextBox.Enabled = true;
a3TextBox.Enabled = true;
a4TextBox.Enabled = true;
a5TextBox.Enabled = true;
}
public CfgUpdateFlags VerifyCfg(ref string message)
{
CfgUpdateFlags flags = CfgUpdateFlags.None;
int dummy;
if (!parentNameComboBox.Items.Contains(parentNameComboBox.Text))
{
flags |= CfgUpdateFlags.Error;
message += Environment.NewLine + "Invalid 'Parent Name'";
}
if (!int.TryParse(positionTextBox.Text, out dummy) || dummy < 0 || dummy > 7)
{
flags |= CfgUpdateFlags.Error;
message += Environment.NewLine + "'Position' should be between 0 and 7";
}
if (!int.TryParse(coefsIdxTextBox.Text, out dummy) || dummy < 0 || dummy > 7)
{
flags |= CfgUpdateFlags.Error;
message += Environment.NewLine + "'Coeficients idx.' should be between 0 and 7";
}
float fdummy;
if (!Utils.TryParseEFloat(a1TextBox.Text, out fdummy))
{
flags |= CfgUpdateFlags.Error;
message += Environment.NewLine + "'A1' is not valid";
}
if (!Utils.TryParseEFloat(a2TextBox.Text, out fdummy))
{
flags |= CfgUpdateFlags.Error;
message += Environment.NewLine + "'A2' is not valid";
}
if (!Utils.TryParseEFloat(a3TextBox.Text, out fdummy))
{
flags |= CfgUpdateFlags.Error;
message += Environment.NewLine + "'A3' is not valid";
}
if (!Utils.TryParseEFloat(a4TextBox.Text, out fdummy))
{
flags |= CfgUpdateFlags.Error;
message += Environment.NewLine + "'A4' is not valid";
}
if (!Utils.TryParseEFloat(a5TextBox.Text, out fdummy))
{
flags |= CfgUpdateFlags.Error;
message += Environment.NewLine + "'A5' is not valid";
}
return flags;
}
public CfgUpdateFlags UpdateCfg()
{
CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
config.Name = nameTextBox.Text;
config.ParentName = parentNameComboBox.Text.Equals("---") ? string.Empty : parentNameComboBox.Text;
config.Idx0 = int.Parse(positionTextBox.Text);
config.CoefsIdx0 = int.Parse(coefsIdxTextBox.Text);
bool updateOk = Utils.TryParseEFloat(a1TextBox.Text, out config.A1) &&
Utils.TryParseEFloat(a2TextBox.Text, out config.A2) &&
Utils.TryParseEFloat(a3TextBox.Text, out config.A3) &&
Utils.TryParseEFloat(a4TextBox.Text, out config.A4) &&
Utils.TryParseEFloat(a5TextBox.Text, out config.A5);
return flags;
}
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,22 @@
///
/// Copyright (c) 2015 Sensus Metering Systems
//// Author: Milan Hanajik
//
using TBF.BenchControl.Generic;
namespace TBF.BenchControl.Elde.PressureMeterInternal
{
public class PressureMeterFactory : IComponentFactory
{
public string ClassName { get { return "PressureMeterInternal"; } }
public void ResetStaticProperties() { PressureMeter.ResetStaticProperties(); }
public IComponentCfg DefaultConfig() { return new PressureMeterCfg(this); }
public IComponentCfg CmpntCfgFromCmpntEntity(Entities.Component component)
{
return ComponentCfgBase.CreateFromDbEntity(typeof(PressureMeterCfg), component, this);
}
}
}

View File

@ -0,0 +1,64 @@
///
/// Copyright (c) 2015 Sensus Metering Systems
/// Author: Milan Hanajik
///
using System;
using log4net;
using TBF.Boxes;
namespace TBF.BenchControl.Elde.PressureMeterInternal
{
public class ReadPressureOp : IOperation
{
private static readonly ILog log = LogManager.GetLogger(typeof(ReadPressureOp));
public override string ToString() { return string.Format("ReadPressureOp(.,{0},{1},.)", eventDone, pressureMeterNr); }
/// Set by the constructor
readonly ControlBoardDev controlBoardDev;
readonly int pressureMeterNr;
readonly Event eventDone;
FloatBox pressure;
/// <summary>
/// Events: PressureInDone, PressureOutDone or Error
/// </summary>
/// <param name="pressureMeter">Pressure meter reference</param>
/// <param name="pressure">Reference to the measured pressure variable, value is in bar</param>
/// <param name="eventDone">Event to be returned by Run() when completed OK</param>
public ReadPressureOp(PressureMeter pressureMeter, ref FloatBox pressure, Event eventDone)
{
if (pressureMeter == null) throw new ArgumentNullException("pressureMeter");
this.controlBoardDev = pressureMeter.ControlBoard;
this.pressureMeterNr = pressureMeter.Idx0;
this.eventDone = eventDone;
this.pressure = pressure;
log.Debug(this.ToString());
}
public ReadPressureOp(PressureMeter pressureMeter, ref FloatBox pressure)
: this(pressureMeter, ref pressure, Event.PressureDone)
{
}
/// <summary>Start this operation</summary>
public void Start()
{
pressure.Val = controlBoardDev.Pressure(pressureMeterNr);
}
/// <summary>Run this operation</summary>
/// <returns>
/// Event.PressureInDone or Event.PressureOutDone
/// </returns>
public Event Run()
{
pressure.Val = controlBoardDev.Pressure(pressureMeterNr);
return eventDone;
}
/// <summary>Stop this operation</summary>
public void Stop()
{
}
}
}

View File

@ -0,0 +1,63 @@
///
/// Copyright (c) 2015 Sensus Metering Systems
/// Author: Milan Hanajik
///
using System;
using log4net;
using TBF.Boxes;
namespace TBF.BenchControl.Elde.TempMeterInternal
{
public class ReadTempOp : IOperation
{
private static readonly ILog log = LogManager.GetLogger(typeof(ReadTempOp));
public override string ToString() { return string.Format("ReadTempOp(.,{0},{1},.)", eventDone, tempMeterNr); }
/// Set by the constructor
ControlBoardDev controlBoardDev;
Event eventDone;
int tempMeterNr;
FloatBox temp;
/// <summary>
/// Events: TempInDone, TempOutDone, TempDivDone or Error
/// </summary>
/// <param name="tempMeter">TempMeter reference</param>
/// <param name="temp">Reference to the variable, value is in degree Celsius</param>
/// <param name="eventDone">Event to be returned by Run() when completed OK</param>
public ReadTempOp(TempMeter tempMeter, ref FloatBox temp, Event eventDone)
{
if (tempMeter == null) throw new ArgumentNullException("tempMeter");
this.controlBoardDev = tempMeter.ControlBoard;
this.tempMeterNr = tempMeter.Idx0;
this.temp = temp;
this.eventDone = eventDone;
log.Debug(this.ToString());
}
public ReadTempOp(TempMeter tempMeter, ref FloatBox temp)
: this(tempMeter, ref temp, Event.TempDone)
{
}
/// <summary>Start this operation</summary>
public void Start()
{
temp.Val = controlBoardDev.Temperature(tempMeterNr);
}
/// <summary>Run this operation</summary>
/// <returns>
/// Event.TempInDone, Event.TempOutDone or Event.TempDivDone
/// </returns>
public Event Run()
{
temp.Val = controlBoardDev.Temperature(tempMeterNr);
return eventDone;
}
/// <summary>Stop this operation</summary>
public void Stop()
{
}
}
}

View File

@ -0,0 +1,63 @@
///
/// Copyright (c) 2015 Sensus Metering Systems
/// Author: Milan Hanajik
///
using System;
using System.Collections.Generic;
using log4net;
using TBF.BenchControl.Generic;
using TBF.Boxes;
namespace TBF.BenchControl.Elde.TempMeterInternal
{
public class TempMeter : ComponentBase, GenericDevices.ITempMeter
{
private static readonly ILog log = LogManager.GetLogger(typeof(TempMeter));
public override string ToString() { return string.Format("TempMeter({0})", Cfg.ToString(1)); }
readonly TempMeterCfg tempMtrCfg;
public readonly ControlBoardDev ControlBoard;
public int Idx0 { get { return tempMtrCfg.Idx0; } } /// 0..7
public TempMeter(TempMeterCfg cfg, IList<Generic.IComponent> components)
: base(cfg)
{
tempMtrCfg = cfg;
ControlBoard = (ControlBoardDev)TbfComponents.FindComponent(cfg.ParentName, components);
if (ControlBoard == null) throw new Exception("Cannot find " + Name + " parent");
/// Prepare data for SendCalibData() control board component method
ControlBoard.TempCalibData[tempMtrCfg.CoefsIdx0, 0] = tempMtrCfg.A1;
ControlBoard.TempCalibData[tempMtrCfg.CoefsIdx0, 1] = tempMtrCfg.A2;
ControlBoard.TempCalibData[tempMtrCfg.CoefsIdx0, 2] = tempMtrCfg.A3;
ControlBoard.TempCalibData[tempMtrCfg.CoefsIdx0, 3] = tempMtrCfg.A4;
ControlBoard.TempCalibData[tempMtrCfg.CoefsIdx0, 4] = tempMtrCfg.A5;
log.Debug(this.ToString());
}
/// <summary>
/// Events: TempDone, Error
/// </summary>
/// <param name="temp">Reference to a variable for the temperature in Celsius</param>
/// <returns>ReadTempOp instance reference casted to IOperaton</returns>
public IOperation ReadTempOp(ref FloatBox temp)
{
return new ReadTempOp(this, ref temp);
}
/// <summary>
/// Events: tempDone, Error
/// </summary>
/// <param name="temp">Reference to a variable for the temperature in Celsius</param>
/// <param name="tempDone">Event returned when measurement done</param>
/// <returns>ReadTempOp instance reference casted to IOperaton</returns>
public IOperation ReadTempOp(ref FloatBox temp, Event tempDone)
{
return new ReadTempOp(this, ref temp, tempDone);
}
}
}

View File

@ -0,0 +1,58 @@
///
/// Copyright (c) 2015 Sensus Metering Systems
/// Author: Milan Hanajik
///
using System;
using System.Collections.Generic;
using System.IO;
using System.Xml.Serialization;
using TBF.BenchControl.Generic;
namespace TBF.BenchControl.Elde.TempMeterInternal
{
public class TempMeterCfg : ComponentCfgBase, IChildComponentCfg
{
public IComponent GetComponent(IList<IComponent> components) { return new TempMeter(this, components); }
public IComponentCfgCtrl GetControl() { return new TempMeterCfgCtrl(); }
///
/// Serialized parameters
///
public int Idx0; /// 0..7
public int CoefsIdx0; /// 0..7
public float A1;
public float A2;
public float A3;
public float A4;
public float A5;
/// Private parameterless constructor invoked by all other (public) constructors
TempMeterCfg()
{
Name = "T";
ParentName = "CB";
Idx0 = 0;
CoefsIdx0 = 2;
A1 = 0;
A2 = 0;
A3 = 0;
A4 = 0;
A5 = 0;
}
public TempMeterCfg(IComponentFactory factory)
: this()
{
this.Factory = factory;
}
public string ToString(int i)
{
return string.Format("Name={0}, Parent={1}, Idx0={2}, CoefsIdx0={3}, A1={4}, A2={5}, A3={6}, A4={7}, A5={8}",
Name,
(string.IsNullOrEmpty(ParentName) ? "-" : ParentName),
Idx0, CoefsIdx0,
A1, A2, A3, A4, A5);
}
}
}

View File

@ -0,0 +1,272 @@
///
/// Copyright (c) 2015 Sensus Metering Systems
/// Author: Milan Hanajik
///
namespace TBF.BenchControl.Elde.TempMeterInternal
{
partial class TempMeterCfgCtrl
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.positionTextBox = new System.Windows.Forms.TextBox();
this.positionLabel = new System.Windows.Forms.Label();
this.parentNameLabel = new System.Windows.Forms.Label();
this.nameTextBox = new System.Windows.Forms.TextBox();
this.nameLabel = new System.Windows.Forms.Label();
this.classNameLabel = new System.Windows.Forms.Label();
this.a1TextBox = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.a2TextBox = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.a3TextBox = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.a5TextBox = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.a4TextBox = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.parentNameComboBox = new System.Windows.Forms.ComboBox();
this.coefsIdxTextBox = new System.Windows.Forms.TextBox();
this.coefsIdxLabel = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// positionTextBox
//
this.positionTextBox.Enabled = false;
this.positionTextBox.Location = new System.Drawing.Point(130, 81);
this.positionTextBox.Name = "positionTextBox";
this.positionTextBox.Size = new System.Drawing.Size(46, 20);
this.positionTextBox.TabIndex = 6;
//
// positionLabel
//
this.positionLabel.AutoSize = true;
this.positionLabel.Location = new System.Drawing.Point(20, 84);
this.positionLabel.Name = "positionLabel";
this.positionLabel.Size = new System.Drawing.Size(44, 13);
this.positionLabel.TabIndex = 5;
this.positionLabel.Text = "Position";
//
// parentNameLabel
//
this.parentNameLabel.AutoSize = true;
this.parentNameLabel.Location = new System.Drawing.Point(20, 60);
this.parentNameLabel.Name = "parentNameLabel";
this.parentNameLabel.Size = new System.Drawing.Size(69, 13);
this.parentNameLabel.TabIndex = 3;
this.parentNameLabel.Text = "Parent Name";
//
// nameTextBox
//
this.nameTextBox.Enabled = false;
this.nameTextBox.Location = new System.Drawing.Point(130, 34);
this.nameTextBox.Name = "nameTextBox";
this.nameTextBox.Size = new System.Drawing.Size(130, 20);
this.nameTextBox.TabIndex = 2;
//
// nameLabel
//
this.nameLabel.AutoSize = true;
this.nameLabel.Location = new System.Drawing.Point(20, 37);
this.nameLabel.Name = "nameLabel";
this.nameLabel.Size = new System.Drawing.Size(35, 13);
this.nameLabel.TabIndex = 1;
this.nameLabel.Text = "Name";
//
// classNameLabel
//
this.classNameLabel.AutoSize = true;
this.classNameLabel.Location = new System.Drawing.Point(127, 10);
this.classNameLabel.Name = "classNameLabel";
this.classNameLabel.Size = new System.Drawing.Size(83, 13);
this.classNameLabel.TabIndex = 0;
this.classNameLabel.Text = "ComonentName";
//
// a1TextBox
//
this.a1TextBox.Enabled = false;
this.a1TextBox.Location = new System.Drawing.Point(130, 127);
this.a1TextBox.Name = "a1TextBox";
this.a1TextBox.Size = new System.Drawing.Size(130, 20);
this.a1TextBox.TabIndex = 10;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(20, 130);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(20, 13);
this.label1.TabIndex = 9;
this.label1.Text = "A1";
//
// a2TextBox
//
this.a2TextBox.Enabled = false;
this.a2TextBox.Location = new System.Drawing.Point(130, 148);
this.a2TextBox.Name = "a2TextBox";
this.a2TextBox.Size = new System.Drawing.Size(130, 20);
this.a2TextBox.TabIndex = 12;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(20, 151);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(20, 13);
this.label2.TabIndex = 11;
this.label2.Text = "A2";
//
// a3TextBox
//
this.a3TextBox.Enabled = false;
this.a3TextBox.Location = new System.Drawing.Point(130, 169);
this.a3TextBox.Name = "a3TextBox";
this.a3TextBox.Size = new System.Drawing.Size(130, 20);
this.a3TextBox.TabIndex = 14;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(20, 172);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(20, 13);
this.label3.TabIndex = 13;
this.label3.Text = "A3";
//
// a5TextBox
//
this.a5TextBox.Enabled = false;
this.a5TextBox.Location = new System.Drawing.Point(130, 211);
this.a5TextBox.Name = "a5TextBox";
this.a5TextBox.Size = new System.Drawing.Size(130, 20);
this.a5TextBox.TabIndex = 18;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(20, 214);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(20, 13);
this.label5.TabIndex = 17;
this.label5.Text = "A5";
//
// a4TextBox
//
this.a4TextBox.Enabled = false;
this.a4TextBox.Location = new System.Drawing.Point(130, 190);
this.a4TextBox.Name = "a4TextBox";
this.a4TextBox.Size = new System.Drawing.Size(130, 20);
this.a4TextBox.TabIndex = 16;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(20, 193);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(20, 13);
this.label4.TabIndex = 15;
this.label4.Text = "A4";
//
// parentNameComboBox
//
this.parentNameComboBox.Enabled = false;
this.parentNameComboBox.FormattingEnabled = true;
this.parentNameComboBox.Location = new System.Drawing.Point(130, 57);
this.parentNameComboBox.Name = "parentNameComboBox";
this.parentNameComboBox.Size = new System.Drawing.Size(130, 21);
this.parentNameComboBox.TabIndex = 4;
//
// coefsIdxTextBox
//
this.coefsIdxTextBox.Enabled = false;
this.coefsIdxTextBox.Location = new System.Drawing.Point(130, 104);
this.coefsIdxTextBox.Name = "coefsIdxTextBox";
this.coefsIdxTextBox.Size = new System.Drawing.Size(46, 20);
this.coefsIdxTextBox.TabIndex = 8;
//
// coefsIdxLabel
//
this.coefsIdxLabel.AutoSize = true;
this.coefsIdxLabel.Location = new System.Drawing.Point(20, 107);
this.coefsIdxLabel.Name = "coefsIdxLabel";
this.coefsIdxLabel.Size = new System.Drawing.Size(78, 13);
this.coefsIdxLabel.TabIndex = 7;
this.coefsIdxLabel.Text = "Coeficients idx.";
//
// TempMeterCfgCtrl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.coefsIdxTextBox);
this.Controls.Add(this.coefsIdxLabel);
this.Controls.Add(this.parentNameComboBox);
this.Controls.Add(this.a5TextBox);
this.Controls.Add(this.label5);
this.Controls.Add(this.a4TextBox);
this.Controls.Add(this.label4);
this.Controls.Add(this.a3TextBox);
this.Controls.Add(this.label3);
this.Controls.Add(this.a2TextBox);
this.Controls.Add(this.label2);
this.Controls.Add(this.a1TextBox);
this.Controls.Add(this.label1);
this.Controls.Add(this.positionTextBox);
this.Controls.Add(this.positionLabel);
this.Controls.Add(this.parentNameLabel);
this.Controls.Add(this.nameTextBox);
this.Controls.Add(this.nameLabel);
this.Controls.Add(this.classNameLabel);
this.Name = "TempMeterCfgCtrl";
this.Size = new System.Drawing.Size(300, 240);
this.Load += new System.EventHandler(this.TempMeterCfgCtrl_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TextBox positionTextBox;
private System.Windows.Forms.Label positionLabel;
private System.Windows.Forms.Label parentNameLabel;
private System.Windows.Forms.TextBox nameTextBox;
private System.Windows.Forms.Label nameLabel;
private System.Windows.Forms.Label classNameLabel;
private System.Windows.Forms.TextBox a1TextBox;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox a2TextBox;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox a3TextBox;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox a5TextBox;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox a4TextBox;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.ComboBox parentNameComboBox;
private System.Windows.Forms.TextBox coefsIdxTextBox;
private System.Windows.Forms.Label coefsIdxLabel;
}
}

View File

@ -0,0 +1,163 @@
///
/// Copyright (c) 2015 Sensus Metering Systems
/// Author: Milan Hanajik
///
using System;
using System.Globalization;
using System.Windows.Forms;
using log4net;
using TBF.BenchControl.Generic;
namespace TBF.BenchControl.Elde.TempMeterInternal
{
public partial class TempMeterCfgCtrl : UserControl, IComponentCfgCtrl
{
static readonly ILog log = LogManager.GetLogger(typeof(TempMeterCfgCtrl));
ComponentParametersDlg parent;
public bool ShowMore { get { return false; } }
TempMeterCfg config;
public IComponentCfg Config
{
get { return config as IComponentCfg; }
set
{
config = value as TempMeterCfg;
Redraw();
}
}
public TempMeterCfgCtrl()
{
InitializeComponent();
}
private void TempMeterCfgCtrl_Load(object sender, EventArgs e)
{
parent = ParentForm as ComponentParametersDlg;
if (parent == null) return;
if (parent.TbfComponents != null)
{
foreach (var cmpnt in parent.TbfComponents)
{
if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is Elde.ControlBoardFactory)
{
parentNameComboBox.Items.Add(cmpnt.Name);
}
}
}
Redraw();
}
public void Closing()
{
}
void Redraw()
{
if (config == null) return; /// Control was not loaded, settings were not changed
classNameLabel.Text = config.Factory.ClassName;
nameTextBox.Text = config.Name;
parentNameComboBox.Text = string.IsNullOrEmpty(config.ParentName) ? "---" : config.ParentName;
positionTextBox.Text = config.Idx0.ToString();
coefsIdxTextBox.Text = config.CoefsIdx0.ToString();
a1TextBox.Text = config.A1.ToString();
a2TextBox.Text = config.A2.ToString();
a3TextBox.Text = config.A3.ToString();
a4TextBox.Text = config.A4.ToString();
a5TextBox.Text = config.A5.ToString();
}
public void Unlock()
{
nameTextBox.Enabled = true;
parentNameComboBox.Enabled = true;
positionTextBox.Enabled = true;
coefsIdxTextBox.Enabled = true;
a1TextBox.Enabled = true;
a2TextBox.Enabled = true;
a3TextBox.Enabled = true;
a4TextBox.Enabled = true;
a5TextBox.Enabled = true;
}
public CfgUpdateFlags VerifyCfg(ref string message)
{
CfgUpdateFlags flags = CfgUpdateFlags.None;
int dummy;
if (!parentNameComboBox.Items.Contains(parentNameComboBox.Text))
{
flags |= CfgUpdateFlags.Error;
message += Environment.NewLine + "Invalid 'Parent Name'";
}
if (!int.TryParse(positionTextBox.Text, out dummy) || dummy < 0 || dummy > 7)
{
flags |= CfgUpdateFlags.Error;
message += Environment.NewLine + "'Position' should be between 0 and 7";
}
if (!int.TryParse(coefsIdxTextBox.Text, out dummy) || dummy < 0 || dummy > 7)
{
flags |= CfgUpdateFlags.Error;
message += Environment.NewLine + "'Coeficients idx.' should be between 0 and 7";
}
float fdummy;
if (!Utils.TryParseEFloat(a1TextBox.Text, out fdummy))
{
flags |= CfgUpdateFlags.Error;
message += Environment.NewLine + "'A1' is not valid";
}
if (!Utils.TryParseEFloat(a2TextBox.Text, out fdummy))
{
flags |= CfgUpdateFlags.Error;
message += Environment.NewLine + "'A2' is not valid";
}
if (!Utils.TryParseEFloat(a3TextBox.Text, out fdummy))
{
flags |= CfgUpdateFlags.Error;
message += Environment.NewLine + "'A3' is not valid";
}
if (!Utils.TryParseEFloat(a4TextBox.Text, out fdummy))
{
flags |= CfgUpdateFlags.Error;
message += Environment.NewLine + "'A4' is not valid";
}
if (!Utils.TryParseEFloat(a5TextBox.Text, out fdummy))
{
flags |= CfgUpdateFlags.Error;
message += Environment.NewLine + "'A5' is not valid";
}
return flags;
}
public CfgUpdateFlags UpdateCfg()
{
CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
config.Name = nameTextBox.Text;
config.ParentName = parentNameComboBox.Text.Equals("---") ? string.Empty : parentNameComboBox.Text;
config.Idx0 = int.Parse(positionTextBox.Text);
config.CoefsIdx0 = int.Parse(coefsIdxTextBox.Text);
bool updateOk = Utils.TryParseEFloat(a1TextBox.Text, out config.A1) &&
Utils.TryParseEFloat(a2TextBox.Text, out config.A2) &&
Utils.TryParseEFloat(a3TextBox.Text, out config.A3) &&
Utils.TryParseEFloat(a4TextBox.Text, out config.A4) &&
Utils.TryParseEFloat(a5TextBox.Text, out config.A5);
return flags;
}
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,22 @@
///
/// Copyright (c) 2015 Sensus Metering Systems
/// Author: Milan Hanajik
///
using TBF.BenchControl.Generic;
namespace TBF.BenchControl.Elde.TempMeterInternal
{
public class TempMeterFactory : IComponentFactory
{
public string ClassName { get { return "TempMeterInternal"; } }
public void ResetStaticProperties() { TempMeter.ResetStaticProperties(); }
public IComponentCfg DefaultConfig() { return new TempMeterCfg(this); }
public IComponentCfg CmpntCfgFromCmpntEntity(Entities.Component component)
{
return ComponentCfgBase.CreateFromDbEntity(typeof(TempMeterCfg), component, this);
}
}
}

View File

@ -44,6 +44,7 @@ namespace TBF.BenchControl
Factories.Add(new MettlerToledo.Multi.BalanceFactory());
Factories.Add(new TestMethods.PMaxTest.TestMethodFactory());
Factories.Add(new Elde.PressureMeter.PressureMeterFactory());
Factories.Add(new Elde.PressureMeterInternal.PressureMeterFactory());
Factories.Add(new Elde.Pump.PumpFactory());
Factories.Add(new Danfoss.VLT2800.PumpFactory());
Factories.Add(new Elde.PumpWithFM.PumpFactory());
@ -55,6 +56,7 @@ namespace TBF.BenchControl
Factories.Add(new ResultsPrinters.Munich.PrinterFactory());
Factories.Add(new TestMethods.CameraRoiDetection.RoiDetectionFactory());
Factories.Add(new Elde.TempMeter.TempMeterFactory());
Factories.Add(new Elde.TempMeterInternal.TempMeterFactory());
Factories.Add(new Elde.Valve.ValveFactory());
Factories.Add(new WaterMeter.WaterMeterFactory());
}

View File

@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("1.4.42.1")]
[assembly: AssemblyFileVersion("1.4.42.1")]
[assembly: AssemblyVersion("1.4.43.1")]
[assembly: AssemblyFileVersion("1.4.43.1")]

View File

@ -92,7 +92,7 @@
<SignManifests>true</SignManifests>
</PropertyGroup>
<ItemGroup>
<Reference Include="ControlComponent3Munich">
<Reference Include="ControlComponent3U">
<HintPath>..\packages\ControlBoard\Munich\ControlComponent3Munich.dll</HintPath>
</Reference>
<Reference Include="FluentNHibernate">
@ -184,6 +184,26 @@
<DependentUpon>TestStartEndForm.cs</DependentUpon>
</Compile>
<Compile Include="BenchControl\Elde\Diverter\Handlers.cs" />
<Compile Include="BenchControl\Elde\PressureMeterInternal\PressureMeter.cs" />
<Compile Include="BenchControl\Elde\PressureMeterInternal\PressureMeterCfg.cs" />
<Compile Include="BenchControl\Elde\PressureMeterInternal\PressureMeterCfgCtrl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="BenchControl\Elde\PressureMeterInternal\PressureMeterCfgCtrl.Designer.cs">
<DependentUpon>PressureMeterCfgCtrl.cs</DependentUpon>
</Compile>
<Compile Include="BenchControl\Elde\PressureMeterInternal\PressureMeterFactory.cs" />
<Compile Include="BenchControl\Elde\PressureMeterInternal\ReadPressureOp.cs" />
<Compile Include="BenchControl\Elde\TempMeterInternal\ReadTempOp.cs" />
<Compile Include="BenchControl\Elde\TempMeterInternal\TempMeter.cs" />
<Compile Include="BenchControl\Elde\TempMeterInternal\TempMeterCfg.cs" />
<Compile Include="BenchControl\Elde\TempMeterInternal\TempMeterCfgCtrl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="BenchControl\Elde\TempMeterInternal\TempMeterCfgCtrl.designer.cs">
<DependentUpon>TempMeterCfgCtrl.cs</DependentUpon>
</Compile>
<Compile Include="BenchControl\Elde\TempMeterInternal\TempMeterFactory.cs" />
<Compile Include="BenchControl\MettlerToledo\Multi\BalanceCfg.cs" />
<Compile Include="BenchControl\MettlerToledo\Multi\BalanceCfgCtrl.cs">
<SubType>UserControl</SubType>
@ -1245,6 +1265,9 @@
<EmbeddedResource Include="BenchControl\Elde\FlowMeter\FlowMeterCfgCtrl.resx">
<DependentUpon>FlowMeterCfgCtrl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="BenchControl\Elde\PressureMeterInternal\PressureMeterCfgCtrl.resx">
<DependentUpon>PressureMeterCfgCtrl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="BenchControl\Elde\PressureMeter\PressureMeterCfgCtrl.resx">
<DependentUpon>PressureMeterCfgCtrl.cs</DependentUpon>
</EmbeddedResource>
@ -1266,6 +1289,9 @@
<EmbeddedResource Include="BenchControl\Elde\RegulValve\RegulValveCfgCtrl.resx">
<DependentUpon>RegulValveCfgCtrl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="BenchControl\Elde\TempMeterInternal\TempMeterCfgCtrl.resx">
<DependentUpon>TempMeterCfgCtrl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="BenchControl\Elde\TempMeter\TempMeterCfgCtrl.resx">
<DependentUpon>TempMeterCfgCtrl.cs</DependentUpon>
</EmbeddedResource>