Example #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();
        }
Example #2
0
        public Recorder3(Graph g) : base("Recorder 3", g)
        {
            CreateLine(PortDataTypes.TypeIdSignal1D);
            CreateLine(PortDataTypes.TypeIdValueDouble);
            _portEnable            = new NodeSystemLib2.FormatValue.InputPortValueDouble(this, "Enable");
            _attrPrebufferLengthMs = new AttributeValueDouble(this, "PreBuffer", "ms", 1000);

            _attrNumOfLines1D = new AttributeValueInt(this, "NumOfLines1D", 1);
            _attrNumOfLines2D = new AttributeValueInt(this, "NumOfLines2D", 1);
            _attrNumOfLines1D.SetRuntimeReadonly();
            _attrNumOfLines2D.SetRuntimeReadonly();
            _attrNumOfLines1D.Changed += _numOfLines1D_Changed;
            _attrNumOfLines2D.Changed += _numOfLines2D_Changed;
        }
Example #3
0
        public MetricFile(Graph g) : base("File Node", g)
        {
            _portOut     = new OutputPortData1D(this, "Out");
            _portTrigger = new InputPortValueDouble(this, "Trig");

            _attrFilePath   = new AttributeValueFile(this, "Path", true);
            _attrSamplerate = new AttributeValueInt(this, "Samplerate", 1000);
            _attrDataType   = new AttributeValueEnum <DataType>(this, "DataType");

            _attrSamplerate.Changed += (o, e) => _portOut.Samplerate = _attrSamplerate.TypedGet();

            _attrSamplerate.SetRuntimeReadonly();
            _attrDataType.SetRuntimeReadonly();
            _attrFilePath.SetRuntimeReadonly();
        }