org.fosstrak.hal
Class MemoryBankDescriptor

java.lang.Object
  extended by org.fosstrak.hal.MemoryBankDescriptor

public class MemoryBankDescriptor
extends java.lang.Object

The class is a data structure to store information that describes a memory bank such as size and read/write access.

Author:
Matthias Lampe, lampe@acm.org

Field Summary
protected  boolean readAccess
          Flag that indicates if read access is allowed
protected  int size
          Size of the memory bank in number of bytes
protected  boolean writeAccess
          Flag that indicates if write access is allowed
 
Constructor Summary
MemoryBankDescriptor(int size, boolean readAccess, boolean writeAccess)
          creates a memory bank descriptor with the given paramters.
 
Method Summary
 int getSize()
          gets the size of the memory bank in number of bytes.
 boolean isReadAccess()
          gets the flag that indicates if read access is allowed.
 boolean isWriteAccess()
          gets the flag that indicates if write access is allowed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

size

protected int size
Size of the memory bank in number of bytes


readAccess

protected boolean readAccess
Flag that indicates if read access is allowed


writeAccess

protected boolean writeAccess
Flag that indicates if write access is allowed

Constructor Detail

MemoryBankDescriptor

public MemoryBankDescriptor(int size,
                            boolean readAccess,
                            boolean writeAccess)
creates a memory bank descriptor with the given paramters.

Parameters:
size - the size of the memory bank in number of bytes
readAccess - flag that indicates if read access is allowed
writeAccess - flag that indicates if write access is allowed
Method Detail

getSize

public int getSize()
gets the size of the memory bank in number of bytes.

Returns:
the size of the memory bank in number of bytes

isReadAccess

public boolean isReadAccess()
gets the flag that indicates if read access is allowed.

Returns:
the flag that indicates if read access is allowed

isWriteAccess

public boolean isWriteAccess()
gets the flag that indicates if write access is allowed.

Returns:
the flag that indicates if write access is allowed


Copyright © 2008. All Rights Reserved.