- all components, componentCfg-s and parameter providers use base classes - less boilerplate code, simpler access to test/procedure parameters from code - CreateTestParams(test), CreateProcedureParams(procedure) methods added - TestBenchSim class is made static, it is not inheritted by any device anymore
40 lines
1013 B
C#
40 lines
1013 B
C#
using System.IO;
|
|
using System.IO.Ports;
|
|
using System.Xml.Serialization;
|
|
using TBF.BenchControl.Generic;
|
|
|
|
namespace TBF.BenchControl.Cameras.IdcCamera
|
|
{
|
|
public class IdcCameraCfg : ComponentCfgBase, Generic.IComponentCfg
|
|
{
|
|
public int ComPortNr; /// Com port number 1..999
|
|
public int BaudRate; /// Baud rate 57600 or 115200
|
|
public float BrightnessCam; /// Relative brightness 0 .. 1.0f
|
|
|
|
/// Private parameterless constructor invoked by all other (public) constructors
|
|
IdcCameraCfg()
|
|
{
|
|
Name = "Idc";
|
|
ParentName = string.Empty;
|
|
ComPortNr = 20;
|
|
BaudRate = 57600;
|
|
BrightnessCam = 0.5f;
|
|
}
|
|
|
|
public IdcCameraCfg(IComponentFactory factory)
|
|
: this()
|
|
{
|
|
this.Factory = factory;
|
|
}
|
|
|
|
public string ToString(int i)
|
|
{
|
|
return string.Format("Name={0}, Com{1}, {2}Bd, brght={3}%",
|
|
Name,
|
|
ComPortNr,
|
|
BaudRate,
|
|
(int)(100.0f * BrightnessCam));
|
|
}
|
|
}
|
|
}
|