class SimpleReadWriteMemory extends ReadWriteMemory
A read-write memory (aka RAM) with the given size
. The maximum size is 230 Bytes (1 GiB). The memory is backed
by an array.
- Alphabetic
- By Inheritance
- SimpleReadWriteMemory
- ReadWriteMemory
- Memory
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
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()
- def doRead(address: Long): Try[Byte]
The read method to read the value from the array.
The read method to read the value from the array.
- address
the address to read
- returns
a
Success
with the byte read at the given address
- Attributes
- protected
- Definition Classes
- SimpleReadWriteMemory → ReadWriteMemory
- def doWrite(address: Long, value: Byte): Try[Unit]
The write method to write the value to the array.
The write method to write the value to the array.
- address
the address to write
- value
the
value
to write- returns
a
Success
when the byte is written successfully,Failure
otherwise
- Attributes
- protected
- Definition Classes
- SimpleReadWriteMemory → ReadWriteMemory
- 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
- val memory: Array[Byte]
The array to hold the memory data.
- 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 or aFailure
- Definition Classes
- ReadWriteMemory → 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
- val size: Long
Returns the size of the memory.
Returns the size of the memory.
- returns
the size of the memory
- Definition Classes
- SimpleReadWriteMemory → 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 to- value
the
value
to write- returns
a
Success
when the byte is written or aFailure
- Definition Classes
- ReadWriteMemory → 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