public TimeDisplayWaterfall(Graph g) : base("Waterfall", g) { _port = new InputPortDataFFT(this, "In"); _attrDbMax = new AttributeValueDouble(this, "dB max", "dB"); _attrDbMin = new AttributeValueDouble(this, "dB min", "dB"); _attrTimeWindow = new AttributeValueInt(this, "Window Length", "ms"); _attrDbMin.Changed += (s, e) => { if (_attrDbMin.TypedGet() >= _attrDbMax.TypedGet()) { _attrDbMin.Set(_attrDbMax.TypedGet() - 0.0001); } if (_wnd != null) { _wnd.DbMin = (float)_attrDbMin.TypedGet(); } }; _attrDbMax.Changed += (s, e) => { if (_attrDbMax.TypedGet() <= _attrDbMin.TypedGet()) { _attrDbMax.Set(_attrDbMin.TypedGet() + 0.0001); } if (_wnd != null) { _wnd.DbMax = (float)_attrDbMax.TypedGet(); } }; _attrTimeWindow.Changed += (s, e) => { UpdateWindowSettings(); }; _attrTimeWindow.SetRuntimeReadonly(); }
private static void LoadFftInputBuffer(NodeState from, InputPortDataFFT to) { if (to.Queue != null) { to.LoadBuffer((SignalRingBuffer)from.PortValues[to.Name]); } }
private static void SaveDataInputBuffer(InputPortDataFFT p, NodeState to) { if (p.Queue != null) { to.WriteValue(to.PortValues, p.Name, p.Queue.GetState()); } }
public TimeFourierDisplay(Graph g) : base("Time Fourier Display", g) { _port = new InputPortDataFFT(this, "In"); }