diff --git a/InstrumentControl/CommandLineOptions/CommandLineParser.cs b/InstrumentControl/CommandLineOptions/CommandLineParser.cs new file mode 100644 index 0000000..5ab0b30 --- /dev/null +++ b/InstrumentControl/CommandLineOptions/CommandLineParser.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace InstrumentControl.CommandLineOptions +{ + public static class CommandLineParser + { + + } +} diff --git a/InstrumentControl/CommandLineOptions/CommonOptions.cs b/InstrumentControl/CommandLineOptions/CommonOptions.cs new file mode 100644 index 0000000..be5d05d --- /dev/null +++ b/InstrumentControl/CommandLineOptions/CommonOptions.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CommandLine; + +namespace InstrumentControl.CommandLineOptions +{ + public class CommonOptions + { + + } + public class SpectrumAveragerOptions : CommonOptions + { + [Option(Default = (string)"NoRejection")] + public string? RejectionType { get; set; } + [Option(Default = (string)"NoWeight")] + public string? WeightingType { get; set; } + [Option(Default = (string)"SpectrumBinning")] + public string? SpectrumMergeType { get; set; } + [Option(Default = (double)0.9)] + public double Percentile { get; set; } + [Option(Default = (double)1.3)] + public double MinSigmaValue { get; set; } + [Option(Default = (double)1.3)] + public double MaxSigmaValue { get; set; } + [Option(Default = (double)0.02)] + public double BinSize { get; set; } + + } + + +} diff --git a/InstrumentControl/InstrumentControl.csproj b/InstrumentControl/InstrumentControl.csproj index af62893..a51de63 100644 --- a/InstrumentControl/InstrumentControl.csproj +++ b/InstrumentControl/InstrumentControl.csproj @@ -17,6 +17,7 @@ + diff --git a/InstrumentControl/Tasks/InstrumentControlTask.cs b/InstrumentControl/Tasks/InstrumentControlTask.cs index 4f1a256..42cd6d1 100644 --- a/InstrumentControl/Tasks/InstrumentControlTask.cs +++ b/InstrumentControl/Tasks/InstrumentControlTask.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; - +using CommandLine; namespace InstrumentControl { public abstract class InstrumentControlTask @@ -26,7 +26,6 @@ public void Run() Console.WriteLine("Executed {0} Task in {1} ms", TaskType, watch.ElapsedMilliseconds); } - public abstract void RunSpecific(); - + public virtual void RunSpecific() { } } } diff --git a/InstrumentControl/Tasks/SpectrumAveragingTask.cs b/InstrumentControl/Tasks/SpectrumAveragingTask.cs index ef02d2e..b910a7e 100644 --- a/InstrumentControl/Tasks/SpectrumAveragingTask.cs +++ b/InstrumentControl/Tasks/SpectrumAveragingTask.cs @@ -7,6 +7,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; +using InstrumentControl.CommandLineOptions; namespace InstrumentControl {