Package org.jnode.driver

Examples of org.jnode.driver.Device


     * @param skbuf
     */
    public synchronized void process(SocketBuffer skbuf) {
        try {
            final int protoID = skbuf.getProtocolID();
            final Device dev = skbuf.getDevice();
            if (dev == null) {
                throw new NetworkException("Device not set on SocketBuffer");
            }
            final NetDeviceAPI deviceAPI;
            try {
                deviceAPI = dev.getAPI(NetDeviceAPI.class);
            } catch (ApiNotFoundException ex) {
                throw new NetworkException("Device in SocketBuffer is not a network device");
            }

            // Find all the packettype that want to process the given packet
View Full Code Here


    /**
     * @see java.net.VMNetAPI#getByName(java.lang.String)
     */
    public VMNetDevice getByName(String name) {
        try {
            final Device dev = DeviceUtils.getDevice(name);
            if (isNetDevice(dev)) {
                return new NetDeviceImpl(dev);
            } else {
                return null;
            }
View Full Code Here

            kernel = new RadeonCore(this, architecture, model, (PCIDevice) getDevice());
        } catch (ResourceNotFreeException ex) {
            throw new DriverException(ex);
        }
        super.startDevice();
        final Device dev = getDevice();
        // dev.registerAPI(DisplayDataChannelAPI.class, kernel);
        dev.registerAPI(HardwareCursorAPI.class, kernel.getHardwareCursor());
    }
View Full Code Here

        }
        if (kernel != null) {
            kernel.release();
            kernel = null;
        }
        final Device dev = getDevice();
        // dev.unregisterAPI(DisplayDataChannelAPI.class);
        dev.unregisterAPI(HardwareCursorAPI.class);
        super.stopDevice();
    }
View Full Code Here

    /**
     * Register all PCI devices with the device manager.
     */
    public void startDevice() throws DriverException {
        try {
            final Device pciBusDevice = getDevice();
            final ResourceManager rm = InitialNaming.lookup(ResourceManager.NAME);
            // Claim the resources
            pciConfigIO = claimPorts(rm, pciBusDevice);
            // Register the API's
            pciBusDevice.registerAPI(PCIBusAPI.class, this);
            pciBusDevice.registerAPI(DeviceInfoAPI.class, this);
            // Find the PCI devices
            devices = probeDevices();
            // Start the PCI devices
            WorkUtils.add(new Work("Starting PCI devices") {

View Full Code Here

                throw new DriverException("Driver exception during unregister",
                    ex);
            }
        }
        // Remove the API
        final Device pciBusDevice = getDevice();
        pciBusDevice.unregisterAPI(DeviceInfoAPI.class);
        pciBusDevice.unregisterAPI(PCIBusAPI.class);
        // Release the resources
        pciConfigIO.release();
        pciConfigIO = null;
    }
View Full Code Here

    /**
     * @see org.jnode.driver.DeviceFinder#findDevices(org.jnode.driver.DeviceManager, org.jnode.driver.Bus)
     */
    public void findDevices(DeviceManager devMan, Bus bus) throws DeviceException {
        try {
            final Device pciBusDevice = new Device(bus, "pcibus");
            final PCIDriver pciDriver = new PCIDriver(pciBusDevice);
            pciBusDevice.setDriver(pciDriver);
            devMan.register(pciBusDevice);
        } catch (DriverException ex) {
            throw new DeviceException(ex);
        }
    }
View Full Code Here

TOP

Related Classes of org.jnode.driver.Device

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.