|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dioscuri.module.ata.ATADrive
public class ATADrive
A class representing a ATA drive and parameters.
Field Summary | |
---|---|
protected Atpi |
atpi
|
protected boolean |
containsDisk
|
protected int |
currentCylinder
|
protected int |
currentHead
|
protected int |
currentSector
|
protected int |
deviceNum
|
protected ATADriveType |
driveType
|
protected int |
features
|
protected int |
hdNumber
|
protected int[] |
idDrive
|
protected int |
ioLightCounter
|
protected boolean |
isMaster
|
protected boolean |
isWriteProtected
|
protected char[] |
modelNo
|
protected int |
sectorCount
|
protected int |
statusbarId
|
protected int |
totalNumCylinders
|
protected int |
totalNumHeads
|
protected int |
totalNumSectors
|
protected ATATranslationType |
translationType
|
Constructor Summary | |
---|---|
ATADrive(ATADriveType theDriveType,
ATA parent,
boolean enabled)
Class Constructor with input parameter IDE drive type. |
|
ATADrive(ATADriveType theDriveType,
ATA parent,
boolean enabled,
int cdromCount)
|
Method Summary | |
---|---|
int |
calculateLogicalAddress()
|
boolean |
calculateLogicalAddress(int sector)
|
protected boolean |
containsDisk()
Checks the existence of a disk in drive |
void |
decrementSectorCount()
|
Atpi |
getAtpi()
|
CDROM |
getCdRom()
|
ATADriveController |
getControl()
Get the control. |
int |
getCurrentCylinder()
|
int |
getCurrentHead()
|
int |
getCurrentSector()
|
protected long |
getDiskCapacity()
Get the total capacity of the disk in bytes. |
protected long |
getDiskImageSize()
Get size in bytes of the disk image. |
protected ATADriveType |
getDriveType()
Get type of drive |
int |
getFeatures()
|
int[] |
getIdDrive()
|
int |
getIoLightCounter()
|
char[] |
getModelNo()
|
int |
getSectorCount()
|
SenseInfo |
getSenseInfo()
|
int |
getTotalNumCylinders()
|
int |
getTotalNumHeads()
|
int |
getTotalNumSectors()
|
ATATranslationType |
getTranslationType()
|
void |
incrementAddress()
|
void |
incrementSectorCount()
|
boolean |
isMaster()
|
void |
loadImage(java.io.File imageFile)
Load disk image. |
byte[] |
readData(byte[] diskBuffer,
int offset,
int totalBytes)
Reads Data from disk image. |
protected boolean |
reset()
Reset drive All geometry parameters for sector selection are reset. |
void |
setAtpi(Atpi atpi)
|
void |
setCdRom(CDROM cdRom)
|
void |
setCurrentCylinder(int currentCylinder)
|
void |
setCurrentHead(int currentHead)
|
void |
setCurrentSector(int currentSector)
|
void |
setDiskCapacity(int theTotalNumCylinders,
int theTotalNumHeads,
int theTotalNumSectors,
int theNumSectorsPerBlock)
Set the disk capacity, by input of the number of cylinders, the number of heads, the number of sectors and the number of sectors per block. |
protected void |
setDriveType(ATADriveType type)
Sets type of drive. |
void |
setFeatures(int features)
|
void |
setIdDrive(int index,
int idDrive)
|
void |
setIoLightCounter(int ioLightCounter)
|
void |
setIsMaster(boolean isMaster)
Sets if the disk is a master (true) or a slave (false). |
void |
setMaster(boolean isMaster)
|
void |
setSectorCount(int sectorCount)
|
void |
setTotalNumCylinders(int totalNumCylinders)
|
void |
setTotalNumHeads(int totalNumHeads)
|
void |
setTranslationType(ATATranslationType translationType)
|
void |
setWriteProtected(boolean isProtected)
Set if the disk is write protected. |
java.lang.String |
toString()
Provides the string representation of the class. |
void |
writeData(byte[] diskBuffer,
int offset,
int totalBytes)
Writes data to the disk image. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected ATADriveType driveType
protected int hdNumber
protected int[] idDrive
protected char[] modelNo
protected int currentHead
protected int currentCylinder
protected int currentSector
protected int totalNumHeads
protected int totalNumCylinders
protected int totalNumSectors
protected int sectorCount
protected boolean isMaster
protected boolean containsDisk
protected boolean isWriteProtected
protected int ioLightCounter
protected int statusbarId
protected int features
protected Atpi atpi
protected ATATranslationType translationType
protected int deviceNum
Constructor Detail |
---|
public ATADrive(ATADriveType theDriveType, ATA parent, boolean enabled)
theDriveType
- parent
- enabled
- public ATADrive(ATADriveType theDriveType, ATA parent, boolean enabled, int cdromCount)
theDriveType
- parent
- enabled
- cdromCount
- Method Detail |
---|
public boolean calculateLogicalAddress(int sector)
sector
-
public int calculateLogicalAddress()
public void incrementAddress()
protected boolean reset()
public ATADriveController getControl()
public SenseInfo getSenseInfo()
protected boolean containsDisk()
protected ATADriveType getDriveType()
protected void setDriveType(ATADriveType type)
type
- protected long getDiskCapacity()
public void setDiskCapacity(int theTotalNumCylinders, int theTotalNumHeads, int theTotalNumSectors, int theNumSectorsPerBlock)
theTotalNumCylinders
- the total number of cylinderstheTotalNumHeads
- the total number of headstheTotalNumSectors
- the total number of sectorstheNumSectorsPerBlock
- the number of sectors per blockprotected long getDiskImageSize()
public void setIsMaster(boolean isMaster)
isMaster
- true for master, false for slavepublic void setWriteProtected(boolean isProtected)
isProtected
- true for write protected, false for not writed protectedpublic byte[] readData(byte[] diskBuffer, int offset, int totalBytes) throws java.io.IOException
offset
- the offsettotalBytes
- the total number of bytesdiskBuffer
- the disk buffer
java.io.IOException
public void writeData(byte[] diskBuffer, int offset, int totalBytes) throws java.io.IOException
offset
- the offsettotalBytes
- the total number of bytesdiskBuffer
- the disk buffer
java.io.IOException
public void loadImage(java.io.File imageFile) throws StorageDeviceException
imageFile
- The disk image file
StorageDeviceException
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isMaster()
public void setMaster(boolean isMaster)
isMaster
- public int getCurrentHead()
public void setCurrentHead(int currentHead)
currentHead
- public int getCurrentCylinder()
public void setCurrentCylinder(int currentCylinder)
currentCylinder
- public int getCurrentSector()
public void setCurrentSector(int currentSector)
currentSector
- public int getTotalNumSectors()
public Atpi getAtpi()
public void setAtpi(Atpi atpi)
atpi
- public int getIoLightCounter()
public void setIoLightCounter(int ioLightCounter)
ioLightCounter
- public int getTotalNumHeads()
public void setTotalNumHeads(int totalNumHeads)
totalNumHeads
- public int getTotalNumCylinders()
public void setTotalNumCylinders(int totalNumCylinders)
totalNumCylinders
- public void incrementSectorCount()
public void decrementSectorCount()
public int getSectorCount()
public void setSectorCount(int sectorCount)
sectorCount
- public int getFeatures()
public void setFeatures(int features)
features
- public int[] getIdDrive()
public void setIdDrive(int index, int idDrive)
index
- idDrive
- public char[] getModelNo()
public CDROM getCdRom()
public void setCdRom(CDROM cdRom)
cdRom
- public ATATranslationType getTranslationType()
public void setTranslationType(ATATranslationType translationType)
translationType
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |