hicosim.components.backend.io
Class CommandProcessor

java.lang.Object
  extended by hicosim.components.backend.io.CommandProcessor

public class CommandProcessor
extends java.lang.Object

CommandProcessor - interpreting commands from the command line.

Author:
Michael Wager,Calchera, Weber 16th May 2009

Constructor Summary
CommandProcessor(Engine engine, java.lang.String[] args)
           
 
Method Summary
 java.lang.String getMemory(java.lang.Object[] paramsGet)
          This method returns the memorycontent as Stringrepresentation depending on the given parameter.
 void processConsoleInput()
          Mainloop of Console based Application.
 java.lang.String processGUI_Input(java.lang.String cmd)
          This method is used by the gui to interpret gui-commandline commands.
 java.lang.String setMemory(java.lang.Object[] paramsSet)
          This method writes to memory depending on the given parameter.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommandProcessor

public CommandProcessor(Engine engine,
                        java.lang.String[] args)
Method Detail

processConsoleInput

public void processConsoleInput()
                         throws java.lang.Exception
Mainloop of Console based Application.

Throws:
java.lang.Exception

processGUI_Input

public java.lang.String processGUI_Input(java.lang.String cmd)
                                  throws java.lang.Exception
This method is used by the gui to interpret gui-commandline commands.

Parameters:
cmd - - comming from gui, interpret and execute this command.
Throws:
java.lang.Exception

getMemory

public java.lang.String getMemory(java.lang.Object[] paramsGet)
                           throws java.lang.Exception
This method returns the memorycontent as Stringrepresentation depending on the given parameter.

Parameters:
paramsGet - - parameter to the "GET" command e.g. new Object[] {0x0, 0xf} //startAddress, endAddress or: new Object[] {0x0} //get value on that address
Returns:
- String memory repr.
Throws:
java.lang.Exception

setMemory

public java.lang.String setMemory(java.lang.Object[] paramsSet)
                           throws java.lang.Exception
This method writes to memory depending on the given parameter.

Parameters:
paramsSet - - parameter to the "SET" command e.g. new Object[] {0x10, 223} //address, value
Returns:
- String info
Throws:
java.lang.Exception