From 5066c78c0829de4c40e7e73feecc287736cf02f8 Mon Sep 17 00:00:00 2001 From: Milan Hanajik Date: Thu, 7 May 2015 18:45:02 +0200 Subject: [PATCH] MettlerToledo.Multi cleanup --- .../MettlerToledo/Multi/SetUnitsOp.cs | 61 ------------------- TestBenchFramework/TBF.csproj | 1 - 2 files changed, 62 deletions(-) delete mode 100644 TestBenchFramework/BenchControl/MettlerToledo/Multi/SetUnitsOp.cs diff --git a/TestBenchFramework/BenchControl/MettlerToledo/Multi/SetUnitsOp.cs b/TestBenchFramework/BenchControl/MettlerToledo/Multi/SetUnitsOp.cs deleted file mode 100644 index 513693522..000000000 --- a/TestBenchFramework/BenchControl/MettlerToledo/Multi/SetUnitsOp.cs +++ /dev/null @@ -1,61 +0,0 @@ -/// -/// Copyright (c) 2013-2015 Sensus Metering Systems -/// -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using log4net; - -namespace TBF.BenchControl.MettlerToledo.Multi -{ - public class SetUnitsOp : IOperation - { - private static readonly ILog log = LogManager.GetLogger(typeof(SetUnitsOp)); - public override string ToString() { return string.Format("SetUnitsOp({0})", units); } - - /// Set by the constructor - BalanceDev balanceDev; - BalanceDev.Units units; - - /// - /// Events: BalanceDone, Error - /// - /// Balance device instance - /// Reference to the serialNumber - public SetUnitsOp(BalanceDev balanceDev, BalanceDev.Units units) - { - if (balanceDev == null) throw new ArgumentNullException("balanceDev"); - this.balanceDev = balanceDev; - - this.units = units; - - log.Debug(this.ToString()); - } - - /// Start this operation - public void Start() - { - log.Debug("Start()"); - balanceDev.SetUnits(units); - } - - /// Run this operation - /// - /// Event.None - /// Event.BalanceDone - /// - public Event Run() - { - if (balanceDev.MsrmntState == MsrmntState.Valid) return Event.BalanceDone; /// Units set - if (balanceDev.MsrmntState == MsrmntState.Failed) return Event.Error; /// Failed - return Event.None; /// No result yet - } - - /// Stop this operation - public void Stop() - { - log.Debug("Stop()"); - } - } -} diff --git a/TestBenchFramework/TBF.csproj b/TestBenchFramework/TBF.csproj index b06bc4513..97a05c9b3 100644 --- a/TestBenchFramework/TBF.csproj +++ b/TestBenchFramework/TBF.csproj @@ -168,7 +168,6 @@ -