|
jmce - 1_02 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Disk
Interface to descibe a phisical disk. This interface define a phisical disk unit and permit all the basic operation like read,write,etc. to the phisical disk.
For historical reason the first track and head number is 0 and the first sector number is 1.
Data are moved to and from one buffer allocated from the disk and the function for read and write only specify the sector number.
Field Summary | |
---|---|
static int |
ERROR
Deprecated. |
static int |
ERROR_SEEK
Seek error. |
static int |
ERROR_WRITE_PROTECT
Error for disk write protect |
Method Summary | |
---|---|
void |
dismount()
Dismount the disk |
void |
format()
Format a track |
byte[] |
getBuffer()
Return one array used for data transfer. |
int |
getHead()
Get the current head |
int |
getNumHead()
Return the number of head |
int |
getNumSector()
Return the number of sector |
int |
getNumTrack()
Return the numebr of track |
boolean |
getReadOnly()
Return true if the disk is r/o |
int |
getSector()
Get the current sector |
int |
getSectorSize()
Return the sector size in bytes |
int |
getTrack()
Get the current track |
boolean |
isMounted()
Retrun true if the disk is mounted. |
boolean |
mount()
Mount the disk. |
int |
read()
Read one sector. |
void |
setHead(int head)
Set the head number |
void |
setNumHead(int head)
Set the number of head. |
void |
setNumSector(int sector)
Set the number of sector. |
void |
setNumTrack(int track)
Set the number of track. |
void |
setReadOnly(boolean mode)
Set the disk r/o |
void |
setSector(int sector)
Set the sector number |
void |
setSectorSize(int v)
Set the sector size in byte. |
void |
setTrack(int track)
Set the track number |
int |
write()
Write one sector. |
Methods inherited from interface jmce.sim.Peripheral |
---|
idle, registerCPU |
Methods inherited from interface jmce.sim.Hardware |
---|
addHardware, destroy, getHardware, getHardware, getHardware, getHardware, getHardwareCount, getHardwareInstances, getHardwareTree, getName, getParent, init, initSwing, removeHardware, removeHardware, reset, setHardware, setHardware, setName |
Field Detail |
---|
@Deprecated static final int ERROR
static final int ERROR_WRITE_PROTECT
static final int ERROR_SEEK
Method Detail |
---|
int getSectorSize()
int getNumTrack()
int getNumSector()
int getNumHead()
void setSectorSize(int v)
void setNumTrack(int track)
track
- - Number of track.void setNumSector(int sector)
sector
- - Total number of sector.void setNumHead(int head)
head
- - Number of head.void dismount() throws SIMException
SIMException
boolean mount() throws SIMException
SIMException
boolean isMounted()
byte[] getBuffer()
int read() throws SIMException
SIMException
getBuffer()
int write() throws SIMException
SIMException
void format() throws SIMException
SIMException
int getSector()
int getHead()
int getTrack()
void setTrack(int track) throws SIMException
SIMException
void setSector(int sector) throws SIMException
SIMException
void setHead(int head) throws SIMException
SIMException
void setReadOnly(boolean mode)
boolean getReadOnly()
|
jmce - 1_02 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |