public ChannelProtocol(IProtocolCommand parent, int channelNumber) : base(parent) { ChannelNumber = channelNumber; PathParameter = channelNumber; BWLimit = new ProtocolCommand(this, "Bandwidth Limit", "BWL") { Options = StringOptions.BWLimit, }; Coupling = new ProtocolCommand(this, "Coupling", "COUP") { Options = StringOptions.Coupling, }; Display = new ProtocolCommand(this, "Display", "DISP") { Options = BooleanOptions.Boolean, }; Invert = new ProtocolCommand(this, "Invert", "INV") { Options = BooleanOptions.Boolean, }; Offset = new ProtocolCommand(this, "Offset", "OFFS") { Options = RealOptions.ChannelOffset_ScaleGreaterThan500m, }; Range = new ProtocolCommand(this, "Range", "RANG") { Options = RealOptions.ChannelRange, }; TCal = new ProtocolCommand(this, "TCal", "TCAL") { Options = RealOptions.ChannelTCal, }; Scale = new ProtocolCommand(this, "Scale", "SCAL") { Options = RealOptions.ChannelScale, }; Probe = new ProtocolCommand(this, "Probe", "PROB") { Options = StringOptions.ProbeRatio, }; Units = new ProtocolCommand(this, "Units", "UNIT") { Options = StringOptions.Units, }; Vernier = new ProtocolCommand(this, "Vernier", "VERN") { Options = BooleanOptions.Boolean, }; }
public TriggerNEdgeCommands(IProtocolCommand parent) : base(parent) { Source = new TriggerSourceCommand(this); Slope = new TriggerSlopeCommand(this) { Options = new StringOptions { new StringOption("POSitive", "POS"), new StringOption("NEGative", "NEG"), } }; Idle = new TriggerTimeCommand(this) { Name = "IDLE", Term = "IDLE", Options = new RealOptions { new RealOption(16 * SI.n, 10) } }; Edge = new ProtocolCommand(this) { Name = "EDGE", Term = "EDGE", Options = new IntegerOptions { new IntegerOption(1, 65535) } }; Level = new TriggerLevelCommand(this); }
public TriggerWindowsCommands(IProtocolCommand parent) : base(parent) { Source = new TriggerSourceChannelCommand(this); Slope = new TriggerSlopeCommand(this); Time = new TriggerTimeCommand(this) { Options = new RealOptions(8 * SI.n, 10) }; Position = new ProtocolCommand(this) { Name = "POSition", Term = "POS", Options = new StringOptions() { new StringOption("EXIT", "EXIT"), new StringOption("ENTER", "ENTER"), new StringOption("TIMe", "TIM"), } }; ALevel = new TriggerLevelCommand(this); BLevel = new TriggerLevelCommand(this); }
public RootProtocol() : base(null) { /// <summary> /// Query the current status (this duplicates the Trigger Status command). /// </summary> Status = new ProtocolCommand(this, nameof(Status), "STAT") { Path = ":TRIG:STAT", Options = new StringOptions { new StringOption("TD", "TD"), new StringOption("WAIT", "WAIT"), new StringOption("RUN", "RUN"), new StringOption("AUTO", "AUTO"), new StringOption("STOP", "STOP") } }; AutoScale = new ProtocolSimpleCommand(this, nameof(AutoScale), "AUT"); Clear = new ProtocolSimpleCommand(this, nameof(Clear), "CLE"); Run = new ProtocolSimpleCommand(this, nameof(Run), "RUN"); Stop = new ProtocolSimpleCommand(this, nameof(Stop), "STOP"); Single = new ProtocolSimpleCommand(this, nameof(Single), "SING"); Force = new ProtocolSimpleCommand(this, nameof(Force), "TFOR"); }
public TimebaseProtocol(IProtocolCommand parent) : base(parent) { Delay = new TimebaseDelayCommands(this); Offset = new ProtocolCommand(this, "Offset", "OFFS") { Path = ":MAIN:OFFS", // depends on whether scope is in slow sweep mode // Normal : (-0.5 x MemDepth / SampleRate) to 1s // Slow sweep: (-MemDepth/SampleRate) to (1s + 0.5 x MemDepth/SampleRate) // Highest memdepth is 24000000 // MemDepth = SampleRate x WaveformLength // WaveformLength = Scale x number of scales // number of scales for DS1000Z is 12 Options = new RealOptions(-12, 12) }; Scale = new ProtocolCommand(this, "Scale", "SCAL") { Path = ":MAIN:SCAL", // YT mode : 5ns/div to 50s/div in 1,2,5 steps // Roll mode: 200ms/div to 50s/div in 1,2,5 steps Options = TimebaseScaleOptions.YT, }; Mode = new ProtocolCommand(this, "Mode", "MODE") { Options = new StringOptions { new StringOption("Main", "MAIN"), new StringOption("XY", "XY"), new StringOption("Roll", "ROLL"), } }; }
public TriggerSHoldCommands(IProtocolCommand parent) : base(parent) { DataSource = new TriggerSourceChannelCommand(this); ClockSource = new TriggerSourceChannelCommand(this); Slope = new TriggerSlopeCommand(this) { Options = new StringOptions { new StringOption("POSitive", "POS"), new StringOption("NEGative", "NEG"), } }; Pattern = new TriggerPatternCommands(this) { Options = new StringOptions() { new StringOption("H", "H"), new StringOption("L", "L"), } }; Type = new ProtocolCommand(this) { Name = "TYP", Term = "TYP", Options = new StringOptions { new StringOption("SETup", "SET"), new StringOption("HOLd", "HOL"), new StringOption("SETHOLd", "SETHOL"), } }; SetupTime = new TriggerTimeCommand(this) { Name = "SHOLd", Term = "SHOL", Options = new RealOptions(8 * SI.n, 1), }; HoldTime = new TriggerTimeCommand(this) { Name = "HTIMe", Term = "HTIM", Options = new RealOptions(8 * SI.n, 1), }; }
public TriggerPatternCommands(IProtocolCommand parent) : base(parent) { Pattern = new ProtocolCommand(this) { Name = "PATTern", Term = "PATT", Options = new StringOptions { new StringOption("H", "H"), new StringOption("L", "L"), new StringOption("X", "X"), new StringOption("R", "R"), new StringOption("F", "F"), } }; Level = new TriggerLevelCommand(this); }
public TimebaseDelayCommands(IProtocolCommand parent) : base(parent) { Enable = new TimebaseEnableCommand(this); Offset = new ProtocolCommand(this, "Offset", "OFFS") { // LeftTime = 6x MainScale - MainOffset // RightTime = 6x MainScale - MainOffset // DelayRange = 12x DelayScale Options = new RealOptions(-12, 12) }; Scale = new ProtocolCommand(this, "Scale", "SCAL") { // max scale: MainScale // min scale: 50 / (SampleRate x AmplificationFactor) // Amplification factor is (10 x the sum of): // Number of enabled analog channels // Number of analog channels set as trigger sources // Number of enabled digital channel groups (D0 to D7 is one, D8 to D15 is the other) // TODO: This needs more work, I'm just guessing here Options = new RealOptions(10 * SI.n, 50) }; }
public TriggerProtocol(IProtocolCommand parent) : base(parent) { Mode = new ProtocolCommand(this) { Name = "Mode", Term = "MODE", Options = new ModeStringOptions(), }; Coupling = new ProtocolCommand(this) { Name = "Coupling", Term = "COUP", Options = new StringOptions() { new StringOption("AC", "AC"), new StringOption("DC", "DC"), new StringOption("LFReject", "LFR"), new StringOption("HFReject", "HFR") } }; /// <summary> /// Query the current status /// </summary> Status = new ProtocolCommand(this) { Name = "Status", Term = "STAT", Options = new StringOptions { new StringOption("TD", "TD"), new StringOption("WAIT", "WAIT"), new StringOption("RUN", "RUN"), new StringOption("AUTO", "AUTO"), new StringOption("STOP", "STOP") } }; /// <summary> /// Set or query the trigger mode. /// Auto : No matter whether the trigger condition is met, there is always waveform display. /// Normal: Display waveform when the trigger condition is met. Otherwise, the scope /// holds the original waveform and waits for the next trigger. /// Single: The scope waits for a trigger and displays the waveform when the trigger /// condition is met and then stops. /// </summary> Sweep = new ProtocolCommand(this) { Name = "Sweep", Term = "SWEep", Options = new StringOptions { new StringOption("Auto", "AUTO"), new StringOption("Normal", "NORM"), new StringOption("Single", "SING"), } }; /// <summary> /// Amount of time that is waited before the scope re-arms the trigger circuitry. /// This setting is not available when the trigger type is video, timeout, setup/hold, /// nth edge, RS232, I2c or SPI. /// </summary> Holdoff = new ProtocolCommand(this) { Name = "Holdoff", Term = "HOLDoff", Options = new RealOptions { new RealOption(16 * SI.n, 10) } }; /// <summary> /// Enable or disable noise rejection. /// </summary> NoiseReject = new ProtocolCommand(this) { Name = "NoiseReject", Term = "NREJect", Options = StringOptions.Boolean }; /// <summary> /// Query the position in the internal memory that corresponds to the waveform /// trigger position. /// -2 : not triggered, no position /// -1 : triggered outside the internal memory /// >0 : the position inthe internal memory /// </summary> Position = new ProtocolCommand(this) { Name = "Position", Term = "POSition", }; Edge = new TriggerEdgeCommands(this); Pulse = new TriggerPulseCommands(this); Slope = new TriggerSlopeCommands(this); Video = new TriggerVideoCommands(this); Pattern = new TriggerPatternCommands(this); Duration = new TriggerDurationCommands(this); Timeout = new TriggerTimeoutCommands(this); Runt = new TriggerRuntCommands(this); Windows = new TriggerWindowsCommands(this); Delay = new TriggerDelayCommands(this); SHold = new TriggerSHoldCommands(this); NEdge = new TriggerNEdgeCommands(this); }