/// /// Copyright (c) 2015 Sensus Metering Systems /// Author: Milan Hanajík /// using System; using System.Collections.Generic; using log4net; using TBF.BenchControl; namespace TBF.BenchControl.TestMethods.iPerlCommunication { public class TestMethod : ComponentBase, GenericDevices.ITestMethod, Generic.IDevice { private static readonly ILog log = LogManager.GetLogger(typeof(TestMethod)); protected static readonly ILog rfidDataLogger = LogManager.GetLogger("RfidData"); public override string ToString() { return string.Format("TestMethods.Adjustment({0})", Cfg.ToString(1)); } readonly TestMethodCfg testMethodCfg; public bool Evaluate { get { return false; } } public bool Publish { get { return false; } } public bool CanTest(Entities.MetersKind meters) { return meters == Entities.MetersKind.Single; } public TestMethod() { } public TestMethod(TestMethodCfg cfg) : base(cfg) { testMethodCfg = cfg; log.Debug(this.ToString()); } public void Initialize() { rfidDataLogger.Fatal("------------------------------------------------------------------------"); rfidDataLogger.Fatal("Program restarted"); } public void RunDeviceBefore() { } public void RunDeviceAfter() { } public void StopDevice() { } public IList Execute(Entities.Test test) { return (new iPerlCommunicationSeq()).Execute(test, testMethodCfg, testMethodCfg.TestParams); } } }