idedevice.java

来自「纯java操作系统jnode,安装简单和操作简单的个人使用的Java操作系统」· Java 代码 · 共 64 行

JAVA
64
字号
/**
 * $Id: IDEDevice.java,v 1.1 2003/11/25 11:50:42 epr Exp $
 */
package org.jnode.driver.ide;

import org.jnode.driver.Bus;
import org.jnode.driver.Device;

/**
 * An IDE device is some kind of storage device connected to an IDE controller.
 * An IDE device must support the BlockDeviceAPI interface.
 * @author epr
 */
public class IDEDevice extends Device {
	
	/** The decscriptor of this device */
	private final IDEDriveDescriptor descriptor;
	private final int taskfile;
	private final boolean master;
	private final DefaultIDEControllerDriver controller;
	
	/**
	 * Create a new instance
	 * @param name
	 * @param descriptor
	 */
	public IDEDevice(Bus bus, int taskfile, boolean master, String name, IDEDriveDescriptor descriptor, DefaultIDEControllerDriver controller) {
		super(bus, name);
		this.taskfile = taskfile;
		this.master = master;
		this.descriptor = descriptor;
		this.controller = controller;
	}
	
	/**
	 * Gets the descriptor of this device
	 */
	public IDEDriveDescriptor getDescriptor() {
		return descriptor;
	}

	/**
	 * Is this device master on the IDE bus?
	 */
	public boolean isMaster() {
		return master;
	}

	/**
	 * Gets the taskfile of this device
	 */
	public int getTaskfile() {
		return taskfile;
	}
	
	/**
	 * Gets the controller of this device
	 */
	public DefaultIDEControllerDriver getController() {
		return controller;
	}

}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?