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
Successwith 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
valueto write- returns
a
Successwhen the byte is written successfully,Failureotherwise
- 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
Bytefrom the memory at the given address.Read a single
Bytefrom the memory at the given address.- address
the
addressto read from- returns
a
Successwith the byte read or aFailure
- Definition Classes
- ReadWriteMemory → Memory
- final def readInt(address: Long): Try[Int]
Read an
Intfrom the memory ataddress ... address + 3.Read an
Intfrom the memory ataddress ... address + 3. The value ofaddresswill be the least significantByte.- address
the
addressto read from- returns
a
Successwith theIntread or aFailure
- Definition Classes
- Memory
- final def readLong(address: Long): Try[Long]
Read a
Longfrom the memory ataddress ... address + 7.Read a
Longfrom the memory ataddress ... address + 7. The value ofaddresswill be the least significantByte.- address
the
addressto read from- returns
a
Successwith theLongread or aFailure
- Definition Classes
- Memory
- final def readShort(address: Long): Try[Short]
Read a
Shortfrom the memory ataddress ... address + 1.Read a
Shortfrom the memory ataddress ... address + 1. The value ofaddresswill be the least significantByte.- address
the
addressto read from- returns
a
Successwith theShortread 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
Byteto the memory at the given address.Write a single
Byteto the memory at the given address.- address
the
addressto write to- value
the
valueto write- returns
a
Successwhen the byte is written or aFailure
- Definition Classes
- ReadWriteMemory → Memory
- final def writeInt(address: Long, value: Int): Try[Unit]
Write an
Intataddress ... address + 3.Write an
Intataddress ... address + 3. The least significantBytewill be written toaddress.- address
the
addressto write to- value
the
valueto write- returns
a
Successwhen the int was written successfully or aFailureotherwise
- Definition Classes
- Memory
- final def writeLong(address: Long, value: Long): Try[Unit]
Write a
Longataddress ... address + 7.Write a
Longataddress ... address + 7. The least significantBytewill be written toaddress.- address
the
addressto write to- value
the
valueto write- returns
a
Successwhen the long was written successfully or aFailureotherwise
- Definition Classes
- Memory
- final def writeShort(address: Long, value: Short): Try[Unit]
Write a
Shorttoaddress ... address + 1.Write a
Shorttoaddress ... address + 1. The least significantBytewill be written toaddress.- address
the
addressto write to- value
the
valueto write- returns
a
Successwhen the short was written successfully or aFailureotherwise
- Definition Classes
- Memory