Critical Link MityCam SoC Firmware  1.0
Critical Link MityCam SoC Firmware
tcCommandExecutive Class Reference

#include <tcCommandExecutive.h>

Inheritance diagram for tcCommandExecutive:
Collaboration diagram for tcCommandExecutive:

Public Member Functions

 tcCommandExecutive (const char *appname)
 Constructor, Create an input thread and then populate the menu and the help menu. More...
 
- Public Member Functions inherited from tcCommandExecutiveBase
 tcCommandExecutiveBase (const char *appname)
 Constructor, Create an input thread and then populate the menu and the help menu. More...
 
void start ()
 

Protected Member Functions

void show_dbg (const char *prompt, int val)
 
 MENU_FUNCTION_DECL (process_version)
 
 MENU_FUNCTION_DECL (process_dbg)
 
 MENU_FUNCTION_DECL (process_greg)
 
 MENU_FUNCTION_DECL (process_sreg)
 
- Protected Member Functions inherited from tcCommandExecutiveBase
void add_cmnd (const char *cmnd, tpVoidFunc func, const char *desc)
 
void add_seperator ()
 
 MENU_FUNCTION_DECL (process_help)
 
void conditionalRead (unsigned int anTabs, const char *apMessage)
 
bool ask_on_off (const char *prompt, bool allowempty=false, bool dflt=false)
 Generic "on/off" asker. More...
 
bool ask_yes_no (const char *prompt, bool allowempty=false, bool dflt=false)
 Generic "yes/no" asker. More...
 
double ask_double (const char *prompt, bool allowempty=false, double dflt=0)
 
float ask_float (const char *prompt, bool allowempty=false, float dflt=0)
 
uint32_t ask_uint (const char *prompt, bool allowempty=false, uint32_t dflt=0)
 
int32_t ask_int (const char *prompt, bool allowempty=false, int32_t dflt=0)
 
std::string ask_string (const char *prompt, bool allowempty=false, const char *dflt="")
 
void ReadUserInput ()
 
void UserInputLoop ()
 
tpVoidFunc get_func (const char *cmnd)
 
tsCmndFuncget_cmndfunc (const char *cmnd)
 
void printHelp (const char *cmnd)
 Prints either a single command, all commands, or an error, depending on the help string. More...
 
void printHelpGeneric (const tsCmndFunc *tcf) const
 Prints generic formatted help for the specfied command and info. More...
 
void printHelpAll () const
 

Additional Inherited Members

- Protected Types inherited from tcCommandExecutiveBase
typedef void(* tpVoidFunc) (void *)
 
- Protected Attributes inherited from tcCommandExecutiveBase
std::vector< tsCmndFuncm_cmnd_func_list
 
tcUIThreadm_ConsoleListenerThread
 Thread handle for User Input. More...
 
bool m_continue
 Tells the UI thread when QUIT command has been given. More...
 
std::list< std::string > m_cmnd_list
 
std::string m_appname
 

Detailed Description

This class forms the basis of ARM input operations, allowing the programmer to easily write a generic set of commands which will be performed as guided by a parent tpVoidFunc container method. By initializing the command map to translate the desired command into this function call, the new parent tpVoidFunc will automatically be called within the input thread when the user types the corresponding command. Please note that this map will NOT automatically generate the Help Menu in any way, and therefore the programmer must add the command and its description to the corresponding HelpMap. As a final note, to those unfamiliar with the standard map: this is a tree-based container, and string comparisons are based on an integral translation of each string. In other words, COMMAND differs from command, and again, this must be considered in both this and the help map.

Constructor & Destructor Documentation

◆ tcCommandExecutive()

tcCommandExecutive::tcCommandExecutive ( const char *  appname)

Constructor, Create an input thread and then populate the menu and the help menu.

Member Function Documentation

◆ MENU_FUNCTION_DECL() [1/4]

tcCommandExecutive::MENU_FUNCTION_DECL ( process_dbg  )
protected

◆ MENU_FUNCTION_DECL() [2/4]

tcCommandExecutive::MENU_FUNCTION_DECL ( process_greg  )
protected

◆ MENU_FUNCTION_DECL() [3/4]

tcCommandExecutive::MENU_FUNCTION_DECL ( process_sreg  )
protected

◆ MENU_FUNCTION_DECL() [4/4]

tcCommandExecutive::MENU_FUNCTION_DECL ( process_version  )
protected

◆ show_dbg()

void tcCommandExecutive::show_dbg ( const char *  prompt,
int  val 
)
protected

The documentation for this class was generated from the following files: