tbf/TestBenchFramework/BenchControl/Elde/CoverTest/CoverTestCfg.cs

56 lines
1.5 KiB
C#

///
/// Copyright (c) 2017 Sensus Metering Systems
///
using System.IO;
using System.Collections.Generic;
using System.Xml.Serialization;
using TBF.BenchControl.Generic;
using TBF.Resources;
namespace TBF.BenchControl.Elde.CoverTest
{
public class CoverTestCfg : ComponentCfgBase, IChildComponentCfg
{
public IComponentCfgCtrl GetControl() { return new CoverTestCfgCtrl(); }
///
/// Serialized parameters
///
public int BitPosition;
public bool Invert;
public string Message;
public Users.Grp.GID BypassLevel;
/// Private parameterless constructor invoked by all other (public) constructors
CoverTestCfg()
{
Name = "CoverTest";
ParentName = "CB";
/// Default values for closed cover test
BitPosition = 22;
Invert = false;
Message = Strings.Close_the_cover;
BypassLevel = Users.Grp.GID.TestingSpecialists;
}
public CoverTestCfg(IComponentFactory factory)
: this()
{
this.Factory = factory;
}
public string ToString(int i)
{
return string.Format("{0} ({1}) Bit={2}, Inv={3}, Message={4}, BypassLelvel={5}",
Name,
(string.IsNullOrEmpty(ParentName) ? "-" : ParentName),
BitPosition,
Invert ? "yes" : "no",
Message,
BypassLevel);
}
}
}