int sendNextByte(){
  int result=0;
  try {
    long tDiff=interByteTime - ((System.currentTimeMillis() - lastRxTime) * 1000000000);
    if (tDiff > 0) {
      log.debug("TX: waiting " + tDiff + " ns");
      Thread.sleep(tDiff / 1000000L,(int)(tDiff % 1000000L));
    }
  }
 catch (  InterruptedException ex) {
    log.error("wait: " + ex.toString());
  }
  if (currTxCharPos >= currTxTgm.length) {
    result=dequeueTelegram();
  }
  if (result == 0) {
    writeChar(currTxTgm[currTxCharPos++],true);
    if (currTxCharPos >= currTxTgm.length) {
      setProtStat(ProtStatus.RECEIVING);
    }
  }
  return result;
}

int sendNextByte ( ) { int result = 0 ; try { long tDiff = interByteTime - ( ( System . currentTimeMillis ( ) - lastRxTime ) * 1000000000 ) ; if ( tDiff > 0 ) { log . debug ( "TX: waiting " + tDiff + " ns" ) ; Thread . sleep ( tDiff / 1000000L , ( int ) ( tDiff % 1000000L ) ) ; } } catch ( InterruptedException ex ) { log . error ( "wait: " + ex . toString ( ) ) ; } if ( currTxCharPos >= currTxTgm . length ) { result = dequeueTelegram ( ) ; } if ( result == 0 ) { writeChar ( currTxTgm [ currTxCharPos ++ ] , true ) ; if ( currTxCharPos >= currTxTgm . length ) { setProtStat ( ProtStatus . RECEIVING ) ; } } return result ; }
send next available byte
