コード例 #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)
 {
 }