Changes for Xylem Nanjing, ver. 3.1.1676
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
///
|
||||
/// Copyright (c) 2021 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml.Serialization;
|
||||
using log4net;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using TBF.Rig;
|
||||
using TBF.Rig.Generic;
|
||||
using TBF.Rig.Sequences;
|
||||
using TBF.UiBridge;
|
||||
|
||||
namespace TBF.Rig.TestMethods.S640Communication
|
||||
{
|
||||
/// <summary>
|
||||
/// Communicates with S640 meters via shared files and SIRT.
|
||||
/// </summary>
|
||||
public class S640Start : ComponentBase, GenericDevices.ISimultTestMethod
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(S640Start));
|
||||
public override string ToString() { return string.Format("{0}({1})", ClassName, Cfg.ToString(-1)); }
|
||||
|
||||
public bool CanTest(MetersKind meters) { return meters == MetersKind.Single; }
|
||||
public bool DoTransitions() { return false; }
|
||||
public bool CheckDeviceCaps(Test test, OutputPath devices, out string message) { message = string.Empty; return true; }
|
||||
|
||||
readonly S640StartCfg myCfg;
|
||||
public bool SimultWithPrevious { get { return myCfg.SimultWithPurging; } }
|
||||
public bool SimultWithNext { get { return false; } }
|
||||
|
||||
|
||||
public S640Start() { }
|
||||
|
||||
public S640Start(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
myCfg = cfg as S640StartCfg;
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
if (!Directory.Exists(Constants.SirtLogDir)) Directory.CreateDirectory(Constants.SirtLogDir);
|
||||
log.FatalFormat("{0} initialized: {1}", Name, this);
|
||||
}
|
||||
|
||||
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
||||
{
|
||||
return (new S640CommSeq()).Execute(test, repetNr, S640Activity.Start, myCfg, myCfg.ProcParams);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user