private static void LoadDataInputBuffer(NodeState from, DataInputPort to) { if (to.Queue != null) { to.LoadBuffer((SignalRingBuffer)from.PortValues[to.Name]); } }
private static void SaveDataInputBuffer(DataInputPort p, NodeState to) { if (p.Queue != null) { to.WriteValue(to.PortValues, p.Name, p.Queue.GetState()); } }
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)); // } //} } }
protected virtual void DataAvailable(DataInputPort port) { }