90 lines
2.9 KiB
C#
90 lines
2.9 KiB
C#
///
|
|
/// Copyright (c) 2016 Sensus Metering Systems
|
|
///
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Xml.Serialization;
|
|
using TBF.BenchControl.Generic;
|
|
|
|
namespace TBF.BenchControl.Keithley.TempMeter
|
|
{
|
|
public class TempMeterCfg : ComponentCfgBase, IChildComponentCfg, TBF.BenchControl.GenericDevices.ICalibInfoCfg, SchematicDrawing.IDrawingItemCfg
|
|
{
|
|
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(TempMeterCfg) })[0];
|
|
public override XmlSerializer GetSerializer() { return Serializer; }
|
|
|
|
public IComponentCfgCtrl GetControl() { return new TempMeterCfgCtrl(); }
|
|
|
|
///
|
|
/// Serialized parameters
|
|
///
|
|
public int Channel; /// 1..5
|
|
|
|
public bool UseITS90; /// true: use ITS-90 calibration coefficients
|
|
/// false: use Callendar-Van Dusen equations (coefficients)
|
|
|
|
/// ITS-90 calibration coefficients
|
|
public double R001C;
|
|
public double a7;
|
|
public double b7;
|
|
public double c7;
|
|
|
|
/// Callendar-Van Dusen equations
|
|
public double R0;
|
|
public double A;
|
|
public double B;
|
|
|
|
/// Calibration info serialized parameters displayed in Metrology tab page
|
|
public string CalibCertificateNr { get; set; }
|
|
public DateTime CalibDate { get; set; }
|
|
public DateTime CalibValidDate { get; set; }
|
|
|
|
/// Schematic drawing info
|
|
public SchematicDrawing.Shape Shape { get; set; }
|
|
public int X { get; set; }
|
|
public int Y { get; set; }
|
|
public SchematicDrawing.Sz Sz { get; set; }
|
|
public SchematicDrawing.Orient Orient { get; set; }
|
|
public bool Flip { get; set; }
|
|
public int LblX { get; set; }
|
|
public int LblY { get; set; }
|
|
public SchematicDrawing.Orient LblOrient { get; set; }
|
|
public int ValX { get; set; }
|
|
public int ValY { get; set; }
|
|
public double ValFact { get; set; }
|
|
public string ValFmt { get; set; }
|
|
public SchematicDrawing.Orient ValOrient { get; set; }
|
|
|
|
/// Private parameterless constructor invoked by all other (public) constructors
|
|
TempMeterCfg()
|
|
{
|
|
}
|
|
|
|
public TempMeterCfg(string name, IComponentFactory factory)
|
|
: this()
|
|
{
|
|
this.Name = name;
|
|
this.Factory = factory;
|
|
ParentName = "Keithley.Multimeter_2010_RS232";
|
|
Channel = 1;
|
|
UseITS90 = false;
|
|
R0 = 100.0;
|
|
A = 3.9083E-3;
|
|
B = -5.775E-7;
|
|
Shape = SchematicDrawing.Shape.TempM;
|
|
}
|
|
|
|
public bool IsHidden() { return (X == 0) && (Y == 0); }
|
|
|
|
public string ToString(int i)
|
|
{
|
|
return string.Format("Name={0}, Parent={1}, Channel={2}, ITS-90={3}",
|
|
Name,
|
|
(string.IsNullOrEmpty(ParentName) ? "-" : ParentName),
|
|
Channel,
|
|
UseITS90);
|
|
}
|
|
}
|
|
}
|