Package org.jnode.util

Examples of org.jnode.util.TimeoutException


                dev.isPrimary(), dev.isMaster(), cdb.toByteArray(), data,
                dataOffset);
            bus.executeAndWait(cmd, timeout);

            if (!cmd.isFinished()) {
                throw new TimeoutException("Timeout in SCSI command");
            } else if (cmd.hasError()) {
                throw new SCSIException("Command error 0x" + NumberUtils.hex(cmd.getError(), 2));
            } else {
                return cmd.getDataTransfered();
            }
View Full Code Here


     */
    public void waitUntilStatus(int mask, int value, long timeout, String message) throws TimeoutException {
        while ((getAltStatusReg() & mask) != value) {
            final int state = getAltStatusReg();
            if ((state & ST_ERROR) != 0) {
                throw new TimeoutException("IDE error " + NumberUtils.hex(getErrorReg(), 2));
            }
            if (timeout <= 0) {
                throw new TimeoutException((message != null) ? message : "Timeout in waitUntilStatus");
            }
            TimeUtils.sleep(10);
            timeout -= 10;
        }
    }
View Full Code Here

            final int state = getStateReg();
            if ((state & STATE_READY) != 0) {
                return state;
            }
        }
        throw new TimeoutException("Timeout in waiting for ready");
    }
View Full Code Here

        final long start = System.currentTimeMillis();
        while (!isState(state) && !isReset() && !isRefused()) {
            final long now = System.currentTimeMillis();
            if ((start + timeout <= now) && (timeout > 0)) {
                // We have a timeout
                throw new TimeoutException();
            }
            try {
                // Thread.currentThread().sleep(Math.max(1, timeout - (now -
                // start)));
                wait(Math.max(1, timeout - (now - start)));
View Full Code Here

            } else {
                TimeUtils.sleep(5);
            }
        }
        ;
        throw new TimeoutException("Prism2 still busy cmd=0x" + NumberUtils.hex(getReg(CMD), 4));
    }
View Full Code Here

            } else {
                TimeUtils.sleep(2);
            }
        }
        ;
        throw new TimeoutException("Prism2 still busy evstat=0x" +
                NumberUtils.hex(getReg(EVSTAT), 4));
    }
View Full Code Here

            } else {
                TimeUtils.sleep(5);
            }
        }
        ;
        throw new TimeoutException("Prism2 still busy offset=0x" +
                NumberUtils.hex(getReg(OFFSET0), 4));
    }
View Full Code Here

        // Wait until we can start transmitting
        final long start = System.currentTimeMillis();
        while (tx_active) {
            final long now = System.currentTimeMillis();
            if (now - start > timeout) {
                throw new TimeoutException("Timeout in claiming transmitter");
            }
            wait(timeout);
        }
        tx_active = true;
        //log.debug("Going for transmit");
View Full Code Here

                return hwAddress;
            }
            final long now = System.currentTimeMillis();
            if ((now - start) >= timeout) {
                // Still not correct response
                throw new TimeoutException("Timeout in ARP request");
            }
            // Try to send a request every few seconds
            if ((now - lastReq) >= ARP_REQUEST_DELAY) {
                lastReq = now;
                request(address, myAddress, device);
View Full Code Here

TOP

Related Classes of org.jnode.util.TimeoutException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.