diff --git a/Battery/OpenTap.Plugins.Demo.Battery.csproj b/Battery/OpenTap.Plugins.Demo.Battery.csproj index 347ecc8..9b1c3a7 100644 --- a/Battery/OpenTap.Plugins.Demo.Battery.csproj +++ b/Battery/OpenTap.Plugins.Demo.Battery.csproj @@ -16,6 +16,7 @@ + diff --git a/Battery/PowerAnalyzer.cs b/Battery/PowerAnalyzer.cs index 9a8fe18..0d14f21 100644 --- a/Battery/PowerAnalyzer.cs +++ b/Battery/PowerAnalyzer.cs @@ -4,7 +4,9 @@ // you find useful, provided that you agree that Keysight Technologies has no // warranty, obligations or liability for any sample application files. +using System; using System.Diagnostics; +using OpenTap.Metrics; namespace OpenTap.Plugins.Demo.Battery { @@ -14,6 +16,9 @@ public class PowerAnalyzer : Instrument { private double idleVoltage = 0.0; + [Metric] [Unit("V")] + [Display("Idle Voltage")] + public double? IdleVoltage => Math.Round( lastBattery?.Model?.Voc ?? idleVoltage, 2); public PowerAnalyzer() { Name = "PSU"; diff --git a/Battery/TemperatureChamber.cs b/Battery/TemperatureChamber.cs index 3f9b3fc..7478e34 100644 --- a/Battery/TemperatureChamber.cs +++ b/Battery/TemperatureChamber.cs @@ -5,6 +5,7 @@ // warranty, obligations or liability for any sample application files. using System; +using OpenTap.Metrics; namespace OpenTap.Plugins.Demo.Battery { @@ -15,6 +16,10 @@ public class TemperatureChamber : Instrument private double temperatureTarget = 50; public static double Temperature = 25; public static double Humidity = 25; + [Metric] + [Unit("°C")] + [Display("Temperature")] + public double TemperatureMetric => Math.Round(Temperature, 2); public TemperatureChamber() { diff --git a/package.xml b/package.xml index a498fea..9922290 100644 --- a/package.xml +++ b/package.xml @@ -1,54 +1,46 @@  - - - This plugin package contains a number of demonstration plugins, demonstration test steps, and demonstration test - plans. - Released - OpenTAP - - - - Emulated PSU - + + + This plugin package contains a number of demonstration plugins, demonstration test steps, and demonstration test plans. + Released + OpenTAP + + Emulated PSU + Keysight Technologies, Inc. - https://github.com/opentap/Demonstration - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + https://github.com/opentap/Demonstration + + + + + + + + + + + + + + + + + + + + + + + + + + + + +