byucc.jhdl.apps.dtb.cli
Class CLIParamSetter

java.lang.Object
  extended bybyucc.jhdl.apps.dtb.cli.CLIParamSetter
All Implemented Interfaces:
CLICommand
Direct Known Subclasses:
Autobuild, Constructor, Netlist, Param, ParamGUI, PortParam, SimulatorContents, Target

public abstract class CLIParamSetter
extends java.lang.Object
implements CLICommand

The CLIParamSetter creates an interface between the JHDL CLI (command line interface) and the DynamicTestBench for the purpose of setting the port parameters of the cell_interface and the other arguments to the constructor. This class is actually the super class of all of the separate CLICommands. It offers a way of automatically creating and registering the commands.

Author:
Anthony L. Slade

Field Summary
protected  DynamicTestBench _dtb
          The DynamicTestBench for this CLIParamSetter
protected  java.lang.Throwable _lastException
          The last exception caught when executing the command
static java.lang.String CLITYPE
          The CLI type classification for the commands associated with this class
static java.lang.String COMMAND_AUTOBUILD
          Name of the command that will tell the DynamicTestBench to build, even if not all parameters are set.
static java.lang.String COMMAND_BUILD
          Name of the command that will tell the DynamicTestBench to build, even if not all parameters are set.
static java.lang.String COMMAND_CLOCKSCHEDULE
          Name of the command that sets the default clock schedule
static java.lang.String COMMAND_CONSTRUCTOR
          Name of the command that retargets a specified constructor rather than the default zeroth constructor
static java.lang.String COMMAND_NETLIST
          Name of the command that creates a netlist of the design based on the default netlisting capabilities of the current TechMapper
static java.lang.String COMMAND_PARAM
          Name of the command that sets a given parameter
static java.lang.String COMMAND_PARAMGUI
          Name of the command that brings up a GUI to help the user view and set parameters of the constructor to use to build the design
static java.lang.String COMMAND_PORTPARAM
          Name of the command that sets the parameter for a port or ports
static java.lang.String COMMAND_SIMULATOR_CONTENTS
          Name of the command that asks the simulator to dump its structures
static java.lang.String COMMAND_TARGET
          Name of the command that sets the TechMapper for the desin
 
Fields inherited from interface byucc.jhdl.util.cli.CLICommand
OVERLOAD
 
Constructor Summary
protected CLIParamSetter(DynamicTestBench dtb)
           
 
Method Summary
static void createCLICommands(CLInterpreter interp, DynamicTestBench dtb)
          Used to automagically create all of the related DynamicTestBench CLI commands
abstract  java.lang.Object execute(CLInterpreter parent, java.lang.String[] args)
          This method is invoked by CLInterpreter when a command registered to this class is called.
abstract  java.lang.String getHelpText(java.lang.String cmdName)
           
 java.lang.String getHelpType(java.lang.String cmdName)
          Returns CLIParamSetter.CLITYPE
static java.lang.Throwable getLastException(java.lang.String command)
           
abstract  java.lang.String getUsageText(java.lang.String cmdName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLITYPE

public static final java.lang.String CLITYPE
The CLI type classification for the commands associated with this class

See Also:
Constant Field Values

COMMAND_AUTOBUILD

public static final java.lang.String COMMAND_AUTOBUILD
Name of the command that will tell the DynamicTestBench to build, even if not all parameters are set.

See Also:
Constant Field Values

COMMAND_BUILD

public static final java.lang.String COMMAND_BUILD
Name of the command that will tell the DynamicTestBench to build, even if not all parameters are set.

See Also:
Constant Field Values

COMMAND_CLOCKSCHEDULE

public static final java.lang.String COMMAND_CLOCKSCHEDULE
Name of the command that sets the default clock schedule

See Also:
Constant Field Values

COMMAND_CONSTRUCTOR

public static final java.lang.String COMMAND_CONSTRUCTOR
Name of the command that retargets a specified constructor rather than the default zeroth constructor

See Also:
Constant Field Values

COMMAND_NETLIST

public static final java.lang.String COMMAND_NETLIST
Name of the command that creates a netlist of the design based on the default netlisting capabilities of the current TechMapper

See Also:
Constant Field Values

COMMAND_PARAM

public static final java.lang.String COMMAND_PARAM
Name of the command that sets a given parameter

See Also:
Constant Field Values

COMMAND_PARAMGUI

public static final java.lang.String COMMAND_PARAMGUI
Name of the command that brings up a GUI to help the user view and set parameters of the constructor to use to build the design

See Also:
Constant Field Values

COMMAND_PORTPARAM

public static final java.lang.String COMMAND_PORTPARAM
Name of the command that sets the parameter for a port or ports

See Also:
Constant Field Values

COMMAND_TARGET

public static final java.lang.String COMMAND_TARGET
Name of the command that sets the TechMapper for the desin

See Also:
Constant Field Values

COMMAND_SIMULATOR_CONTENTS

public static final java.lang.String COMMAND_SIMULATOR_CONTENTS
Name of the command that asks the simulator to dump its structures

See Also:
Constant Field Values

_dtb

protected DynamicTestBench _dtb
The DynamicTestBench for this CLIParamSetter


_lastException

protected java.lang.Throwable _lastException
The last exception caught when executing the command

Constructor Detail

CLIParamSetter

protected CLIParamSetter(DynamicTestBench dtb)
Method Detail

createCLICommands

public static void createCLICommands(CLInterpreter interp,
                                     DynamicTestBench dtb)
Used to automagically create all of the related DynamicTestBench CLI commands

Parameters:
interp - the interpreter for the commands
dtb - the test bench (DynamicTestBench)

getLastException

public static java.lang.Throwable getLastException(java.lang.String command)

execute

public abstract java.lang.Object execute(CLInterpreter parent,
                                         java.lang.String[] args)
                                  throws CLIException
This method is invoked by CLInterpreter when a command registered to this class is called.

Specified by:
execute in interface CLICommand
Parameters:
parent - the CLInterpreter to interact with
args - args[0] is the command called, the rest of the values in args are the arguments passed to the command on the command line
Throws:
CLIException

getHelpText

public abstract java.lang.String getHelpText(java.lang.String cmdName)
Specified by:
getHelpText in interface CLICommand
Parameters:
cmdName - the name of the command to give the help text for
Returns:
the help for the given cmdName

getHelpType

public final java.lang.String getHelpType(java.lang.String cmdName)
Returns CLIParamSetter.CLITYPE

Specified by:
getHelpType in interface CLICommand
Parameters:
cmdName - the command to give the help type for.
Returns:
CLIParamSetter.CLITYPE

getUsageText

public abstract java.lang.String getUsageText(java.lang.String cmdName)
Specified by:
getUsageText in interface CLICommand
Parameters:
cmdName - the name of the command to give the usage for
Returns:
the usage for the given cmdName


Copyright ? 2006 Brigham Young University, Configurable Computing Laboratory. All Rights Reserved.