コード例 #1
0
 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)
         );
 }
コード例 #2
0
        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();
            }
        }
コード例 #3
0
        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);
        }
コード例 #4
0
ファイル: NodeEditor.cs プロジェクト: muba24/flumin-master
 private static EC.PortDataType GetDataType(PortDataType type)
 {
     return(GlobalSettings.Instance.NodeDataTypes[type]);
 }
コード例 #5
0
 protected OutputPort(string name, PortDataType type)
 {
     Name     = name;
     DataType = type;
     _connections.CollectionChanged += _connections_CollectionChanged;
 }
コード例 #6
0
 protected InputPort(string name, PortDataType type)
 {
     Name     = name;
     DataType = type;
 }
コード例 #7
0
 public OuputPortValue(Node parent, string name, PortDataType type) : base(parent, name, type)
 {
     _values = new List <TimeLocatedValue <T> >();
 }