abstract class ReadOnlyMemory extends Memory
An abstract class to emulate a read-only memory. Subclasses can implement different possibilities to read the content.
- Alphabetic
- By Inheritance
- ReadOnlyMemory
- Memory
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new ReadOnlyMemory()
- Attributes
- protected
Abstract Value Members
- abstract def doRead(address: Long): Try[Byte]
The read method to be implemented by a subclass.
The read method to be implemented by a subclass.
- address
the address to read
- returns
a
Success
with the byte read at the given address,Failure
otherwise
- Attributes
- protected
- abstract def size: Long
Returns the size of the memory.
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def readByte(address: Long): Try[Byte]
Read a single byte from the memory at the given address.
Read a single byte from the memory at the given address.
- address
the
address
to read from- returns
a
Success
with the byte read,Failure
otherwise
- Definition Classes
- ReadOnlyMemory → Memory
- final def readInt(address: Long): Try[Int]
Read an
Int
from the memory ataddress ... address + 3
.Read an
Int
from the memory ataddress ... address + 3
. The value ofaddress
will be the least significantByte
.- address
the
address
to read from- returns
a
Success
with theInt
read or aFailure
- Definition Classes
- Memory
- final def readLong(address: Long): Try[Long]
Read a
Long
from the memory ataddress ... address + 7
.Read a
Long
from the memory ataddress ... address + 7
. The value ofaddress
will be the least significantByte
.- address
the
address
to read from- returns
a
Success
with theLong
read or aFailure
- Definition Classes
- Memory
- final def readShort(address: Long): Try[Short]
Read a
Short
from the memory ataddress ... address + 1
.Read a
Short
from the memory ataddress ... address + 1
. The value ofaddress
will be the least significantByte
.- address
the
address
to read from- returns
a
Success
with theShort
read or aFailure
- Definition Classes
- Memory
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def writeByte(address: Long, value: Byte): Try[Unit]
Write a single byte to the memory at the given address.
Write a single byte to the memory at the given address.
- address
the address to write
- value
the value to write
- returns
a
Failure
when the address is outside the area of the memory
- Definition Classes
- ReadOnlyMemory → Memory
- final def writeInt(address: Long, value: Int): Try[Unit]
Write an
Int
ataddress ... address + 3
.Write an
Int
ataddress ... address + 3
. The least significantByte
will be written toaddress
.- address
the
address
to write to- value
the
value
to write- returns
a
Success
when the int was written successfully or aFailure
otherwise
- Definition Classes
- Memory
- final def writeLong(address: Long, value: Long): Try[Unit]
Write a
Long
ataddress ... address + 7
.Write a
Long
ataddress ... address + 7
. The least significantByte
will be written toaddress
.- address
the
address
to write to- value
the
value
to write- returns
a
Success
when the long was written successfully or aFailure
otherwise
- Definition Classes
- Memory
- final def writeShort(address: Long, value: Short): Try[Unit]
Write a
Short
toaddress ... address + 1
.Write a
Short
toaddress ... address + 1
. The least significantByte
will be written toaddress
.- address
the
address
to write to- value
the
value
to write- returns
a
Success
when the short was written successfully or aFailure
otherwise
- Definition Classes
- Memory