Beispiel #1
0
 private static void LoadDataInputBuffer(NodeState from, DataInputPort to)
 {
     if (to.Queue != null)
     {
         to.LoadBuffer((SignalRingBuffer)from.PortValues[to.Name]);
     }
 }
Beispiel #2
0
 private static void SaveDataInputBuffer(DataInputPort p, NodeState to)
 {
     if (p.Queue != null)
     {
         to.WriteValue(to.PortValues, p.Name, p.Queue.GetState());
     }
 }
Beispiel #3
0
        private void DataProcessor(DataInputPort port)
        {
            lock (_dataLock) {
                if (State != ProcessingState.Running)
                {
                    return;
                }

                var queuelen = port.Queue?.Length ?? 0;
                var buflen   = port.Buffer?.Length ?? 1;
                var packets  = queuelen / buflen;

                for (int i = 0; i < packets; i++)
                {
                    DataAvailable(port);
                }
            }
        }
Beispiel #4
0
 protected virtual void DataAvailable(DataInputPort port)
 {
 }