private ChabuChannelImpl PopNextPriorizedChannelRequest(Priorizer priorizer) { lock (this){ int reqChannel = priorizer.popNextRequest(); if (reqChannel < 0) { return(null); } return(channels.get(reqChannel)); } }
public ChabuXmitterNormal(AbortMessage abortMessage, Runnable xmitRequestListener, int priorityCount, List <ChabuChannelImpl> channels, ChabuFactory.PriorizerFactory priorizerFactory, int remoteRecvPacketSize) : base(abortMessage, xmitRequestListener) { actionsNormalRun = new List <LoopCtrlAction> { xmitAction_RemainingXmitBuf, xmitAction_RemainingSeq, xmitAction_EvalAbort, xmitAction_EvalChannelCtrl, xmitAction_EvalChannelData, xmitAction_EvalNop, xmitAction_End, }; xmitBuf.order(ByteOrder.BIG_ENDIAN); xmitBuf.clear().limit(0); this.RemoteRecvPacketSize = remoteRecvPacketSize; this.channels = channels; xmitChannelRequestData = priorizerFactory(priorityCount, channels.size()); xmitChannelRequestCtrl = priorizerFactory(priorityCount, channels.size()); }
private void create(int prio, int channels) { p = new Priorizer(prio, channels); }