Package org.jnode.driver

Examples of org.jnode.driver.DriverException


            final int cmdFlags = ((macPort & 7) << 8);
            final Result result;
            result = io.executeCommand(ENABLE, cmdFlags, 0, 0, 0, null);
            io.resultToException(result);
        } catch (TimeoutException ex) {
            throw new DriverException("Timeout in Enable command", ex);
        }
    }
View Full Code Here


            final int cmdFlags = ((macPort & 7) << 8);
            final Result result;
            result = io.executeCommand(DISABLE, cmdFlags, 0, 0, 0, null);
            io.resultToException(result);
        } catch (TimeoutException ex) {
            throw new DriverException("Timeout in Disable command", ex);
        }
    }
View Full Code Here

        try {
            final Result result;
            result = io.executeCommand(TX, 0, fid, 0, 0, null);
            io.resultToException(result);
        } catch (TimeoutException ex) {
            throw new DriverException("Timeout in Tx command", ex);
        }
    }
View Full Code Here

        final byte[] hdr = new byte[Prism2Record.HDR_LENGTH];
        io.copyFromBAP(rid.getId(), 0, hdr, 0, hdr.length);

        // Validate the record length
        if ((Prism2Record.getRecordLength(hdr, 0) - 1) * 2 != len) {
            throw new DriverException("Mismatch in record length. " + len + '/'
                + Prism2Record.getRecordLength(hdr, 0));
        }

        // Copy out record data
        io.copyFromBAP(rid.getId(), hdr.length, dst, dstOffset, len);
View Full Code Here

        // Initialize card
        try {
            io.executeCommand(INIT, 0, 0, 0, 0, null);
        } catch (TimeoutException ex) {
            throw new DriverException("Cannot initialize device in time", ex);
        }

        // Disable interrupts
        io.setReg(INTEN, 0);
        // Acknowledge any spurious events
View Full Code Here

            case CNFAUTHENTICATION_OPENSYSTEM:
                return AuthenticationMode.OPENSYSTEM;
            case CNFAUTHENTICATION_SHAREDKEY:
                return AuthenticationMode.SHAREDKEY;
            default:
                throw new DriverException("Unknown authentication mode 0x"
                    + NumberUtils.hex(mode, 4));
        }
    }
View Full Code Here

                break;
            case SHAREDKEY:
                modeVal = CNFAUTHENTICATION_SHAREDKEY;
                break;
            default:
                throw new DriverException("Unknown authentication mode " + mode);
        }
        setConfig16(CNFAUTHENTICATION, modeVal);
    }
View Full Code Here

        final int iolength = getIOLength(device, flags);
        final ResourceManager rm;
        try {
            rm = InitialNaming.lookup(ResourceManager.NAME);
        } catch (NameNotFoundException ex) {
            throw new DriverException("Cannot find ResourceManager");
        }
        this.irq = rm.claimIRQ(owner, irq, this, true);
        try {
            io = claimPorts(rm, owner, iobase, iolength);
        } catch (ResourceNotFreeException ex) {
View Full Code Here

            }

            //log.debug("Got (on page " + page + "): " + NumberUtils.hex(returnData, 0, returnData.length));

        }
        throw new DriverException("Cannot find NIC memory of " + flags.getName());
    }
View Full Code Here

     * @param flags
     */
    public BCM570xCore(BCM570xDriver driver, ResourceOwner owner, PCIDevice device, Flags flags)
        throws DriverException, ResourceNotFreeException {
        if (!(flags instanceof BCM570xFlags))
            throw new DriverException("Wrong flags to the BCM570x driver");

        this.driver = driver;
        log.info(driver);
        this.flags = (BCM570xFlags) flags;

        final int irq = getIRQ(device, this.flags);
        log.info("BCM570x driver irq " + irq);

        // Get the start of the IO address space
        this.iobase = getIOBase(device, this.flags);

        final int iolength = getIOLength(device, this.flags);
        log.info("BCM570x driver iobase " + iobase + " irq " + irq);
        log.debug("BCM570x driver iobase " + iobase + " irq " + irq);

        final ResourceManager rm;

        try {
            rm = InitialNaming.lookup(ResourceManager.NAME);
        } catch (NameNotFoundException ex) {
            throw new DriverException("Cannot find ResourceManager");
        }

        this.irq = rm.claimIRQ(owner, irq, this, true);

        try {
View Full Code Here

TOP

Related Classes of org.jnode.driver.DriverException

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.