Class AddByteMappedMemoryBlockCmd

  • All Implemented Interfaces:
    Command

    public class AddByteMappedMemoryBlockCmd
    extends java.lang.Object
    Command for adding byte-mapped memory blocks
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String comment  
      protected boolean execute  
      protected boolean isOverlay  
      protected boolean isVolatile  
      protected long length  
      protected java.lang.String message  
      protected java.lang.String name  
      protected boolean read  
      protected java.lang.String source  
      protected Address start  
      protected boolean write  
    • Constructor Summary

      Constructors 
      Constructor Description
      AddByteMappedMemoryBlockCmd​(java.lang.String name, java.lang.String comment, java.lang.String source, Address start, long length, boolean read, boolean write, boolean execute, boolean isVolatile, Address mappedAddress, boolean isOverlay)
      Create a new AddByteMappedMemoryBlockCmd with 1:1 byte mapping scheme
      AddByteMappedMemoryBlockCmd​(java.lang.String name, java.lang.String comment, java.lang.String source, Address start, long length, boolean read, boolean write, boolean execute, boolean isVolatile, Address mappedAddress, ByteMappingScheme byteMappingScheme, boolean isOverlay)
      Create a new AddByteMappedMemoryBlockCmd with a specified byte mapping scheme.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean applyTo​(DomainObject obj)
      Applies the command to the given domain object.
      protected MemoryBlock createMemoryBlock​(Memory memory)  
      java.lang.String getName()
      Returns the name of this command.
      java.lang.String getStatusMsg()
      Returns the status message indicating the status of the command.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • message

        protected java.lang.String message
      • name

        protected final java.lang.String name
      • comment

        protected final java.lang.String comment
      • source

        protected final java.lang.String source
      • start

        protected final Address start
      • length

        protected final long length
      • read

        protected final boolean read
      • write

        protected final boolean write
      • execute

        protected final boolean execute
      • isVolatile

        protected final boolean isVolatile
      • isOverlay

        protected final boolean isOverlay
    • Constructor Detail

      • AddByteMappedMemoryBlockCmd

        public AddByteMappedMemoryBlockCmd​(java.lang.String name,
                                           java.lang.String comment,
                                           java.lang.String source,
                                           Address start,
                                           long length,
                                           boolean read,
                                           boolean write,
                                           boolean execute,
                                           boolean isVolatile,
                                           Address mappedAddress,
                                           ByteMappingScheme byteMappingScheme,
                                           boolean isOverlay)
        Create a new AddByteMappedMemoryBlockCmd with a specified byte mapping scheme. Byte mapping scheme is specified by two values schemeDestByteCount and schemeSrcByteCount which may be viewed as a ratio of number of destination bytes to number of mapped source bytes. When the destination consumes bytes from the mapped source it consume schemeDestByteCount bytes then skips (schemeSrcByteCount - schemeDestByteCount) bytes before repeating the mapping sequence over the extent of the destination block. The block start address and source mappedAddress must be chosen carefully as they relate to the mapping scheme when it is anything other than 1:1.
        Parameters:
        name - the name for the new memory block.
        comment - the comment for the block
        source - indicates what is creating the block
        start - the start address for the the block
        length - the length of the new block
        read - sets the block's read permission flag
        write - sets the block's write permission flag
        execute - sets the block's execute permission flag
        isVolatile - sets the block's volatile flag
        mappedAddress - the address in memory that will serve as the bytes source for the block
        byteMappingScheme - byte mapping scheme (may be null for 1:1 mapping)
        isOverlay - if true, the block will be created in a new overlay address space.
      • AddByteMappedMemoryBlockCmd

        public AddByteMappedMemoryBlockCmd​(java.lang.String name,
                                           java.lang.String comment,
                                           java.lang.String source,
                                           Address start,
                                           long length,
                                           boolean read,
                                           boolean write,
                                           boolean execute,
                                           boolean isVolatile,
                                           Address mappedAddress,
                                           boolean isOverlay)
        Create a new AddByteMappedMemoryBlockCmd with 1:1 byte mapping scheme
        Parameters:
        name - the name for the new memory block.
        comment - the comment for the block
        source - indicates what is creating the block
        start - the start address for the the block
        length - the length of the new block
        read - sets the block's read permission flag
        write - sets the block's write permission flag
        execute - sets the block's execute permission flag
        isVolatile - sets the block's volatile flag
        mappedAddress - the address in memory that will serve as the bytes source for the block
        isOverlay - if true, the block will be created in a new overlay address space.
    • Method Detail

      • getStatusMsg

        public java.lang.String getStatusMsg()
        Description copied from interface: Command
        Returns the status message indicating the status of the command.
        Specified by:
        getStatusMsg in interface Command
        Returns:
        reason for failure, or null if the status of the command was successful
      • getName

        public java.lang.String getName()
        Description copied from interface: Command
        Returns the name of this command.
        Specified by:
        getName in interface Command
        Returns:
        the name of this command
      • applyTo

        public boolean applyTo​(DomainObject obj)
        Description copied from interface: Command
        Applies the command to the given domain object.
        Specified by:
        applyTo in interface Command
        Parameters:
        obj - domain object that this command is to be applied.
        Returns:
        true if the command applied successfully