Package org.jnode.driver

Examples of org.jnode.driver.DriverException


            }
            log.debug("PCIBaseAddress[" + i + "]: " + addrs[i].isIOSpace() + " addr: " +
                    NumberUtils.hex(addr));
        }
        if (addrs.length < 1) {
            throw new DriverException("Cannot find iobase: not base addresses");
        }
        if (!addrs[1].isIOSpace()) {
            throw new DriverException("Cannot find iobase: first address is not I/O");
        }
        return addrs[1].getIOBase();
    }
View Full Code Here


     */
    protected int getIOLength(Device device, EEPRO100Flags flags) throws DriverException {
        final PCIHeaderType0 config = ((PCIDevice) device).getConfig().asHeaderType0();
        final PCIBaseAddress[] addrs = config.getBaseAddresses();
        if (addrs.length < 1) {
            throw new DriverException("Cannot find iobase: not base addresses");
        }
        if (!addrs[1].isIOSpace()) {
            throw new DriverException("Cannot find iobase: first address is not I/O");
        }
        return addrs[1].getSize();
    }
View Full Code Here

                }
            });
        } catch (ResourceNotFreeException ex) {
            throw ex;
        } catch (Exception ex) {
            throw new DriverException("Unknown exception", ex);
        }
    }
View Full Code Here

    protected void startDevice() throws DriverException {
        try {
            VirtualDevice device = (VirtualDevice) getDevice();
            device.getManager().rename(device, device.getInitialName(), true);
        } catch (DeviceAlreadyRegisteredException ex) {
            throw new DriverException(ex);
        }
    }
View Full Code Here

    protected void startDevice() throws org.jnode.driver.DriverException {
        dimmDevice = (DIMM) getDevice();
        // now read the SPD table
        try {
            if (!DIMMDriver.canExist(bus, address))
                throw new DriverException("Device doesn't exist");

            log.debug("Getting SPD Table from " + dimmDevice.getId() + ':');
            spdTableLength = (bus.readByte(address, (byte) 0)) & 0xff;
            log.debug(" length=" + spdTableLength);
View Full Code Here

        try {
            dm = InitialNaming.lookup(DeviceManager.NAME);
            dm.rename(device, getDevicePrefix(), true);
        } catch (DeviceAlreadyRegisteredException ex) {
            log.error("Cannot rename device", ex);
            throw new DriverException("Cannot rename device", ex);
        } catch (NameNotFoundException ex) {
            throw new DriverException("Cannot find DeviceManager", ex);
        }
        claimResources();
        device.registerAPI(USBHostControllerAPI.class, getAPIImplementation());
        // Create & start a monitor
        final USBHubAPI hubApi = getAPIImplementation().getRootHUB();
View Full Code Here

                num_bulk_intr++;
                log.debug("*** Set interrupt endpoint");
            }
        }
        if ((num_bulk_intr != 1) || (num_bulk_out != 1) || (num_bulk_in != 1)) {
            throw new DriverException("Must have one bulk-in (" + num_bulk_in +
                    "), one bulk out (" + num_bulk_out + ") and one interrupt (" + num_bulk_intr +
                    ") endpoints. Driver not bound.");
        }
        UsbBtDevice.setBulkInEndpoint(bulkInEndpoint[0]);
        UsbBtDevice.setBulkOutEndpoint(bulkOutEndpoint[0]);
View Full Code Here

            final ResourceManager rm = InitialNaming.lookup(ResourceManager.NAME);
            port = claimPorts(rm, getDevice(), basePort, 8);
            configure(BAUD9600);
            getDevice().registerAPI(SerialPortAPI.class, this);
        } catch (NameNotFoundException nnfex) {
            throw new DriverException(nnfex);
        } catch (ResourceNotFreeException rnfex) {
            throw new DriverException(rnfex);
        }
    }
View Full Code Here

                    }
                });
        } catch (ResourceNotFreeException ex) {
            throw ex;
        } catch (Exception ex) {
            throw new DriverException("Unknown exception", ex);
        }

    }
View Full Code Here

        try {
            dm = InitialNaming.lookup(DeviceManager.NAME);
            dm.rename(device, getDevicePrefix(), true);
        } catch (DeviceAlreadyRegisteredException ex) {
            log.error("Cannot rename device", ex);
            throw new DriverException("Cannot rename device", ex);
        } catch (NameNotFoundException ex) {
            throw new DriverException("Cannot find DeviceManager", ex);
        }
        int busId = 0; // fix to handle multiple firewire controllers
        bus = new FireWireBus(this, busId);
    }
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.