OpenASIP  2.0
Public Member Functions | List of all members
RunCommand Class Reference

#include <RunCommand.hh>

Inheritance diagram for RunCommand:
Inheritance graph
Collaboration diagram for RunCommand:
Collaboration graph

Public Member Functions

 RunCommand ()
 
virtual ~RunCommand ()
 
virtual bool execute (const std::vector< DataObject > &arguments)
 
virtual std::string helpText () const
 
- Public Member Functions inherited from SimControlLanguageCommand
 SimControlLanguageCommand (const std::string &name)
 
virtual ~SimControlLanguageCommand ()
 
SimulatorFrontendsimulatorFrontend ()
 
const SimulatorFrontendsimulatorFrontendConst ()
 
virtual void printNextInstruction ()
 
virtual void printStopInformation ()
 
virtual void printStopReasons ()
 
virtual bool printBreakpointInfo (unsigned int breakpointHandle)
 
virtual void printSimulationTime ()
 
virtual std::ostream & outputStream ()
 
bool checkSimulationInitialized ()
 
bool checkSimulationNotAlreadyRunning ()
 
bool checkSimulationStopped ()
 
bool checkSimulationEnded ()
 
bool checkProgramLoaded ()
 
bool checkMachineLoaded ()
 
InstructionAddress parseInstructionAddressExpression (const std::string &expression)
 
TTAProgram::Address parseDataAddressExpression (const std::string &expression)
 
bool parseBreakpoint (const std::vector< DataObject > &arguments, Breakpoint &target)
 
bool askConditionFromUser (TclConditionScript &target)
 
bool askExpressionFromUser (ExpressionScript &target)
 
bool verifyBreakpointHandles (const std::vector< DataObject > &arguments, std::size_t startIndex=1)
 
void setErrorMessage (const TCEString &errorMsg)
 
- Public Member Functions inherited from CustomCommand
 CustomCommand (std::string name)
 
 CustomCommand (const CustomCommand &cmd)
 
virtual ~CustomCommand ()
 
std::string name () const
 
void setContext (InterpreterContext *context)
 
InterpreterContextcontext () const
 
void setInterpreter (ScriptInterpreter *si)
 
ScriptInterpreterinterpreter () const
 
bool checkArgumentCount (int argumentCount, int minimum, int maximum)
 
bool checkIntegerArgument (const DataObject &argument)
 
bool checkPositiveIntegerArgument (const DataObject &argument)
 
bool checkUnsignedIntegerArgument (const DataObject &argument)
 
bool checkDoubleArgument (const DataObject &argument)
 

Additional Inherited Members

- Protected Member Functions inherited from SimControlLanguageCommand
bool setMemoryAddress (const std::string &addressString, std::string &addressSpaceName, std::size_t &memoryAddress)
 
bool setMemoryPointer (MemorySystem::MemoryPtr &memory, const std::string &addressSpaceName)
 

Detailed Description

Implementation of the "run" command of the Simulator Control Language.

Definition at line 47 of file RunCommand.hh.

Constructor & Destructor Documentation

◆ RunCommand()

RunCommand::RunCommand ( )

Constructor.

Sets the name of the command to the base class.

Definition at line 47 of file RunCommand.cc.

47  : SimControlLanguageCommand("run") {
48 }

◆ ~RunCommand()

RunCommand::~RunCommand ( )
virtual

Destructor.

Does nothing.

Definition at line 55 of file RunCommand.cc.

55  {
56 }

Member Function Documentation

◆ execute()

bool RunCommand::execute ( const std::vector< DataObject > &  arguments)
virtual

Executes the "run" command.

Starts the simulation.

Parameters
argumentsNo arguments needed.
Returns
Always true.
Exceptions
NumberFormatExceptionIs never thrown by this command.

Implements CustomCommand.

Definition at line 69 of file RunCommand.cc.

69  {
72 
73  return false;
74  }
75 
77 
79 
80  return true;
81 }

References SimControlLanguageCommand::checkSimulationInitialized(), SimControlLanguageCommand::checkSimulationNotAlreadyRunning(), SimControlLanguageCommand::printStopInformation(), SimulatorFrontend::run(), and SimControlLanguageCommand::simulatorFrontend().

Here is the call graph for this function:

◆ helpText()

std::string RunCommand::helpText ( ) const
virtual

Returns the help text for this command.

Help text is searched from SimulatorTextGenerator.

Returns
The help text.
Todo:
Use SimulatorTextGenerator to get the help text.

Implements CustomCommand.

Definition at line 92 of file RunCommand.cc.

92  {
95 }

References Texts::TextGenerator::text(), SimulatorToolbox::textGenerator(), and Texts::TXT_INTERP_HELP_RUN.

Here is the call graph for this function:

The documentation for this class was generated from the following files:
Texts::TXT_INTERP_HELP_RUN
@ TXT_INTERP_HELP_RUN
Help text for command "run" of the CLI.
Definition: SimulatorTextGenerator.hh:69
SimControlLanguageCommand::checkSimulationNotAlreadyRunning
bool checkSimulationNotAlreadyRunning()
Definition: SimControlLanguageCommand.cc:111
Texts::TextGenerator::text
virtual boost::format text(int textId)
Definition: TextGenerator.cc:94
SimulatorFrontend::run
virtual void run()
Definition: SimulatorFrontend.cc:997
SimControlLanguageCommand::printStopInformation
virtual void printStopInformation()
Definition: SimControlLanguageCommand.cc:243
SimControlLanguageCommand::SimControlLanguageCommand
SimControlLanguageCommand(const std::string &name)
Definition: SimControlLanguageCommand.cc:67
SimulatorToolbox::textGenerator
static SimulatorTextGenerator & textGenerator()
Definition: SimulatorToolbox.cc:75
SimControlLanguageCommand::checkSimulationInitialized
bool checkSimulationInitialized()
Definition: SimControlLanguageCommand.cc:88
SimControlLanguageCommand::simulatorFrontend
SimulatorFrontend & simulatorFrontend()
Definition: SimControlLanguageCommand.cc:214