Package org.jnode.driver.bus.ide.command

Examples of org.jnode.driver.bus.ide.command.IDEPacketCommand


                                        int dataOffset, long timeout) throws SCSIException,
            TimeoutException, InterruptedException {
            final IDEDevice dev = (IDEDevice) getDevice();
            final IDEBus bus = (IDEBus) dev.getBus();

            final IDEPacketCommand cmd = new IDEPacketCommand(
                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

TOP

Related Classes of org.jnode.driver.bus.ide.command.IDEPacketCommand

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.