public InputPortValue(Node parent, string name, PortDataType type) : base(parent, name, type) { _values = new CustomSortedList <TimeLocatedValue <T>, TimeStamp>( (v) => v.Stamp, (k, v) => k.CompareTo(v.Stamp) ); }
public static OutputPort Create(string name, PortDataType type) { switch (type) { case PortDataType.Array: return(new DataOutputPort(name)); case PortDataType.Value: return(new ValueOutputPort(name)); case PortDataType.FFT: return(new FFTOutputPort(name)); default: throw new ArgumentException(); } }
private void CreateLine(PortDataType type) { Func <int> PortCount = () => _lines.Count(l => l.Port.DataType.Equals(type)); RecorderLine line = null; if (type == PortDataTypes.TypeIdValueDouble) { var port = new NodeSystemLib2.FormatValue.InputPortValueDouble(this, $"{_portTypePrefix[type]}{PortCount()}"); line = new RecorderLineValue(port, this); } else if (type == PortDataTypes.TypeIdSignal1D) { var port = new NodeSystemLib2.FormatData1D.InputPortData1D(this, $"{_portTypePrefix[type]}{PortCount()}"); line = new RecorderLine1D(port, this); } else { throw new ArgumentException(nameof(type)); } line.Port.ConnectionChanged += LineStateChanged; _lines.Add(line); }
private static EC.PortDataType GetDataType(PortDataType type) { return(GlobalSettings.Instance.NodeDataTypes[type]); }
protected OutputPort(string name, PortDataType type) { Name = name; DataType = type; _connections.CollectionChanged += _connections_CollectionChanged; }
protected InputPort(string name, PortDataType type) { Name = name; DataType = type; }
public OuputPortValue(Node parent, string name, PortDataType type) : base(parent, name, type) { _values = new List <TimeLocatedValue <T> >(); }