Ejemplo n.º 1
0
 private ChabuChannelImpl PopNextPriorizedChannelRequest(Priorizer priorizer)
 {
     lock (this){
         int reqChannel = priorizer.popNextRequest();
         if (reqChannel < 0)
         {
             return(null);
         }
         return(channels.get(reqChannel));
     }
 }
Ejemplo n.º 2
0
        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());
        }
Ejemplo n.º 3
0
 private void create(int prio, int channels)
 {
     p = new Priorizer(prio, channels);
 }