Example #1
0
 public MetricThresholdHystersis(Graph g) : base("Hysteresis Threshold", g)
 {
     _portIn         = new InputPortData1D(this, "In");
     _portThreshHigh = new InputPortValueDouble(this, "High");
     _portThreshLow  = new InputPortValueDouble(this, "Low");
     _portOut        = new OutputPortValueDouble(this, "Out");
 }
Example #2
0
        public MetricValue(Graph graph) : base("Value", graph)
        {
            _portOut   = new OutputPortValueDouble(this, "Out");
            _attrValue = new AttributeValueDouble(this, "Value");
            TimeValue  = new TimeLocatedValue <double>(0, TimeStamp.Zero);

            _attrValue.Changed += attrValue_Changed;
        }
Example #3
0
        public MetricThreshold(Graph graph) : base("Threshold", graph)
        {
            _portInp    = new InputPortData1D(this, "In");
            _portThresh = new InputPortValueDouble(this, "Threshold");
            _portOut    = new OutputPortValueDouble(this, "Out");

            _output = new TimeLocatedValue <double>(0, TimeStamp.Zero);
        }
Example #4
0
 public MetricSustainedThreshold(Graph g) : base("Sustained Threshold", g)
 {
     _portIn     = new InputPortData1D(this, "In");
     _portThresh = new InputPortValueDouble(this, "Thresh");
     _portOut    = new OutputPortValueDouble(this, "Out");
     _attrActiveDurationMillis = new AttributeValueDouble(this, "SustainDuration", "ms", 1000);
     _attrStartAt = new AttributeValueEnum <SustainMode>(this, "SustainStart");
 }
Example #5
0
        public MetricValueRange(Graph graph) : base("Range", graph)
        {
            _portOut = new OutputPortValueDouble(this, "Out");

            _attrValue = new AttributeValueDouble(this, "Value", IsRunning);
            _attrMax   = new AttributeValueDouble(this, "Max", IsRunning);
            _attrMin   = new AttributeValueDouble(this, "Min", IsRunning);
            _attrSteps = new AttributeValueInt(this, "Steps", IsRunning);

            _attrValue.Changed += (s, e) => {
                if (State == Graph.State.Running)
                {
                    SendValue(_attrValue.TypedGet());
                }
            };

            _attrMax.Changed += (s, e) => {
                if (_slider != null)
                {
                    _slider.Max = _attrMax.TypedGet();
                }
            };

            _attrMin.Changed += (s, e) => {
                if (_slider != null)
                {
                    _slider.Min = _attrMin.TypedGet();
                }
            };

            _attrSteps.Changed += (s, e) => {
                if (_slider != null)
                {
                    _slider.Steps = _attrSteps.TypedGet();
                }
            };
        }
Example #6
0
 public MetricValueTimeDelay(Graph g) : base("Value Time Delay", g)
 {
     _portIn          = new InputPortValueDouble(this, "In");
     _portOut         = new OutputPortValueDouble(this, "Out");
     _attrMillisDelay = new AttributeValueDouble(this, "Delay", "ms", 0);
 }