Examples of FloppyDeviceFactory


Examples of org.jnode.driver.block.floppy.support.FloppyDeviceFactory

            testDiskChange();
            BlockDeviceAPIHelper.checkBounds(this, devOffset, length);
            final int sectorLength = SECTOR_LENGTH[currentSectorSize];
            testAlignment(sectorLength, devOffset, length);
            CHS chs = fp.getGeometry().getCHS(devOffset / sectorLength);
            FloppyDeviceFactory factory;
            try {
                factory = FloppyDriverUtils.getFloppyDeviceFactory();
            } catch (NamingException ex) {
                throw (IOException) new IOException().initCause(ex);
            }

            try {
                while (length > 0) {
                    final FloppyReadSectorCommand cmd;
                    cmd =
                        factory.createFloppyReadSectorCommand(
                            drive,
                            fp.getGeometry(),
                            chs,
                            currentSectorSize,
                            false,
View Full Code Here

Examples of org.jnode.driver.block.floppy.support.FloppyDeviceFactory

            testDiskChange();
            BlockDeviceAPIHelper.checkBounds(this, devOffset, length);
            final int sectorLength = SECTOR_LENGTH[currentSectorSize];
            testAlignment(sectorLength, devOffset, length);
            CHS chs = fp.getGeometry().getCHS(devOffset / sectorLength);
            FloppyDeviceFactory factory;
            try {
                factory = FloppyDriverUtils.getFloppyDeviceFactory();
            } catch (NamingException ex) {
                throw (IOException) new IOException().initCause(ex);
            }

            try {
                while (length > 0) {
                    final FloppyWriteSectorCommand cmd;
                    cmd =
                        factory.createFloppyWriteSectorCommand(
                            drive,
                            fp.getGeometry(),
                            chs,
                            currentSectorSize,
                            false,
View Full Code Here

Examples of org.jnode.driver.block.floppy.support.FloppyDeviceFactory

     *
     * @param cylinder
     * @throws IOException
     */
    private final void seek(int cylinder) throws IOException {
        FloppyDeviceFactory factory;
        try {
            factory = FloppyDriverUtils.getFloppyDeviceFactory();
        } catch (NamingException ex) {
            throw (IOException) new IOException().initCause(ex);
        }
        final FloppySeekCommand cmd = factory.createFloppySeekCommand(drive, cylinder);
        try {
            controller.executeAndWait(cmd, SEEK_TIMEOUT);
            if (controller.diskChanged(drive, false)) {
                throw new IOException("Floppy not present");
            }
View Full Code Here

Examples of org.jnode.driver.block.floppy.support.FloppyDeviceFactory

     * Read the ID of the disk
     *
     * @throws IOException
     */
    private final void readID() throws IOException {
        FloppyDeviceFactory factory;
        try {
            factory = FloppyDriverUtils.getFloppyDeviceFactory();
        } catch (NamingException ex) {
            throw (IOException) new IOException().initCause(ex);
        }
        final FloppyIdCommand cmd = factory.createFloppyIdCommand(drive);
        try {
            controller.executeAndWait(cmd, RW_TIMEOUT);
            if (cmd.hasError()) {
                final IOException ioe = new IOException("Error in Read ID");
                ioe.initCause(cmd.getError());
View Full Code Here

Examples of org.jnode.driver.block.floppy.support.FloppyDeviceFactory

     *
     * @param fp
     * @throws IOException
     */
    private final void specify(FloppyParameters fp) throws IOException {
        FloppyDeviceFactory factory;
        try {
            factory = FloppyDriverUtils.getFloppyDeviceFactory();
        } catch (NamingException ex) {
            throw (IOException) new IOException().initCause(ex);
        }
        final FloppyDriveParametersCommand cmd = factory.createFloppyDriveParametersCommand(drive, dp, fp);

        try {
            controller.executeAndWait(cmd, RW_TIMEOUT);
            if (cmd.hasError()) {
                final IOException ioe = new IOException("Error in specify");
View Full Code Here

Examples of org.jnode.driver.block.floppy.support.FloppyDeviceFactory

     */
    protected void registerDevices()
        throws FloppyException, DriverException, NamingException {
        devMan = InitialNaming.lookup(DeviceManager.NAME);
        final int max = fdc.getDriveCount();
        final FloppyDeviceFactory factory = FloppyDriverUtils.getFloppyDeviceFactory();
        for (int i = 0; i < max; i++) {
            final FloppyDriveParameters dp = fdc.getDriveParams(i);
            log.debug("For fd" + i + ", found CMOS type " + dp.getCmosType());

            if (dp.isPresent()) {
                try {
                    final FloppyDevice fd = factory.createDevice(bus, i, dp);
                    fd.setDriver(new FloppyDriver());
                    devMan.register(fd);
                    devices.add(fd);
                    log.debug("Registered fd" + i);
                } catch (DeviceAlreadyRegisteredException ex) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.