Esempio n. 1
0
 internal void handleXmitCtrl(ChabuXmitterNormal xmitter, ByteBuffer xmitBuf)
 {
     if (recvArmShouldBeXmit)
     {
         recvArmShouldBeXmit = false;
         xmitter.ProcessXmitArm(channelId, recvArm);
     }
 }
Esempio n. 2
0
        internal ByteBuffer handleXmitData(ChabuXmitterNormal xmitter, ByteBuffer xmitBuf, int maxSize)
        {
            int davail = Math.Min(getXmitRemainingByRemote(), XmitRemaining);

            if (davail == 0)
            {
                //System.out.println("ChabuChannelImpl.handleXmitData() : called by no data available");
                return(null);
            }
            int pls = Math.Min(davail, maxSize);

            ByteBuffer seqBuffer = xmitSource.GetXmitBuffer(pls);

            int realPls = seqBuffer.remaining();

            Utils.ensure(realPls > 0, ChabuErrorCode.ASSERT, "XmitSource gave buffer with no space");
            Utils.ensure(realPls <= pls, ChabuErrorCode.ASSERT, "XmitSource gave buffer with more data than was requested");

            xmitter.ProcessXmitSeq(channelId, xmitSeq, realPls);
            xmitSeq      += realPls;
            xmitPosition += realPls;

            return(seqBuffer);
        }