예제 #1
0
 private static void LoadDataInputBuffer(NodeState from, DataInputPort to)
 {
     if (to.Queue != null)
     {
         to.LoadBuffer((SignalRingBuffer)from.PortValues[to.Name]);
     }
 }
예제 #2
0
 private static void SaveDataInputBuffer(DataInputPort p, NodeState to)
 {
     if (p.Queue != null)
     {
         to.WriteValue(to.PortValues, p.Name, p.Queue.GetState());
     }
 }
예제 #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);
                //}

                //if (State == ProcessingState.Running && port.Queue != null) {
                //    if (port.Queue.Length > 0) {
                //        CustomPool.Forker.Fork(() => DataProcessor((DataInputPort)port));
                //    }
                //}
            }
        }
예제 #4
0
 protected virtual void DataAvailable(DataInputPort port)
 {
 }