|
Simple Machine | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Observable
Util.AbstractDataModel
Machine.AbstractMainMemory
public abstract class AbstractMainMemory
Nested Class Summary | |
---|---|
static class |
AbstractMainMemory.InvalidAddressException
|
Constructor Summary | |
---|---|
AbstractMainMemory()
|
Method Summary | |
---|---|
abstract int |
bytesToInteger(UnsignedByte byteAtAddrPlus0,
UnsignedByte byteAtAddrPlus1,
UnsignedByte byteAtAddrPlus2,
UnsignedByte byteAtAddrPlus3)
Convert a byte array to an integer. |
protected abstract UnsignedByte[] |
get(int address,
int length)
Read a sequence of bytes from memory. |
java.lang.Class |
getColumnClass(int columnIndex)
|
int |
getColumnCount()
|
java.lang.String |
getColumnName(int columnIndex)
|
int |
getRowCount()
|
java.lang.Object |
getValueAt(int rowIndex,
int columnIndex)
|
abstract UnsignedByte[] |
integerToBytes(int i)
Convert an integer to a byte array. |
protected abstract boolean |
isAccessAligned(int address,
int length)
Determine whether specified address and length represent an ALIGNED access. |
boolean |
isCellEditable(int rowIndex,
int columnIndex)
|
abstract int |
length()
|
UnsignedByte[] |
read(int address,
int length)
READ a sequence of bytes from memory starting at specified ALIGNED. |
int |
readInteger(int address)
Read a four-byte integer from memory at ALIGNED address. |
int |
readIntegerUnaligned(int address)
Read a four-byte Big-Endian integer from memory at possibly UNALIGNED address. |
UnsignedByte[] |
readUnaligned(int address,
int length)
READ a sequence of bytes from memory starting at specified possibly-UNALIGNED address. |
protected abstract void |
set(int address,
UnsignedByte[] value)
Write a sequence of bytes to memory. |
void |
setValueAt(java.lang.Object[] aValue,
int rowIndex,
int columnIndex)
|
void |
setValueAt(java.lang.Object aValue,
int rowIndex,
int columnIndex)
|
void |
setValueAtByUser(java.lang.Object[] aValue,
int rowIndex,
int columnIndex)
|
void |
setValueAtByUser(java.lang.Object aValue,
int rowIndex,
int columnIndex)
|
void |
write(int address,
UnsignedByte[] value)
WRITE a sequence of bytes to memory starting at specified ALIGNED. |
void |
writeInteger(int address,
int value)
|
void |
writeIntegerUnaligned(int address,
int value)
|
void |
writeUnaligned(int address,
UnsignedByte[] value)
WRITE a sequence of bytes to memory starting at specified possibly-UNALIGNED address. |
Methods inherited from class Util.AbstractDataModel |
---|
addUndoableEditListener, canDeleteRow, canInsertRow, deleteRow, insertRow, tellObservers, tellObservers |
Methods inherited from class java.util.Observable |
---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface Util.DataModel |
---|
addObserver |
Constructor Detail |
---|
public AbstractMainMemory()
Method Detail |
---|
protected abstract UnsignedByte[] get(int address, int length) throws AbstractMainMemory.InvalidAddressException
address
- byte address of first byte to read.length
- number of bytes to read.
AbstractMainMemory.InvalidAddressException
- if address is out of range.protected abstract void set(int address, UnsignedByte[] value) throws AbstractMainMemory.InvalidAddressException
address
- byte address of first byte to write.value
- array of unsigned bytes to write to memory at this address.
AbstractMainMemory.InvalidAddressException
- if address is out of range.protected abstract boolean isAccessAligned(int address, int length)
public abstract int bytesToInteger(UnsignedByte byteAtAddrPlus0, UnsignedByte byteAtAddrPlus1, UnsignedByte byteAtAddrPlus2, UnsignedByte byteAtAddrPlus3)
byteAtAddrPlus0
- value of byte at some memory address addrbyteAtAddrPlus1
- value of byte at some memory address addr + 1byteAtAddrPlus2
- value of byte at some memory address addr + 2byteAtAddrPlus3
- value of byte at some memory address addr + 3
public abstract UnsignedByte[] integerToBytes(int i)
i
- an 32-bit integer value
public abstract int length()
public final UnsignedByte[] read(int address, int length) throws AbstractMainMemory.InvalidAddressException
AbstractMainMemory.InvalidAddressException
- if address is out of range or is not aligned.public final void write(int address, UnsignedByte[] value) throws AbstractMainMemory.InvalidAddressException
AbstractMainMemory.InvalidAddressException
- if address is out of range or is not aligned.public final UnsignedByte[] readUnaligned(int address, int length) throws AbstractMainMemory.InvalidAddressException
AbstractMainMemory.InvalidAddressException
- if address is out of range.public final void writeUnaligned(int address, UnsignedByte[] value) throws AbstractMainMemory.InvalidAddressException
AbstractMainMemory.InvalidAddressException
- if address is out of range.public int readInteger(int address) throws AbstractMainMemory.InvalidAddressException
AbstractMainMemory.InvalidAddressException
public void writeInteger(int address, int value) throws AbstractMainMemory.InvalidAddressException
AbstractMainMemory.InvalidAddressException
public int readIntegerUnaligned(int address) throws AbstractMainMemory.InvalidAddressException
AbstractMainMemory.InvalidAddressException
public void writeIntegerUnaligned(int address, int value) throws AbstractMainMemory.InvalidAddressException
AbstractMainMemory.InvalidAddressException
public java.lang.Class getColumnClass(int columnIndex)
getColumnClass
in interface DataModel
getColumnClass
in class AbstractDataModel
public int getColumnCount()
getColumnCount
in interface DataModel
getColumnCount
in class AbstractDataModel
public java.lang.String getColumnName(int columnIndex)
getColumnName
in interface DataModel
getColumnName
in class AbstractDataModel
public int getRowCount()
getRowCount
in interface DataModel
getRowCount
in class AbstractDataModel
public java.lang.Object getValueAt(int rowIndex, int columnIndex)
getValueAt
in interface DataModel
getValueAt
in class AbstractDataModel
public boolean isCellEditable(int rowIndex, int columnIndex)
isCellEditable
in interface DataModel
isCellEditable
in class AbstractDataModel
public void setValueAt(java.lang.Object[] aValue, int rowIndex, int columnIndex)
setValueAt
in interface DataModel
setValueAt
in class AbstractDataModel
public void setValueAtByUser(java.lang.Object[] aValue, int rowIndex, int columnIndex)
setValueAtByUser
in interface DataModel
setValueAtByUser
in class AbstractDataModel
public void setValueAt(java.lang.Object aValue, int rowIndex, int columnIndex)
setValueAt
in interface DataModel
setValueAt
in class AbstractDataModel
public void setValueAtByUser(java.lang.Object aValue, int rowIndex, int columnIndex)
setValueAtByUser
in interface DataModel
setValueAtByUser
in class AbstractDataModel
|
Simple Machine | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |