private static int GENERATION_LENGTH_MAX = (int)ACQUISITION_DEPTH_MAX * 3; //Don't generate more than this many samples of wave #region constructor / initializer internal DummyScope() : base() { waveSource = WaveSource.GENERATOR; ChannelConfig = new Dictionary <AnalogChannel, DummyScopeChannelConfig>() { { AnalogChannel.ChA, new DummyScopeChannelConfig() { amplitude = 2, noise = 0, coupling = Coupling.DC, dcOffset = 0.0, frequency = 10e3, phase = 0, dutyCycle = 0.5f, waveform = AnalogWaveForm.TRIANGLE, probeDivision = ProbeDivision.X1, } }, { AnalogChannel.ChB, new DummyScopeChannelConfig() { amplitude = 1, noise = 0.1, coupling = Coupling.DC, dcOffset = 0.0, frequency = 10e3, phase = 0, dutyCycle = 0.5f, waveform = AnalogWaveForm.SINE, probeDivision = ProbeDivision.X1, } } }; timeOrigin = DateTime.Now; DataSourceScope = new DataSources.DataSource(this); AcquisitionDepth = 16 * 1024; }
private static int GENERATION_LENGTH_MAX = (int)ACQUISITION_DEPTH_MAX * 3; //Don't generate more than this many samples of wave #region constructor / initializer public DummyScope(DummyInterface iface) : base() { this.hardwareInterface = iface; ChannelConfig = new Dictionary <AnalogChannel, DummyScopeChannelConfig>() { { AnalogChannel.ChA, new DummyScopeChannelConfig() { amplitude = 2, noise = 0, coupling = Coupling.DC, dcOffset = 0.0, frequency = 10e3, phase = 0, dutyCycle = 0.5f, waveform = AnalogWaveForm.TRIANGLE } }, { AnalogChannel.ChB, new DummyScopeChannelConfig() { amplitude = 1, noise = 0.015, coupling = Coupling.DC, dcOffset = 0.0, frequency = 10e3, phase = 0, dutyCycle = 0.5f, waveform = AnalogWaveForm.SINE } } }; timeOrigin = DateTime.Now; DataSourceScope = new DataSources.DataSource(this); AcquisitionDepth = 16 * 1024; }
public SmartScope(ISmartScopeInterface hwInterface) : base() { this.hardwareInterface = hwInterface; this.SuspendViewportUpdates = false; DataOutOfRange = false; deviceReady = false; foreach (DigitalChannel d in DigitalChannel.List) { this.triggerDigital[d] = DigitalTriggerValue.X; } yOffset = new Dictionary <AnalogChannel, float>(); verticalRanges = new Dictionary <AnalogChannel, Range>(); foreach (AnalogChannel ch in AnalogChannel.List) { ch.SetProbe(Probe.DefaultX1Probe); yOffset[ch] = 0f; } dataSourceScope = new DataSources.DataSource(this); try { InitializeHardware(); } catch (Exception e) { Logger.Error("Failed to initialize hardware, resetting scope: " + e.Message); if (HardwareInterface != null) { hardwareInterface.Reset(); } throw e; } }
internal SmartScope(ISmartScopeUsbInterface usbInterface) : base() { this.hardwareInterface = usbInterface; AwgOutOfRange = false; deviceReady = false; foreach (DigitalChannel d in DigitalChannel.List) { this.triggerDigital[d] = DigitalTriggerValue.X; } probeSettings = new Dictionary <AnalogChannel, ProbeDivision>(); yOffset = new Dictionary <AnalogChannel, float>(); verticalRanges = new Dictionary <AnalogChannel, Range>(); foreach (AnalogChannel ch in AnalogChannel.List) { probeSettings[ch] = ProbeDivision.X1; yOffset[ch] = 0f; } dataSourceScope = new DataSources.DataSource(this); InitializeHardware(); }
public TransferHelper(DataSources.DataSource dataSource, BackgroundWorker worker) { _dataSource = dataSource; _worker = worker; }