示例#1
0
        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();
        }
示例#2
0
 private static void LoadFftInputBuffer(NodeState from, InputPortDataFFT to)
 {
     if (to.Queue != null)
     {
         to.LoadBuffer((SignalRingBuffer)from.PortValues[to.Name]);
     }
 }
示例#3
0
 private static void SaveDataInputBuffer(InputPortDataFFT p, NodeState to)
 {
     if (p.Queue != null)
     {
         to.WriteValue(to.PortValues, p.Name, p.Queue.GetState());
     }
 }
示例#4
0
 public TimeFourierDisplay(Graph g) : base("Time Fourier Display", g)
 {
     _port = new InputPortDataFFT(this, "In");
 }