public override void PrepareProcessing() { if (string.IsNullOrEmpty(_attrFuncName.TypedGet())) { throw new Exception("No matlab function specified"); } if (_matlab == null) { if (!TryFindMatlab()) { throw new Exception("No matlab instance found. Make sure to enable the automation server:\nenableservice('AutomationServer', true)"); } } _funcHeader = FindFunction(); if (_funcHeader == null) { throw new Exception($"Function {_attrFuncName.TypedGet()} not found or uses unsupported syntax in function header"); } foreach (var input in InputPorts.OfType <NodeSystemLib2.FormatData1D.InputPortData1D>()) { input.PrepareProcessing(); } foreach (var output in OutputPorts.OfType <NodeSystemLib2.FormatData1D.OutputPortData1D>()) { output.PrepareProcessing(); } }
public override void PrepareProcessing() { if (_editor != null && !_editor.IsDisposed && _editor.Edited) { _editor.AskForSave(); } if (_ctx == null) { throw new Exception("Python code has errors"); } try { _ctx.Call("prepare", new PyObject[0]); } catch (PyException e) { DisplayPythonError(e); throw; } foreach (var port in InputPorts.OfType <NodeSystemLib2.FormatData1D.InputPortData1D>()) { port.PrepareProcessing(); } foreach (var port in OutputPorts.OfType <NodeSystemLib2.FormatData1D.OutputPortData1D>()) { port.PrepareProcessing(); } }
private void Port_SamplerateChanged(object sender, SamplerateChangedEventArgs e) { foreach (var port in OutputPorts.OfType <NodeSystemLib2.FormatData1D.OutputPortData1D>()) { port.Samplerate = e.NewSamplerate; } }
public override void Transfer() { foreach (var port in OutputPorts.OfType <NodeSystemLib2.FormatData1D.OutputPortData1D>()) { port.Transfer(); } }