|
rusEFI
The most advanced open source ECU
|
Command-line interface commands registry.
Here we have a data structure which holds all the dynamically-registered command line interface action names & callback. This logic is invoked in user context by the console thread - see consoleThreadEntryPoint
TODO: there is too much copy-paste here, this class needs some refactoring :)
see testConsoleLogic()
Definition in file cli_registry.cpp.
Functions | |
| void | resetConsoleActions (void) |
| static void | doAddAction (const char *token, action_type_e type, Void callback, void *param) |
| void | addConsoleActionP (const char *token, VoidPtr callback, void *param) |
| void | addConsoleActionSSP (const char *token, VoidCharPtrCharPtrVoidPtr callback, void *param) |
| void | addConsoleAction (const char *token, Void callback) |
| Register console action without parameters. | |
| void | addConsoleActionI (const char *token, VoidInt callback) |
| Register a console command with one Integer parameter. | |
| void | addConsoleActionIP (const char *token, VoidIntVoidPtr callback, void *param) |
| void | addConsoleActionII (const char *token, VoidIntInt callback) |
| Register a console command with two Integer parameters. | |
| void | addConsoleActionIIP (const char *token, VoidIntIntVoidPtr callback, void *param) |
| void | addConsoleActionIF (const char *token, VoidIntFloat callback) |
| void | addConsoleActionS (const char *token, VoidCharPtr callback) |
| void | addConsoleActionSP (const char *token, VoidCharPtrVoidPtr callback, void *param) |
| void | addConsoleActionSS (const char *token, VoidCharPtrCharPtr callback) |
| void | addConsoleActionSSS (const char *token, VoidCharPtrCharPtrCharPtr callback) |
| void | addConsoleActionSSSSS (const char *token, VoidCharPtrCharPtrCharPtrCharPtrCharPtr callback) |
| void | addConsoleActionNANF (const char *token, VoidFloat callback) |
| void | addConsoleActionF (const char *token, VoidFloat callback) |
| void | addConsoleActionFF (const char *token, VoidFloatFloat callback) |
| void | addConsoleActionFFF (const char *token, VoidFloatFloatFloat callback) |
| void | addConsoleActionFFFF (const char *token, VoidFloatFloatFloatFloat callback) |
| void | addConsoleActionFFP (const char *token, VoidFloatFloatVoidPtr callback, void *param) |
| static int | getParameterCount (action_type_e parameterType) |
| void | helpCommand (void) |
| This function prints out a list of all available commands. | |
| int | findEndOfToken (const char *line) |
| int | tokenLength (const char *msgp) |
| char * | unquote (char *line) |
| static int | setargs (char *args, char **argv, int max_args) |
| int | handleActionWithParameter (TokenCallback *current, char *argv[], int argc) |
| void | initConsoleLogic () |
| static int | handleConsoleLineInternal (const char *commandLine) |
| void | handleConsoleLine (char *line) |
| This function takes care of one command line once we have it. | |
Variables | |
| static int | consoleActionCount = 0 |
| static TokenCallback | consoleActions [CONSOLE_MAX_ACTIONS] |
| static char | handleBuffer [MAX_CMD_LINE_LENGTH+1] |
Register console action without parameters.
Definition at line 91 of file cli_registry.cpp.
Referenced by adcTriggerTurnOnInputPin(), commonInitEngineController(), errorHandlerInit(), f407_discovery_boardInitHardware(), initBenchTest(), initCan(), initCanGpioMsiobox(), initConsoleLogic(), initEarlyMmcCard(), initElectronicThrottle(), initFlash(), initFlexSensor(), initGps(), initializeConsole(), initKLine(), initMalfunctionIndicator(), initMapDecoder(), initMax3185x(), initPinRepository(), initPrimaryPins(), initSensorCli(), initSent(), initSettings(), initTimePerfActions(), initTriggerCentral(), initWaveAnalyzer(), initWaveChart(), runRusEfi(), startIdleThread(), startLua(), startTunerStudioConnectivity(), ButtonDebounce::stopConfiguration(), and tle9201_add().


Definition at line 145 of file cli_registry.cpp.
Referenced by initBenchTest(), and initSettings().


| void addConsoleActionFF | ( | const char * | token, |
| VoidFloatFloat | callback | ||
| ) |
Definition at line 149 of file cli_registry.cpp.

| void addConsoleActionFFF | ( | const char * | token, |
| VoidFloatFloatFloat | callback | ||
| ) |
Definition at line 153 of file cli_registry.cpp.
Referenced by initBenchTest().


| void addConsoleActionFFFF | ( | const char * | token, |
| VoidFloatFloatFloatFloat | callback | ||
| ) |
Definition at line 157 of file cli_registry.cpp.
Referenced by initBenchTest().


| void addConsoleActionFFP | ( | const char * | token, |
| VoidFloatFloatVoidPtr | callback, | ||
| void * | param | ||
| ) |
Definition at line 161 of file cli_registry.cpp.

Register a console command with one Integer parameter.
Definition at line 98 of file cli_registry.cpp.
Referenced by initAdcInputs(), initBenchTest(), initConfigActions(), initializeConsole(), initPotentiometers(), initQcBenchControls(), initSensorCli(), initSettings(), initTimePerfActions(), initTriggerEmulator(), initWaveChart(), setEepromTestConfiguration(), and startTunerStudioConnectivity().


| void addConsoleActionIF | ( | const char * | token, |
| VoidIntFloat | callback | ||
| ) |
Definition at line 117 of file cli_registry.cpp.

| void addConsoleActionII | ( | const char * | token, |
| VoidIntInt | callback | ||
| ) |
Register a console command with two Integer parameters.
Definition at line 109 of file cli_registry.cpp.
Referenced by initBenchTest(), initConfigActions(), initKLine(), initPotentiometers(), initQcBenchControls(), and startLua().


| void addConsoleActionIIP | ( | const char * | token, |
| VoidIntIntVoidPtr | callback, | ||
| void * | param | ||
| ) |
Definition at line 113 of file cli_registry.cpp.

| void addConsoleActionIP | ( | const char * | token, |
| VoidIntVoidPtr | callback, | ||
| void * | param | ||
| ) |
Definition at line 102 of file cli_registry.cpp.

Definition at line 141 of file cli_registry.cpp.

| void addConsoleActionS | ( | const char * | token, |
| VoidCharPtr | callback | ||
| ) |
Definition at line 121 of file cli_registry.cpp.
Referenced by initEarlyMmcCard(), initSettings(), and startLua().


| void addConsoleActionSP | ( | const char * | token, |
| VoidCharPtrVoidPtr | callback, | ||
| void * | param | ||
| ) |
Definition at line 125 of file cli_registry.cpp.

| void addConsoleActionSS | ( | const char * | token, |
| VoidCharPtrCharPtr | callback | ||
| ) |
Definition at line 129 of file cli_registry.cpp.
Referenced by initConfigActions(), initSensorCli(), and initSettings().


| void addConsoleActionSSP | ( | const char * | token, |
| VoidCharPtrCharPtrVoidPtr | callback, | ||
| void * | param | ||
| ) |
| void addConsoleActionSSS | ( | const char * | token, |
| VoidCharPtrCharPtrCharPtr | callback | ||
| ) |
Definition at line 133 of file cli_registry.cpp.
Referenced by initConfigActions(), and startTunerStudioConnectivity().


| void addConsoleActionSSSSS | ( | const char * | token, |
| VoidCharPtrCharPtrCharPtrCharPtrCharPtr | callback | ||
| ) |
Definition at line 137 of file cli_registry.cpp.

|
static |
Definition at line 51 of file cli_registry.cpp.
Referenced by addConsoleAction(), addConsoleActionF(), addConsoleActionFF(), addConsoleActionFFF(), addConsoleActionFFFF(), addConsoleActionFFP(), addConsoleActionI(), addConsoleActionIF(), addConsoleActionII(), addConsoleActionIIP(), addConsoleActionIP(), addConsoleActionNANF(), addConsoleActionP(), addConsoleActionS(), addConsoleActionSP(), addConsoleActionSS(), addConsoleActionSSP(), addConsoleActionSSS(), and addConsoleActionSSSSS().


| int findEndOfToken | ( | const char * | line | ) |
Looks like this is a quoted token
Matching closing quote not found
Skipping first quote and the symbol after closing quote
Definition at line 207 of file cli_registry.cpp.
|
static |
Definition at line 165 of file cli_registry.cpp.
Referenced by handleConsoleLineInternal(), and helpCommand().

| int handleActionWithParameter | ( | TokenCallback * | current, |
| char * | argv[], | ||
| int | argc | ||
| ) |
Definition at line 292 of file cli_registry.cpp.
Referenced by handleConsoleLineInternal().


| void handleConsoleLine | ( | char * | line | ) |
This function takes care of one command line once we have it.
Definition at line 510 of file cli_registry.cpp.
Referenced by checkStackAndHandleConsoleLine(), and initializeConsole().


|
static |
Definition at line 478 of file cli_registry.cpp.
Referenced by handleConsoleLine().


| void helpCommand | ( | void | ) |
This function prints out a list of all available commands.
Definition at line 198 of file cli_registry.cpp.
Referenced by initConsoleLogic().


| void initConsoleLogic | ( | ) |
Definition at line 472 of file cli_registry.cpp.
Referenced by initializeConsole().


| void resetConsoleActions | ( | void | ) |
Definition at line 47 of file cli_registry.cpp.
Definition at line 253 of file cli_registry.cpp.
Referenced by handleConsoleLineInternal().

| int tokenLength | ( | const char * | msgp | ) |
Definition at line 230 of file cli_registry.cpp.
Definition at line 242 of file cli_registry.cpp.
|
static |
Definition at line 44 of file cli_registry.cpp.
Referenced by doAddAction(), handleConsoleLineInternal(), helpCommand(), and resetConsoleActions().
|
static |
Definition at line 45 of file cli_registry.cpp.
Referenced by doAddAction(), handleConsoleLineInternal(), and helpCommand().
|
static |
Definition at line 476 of file cli_registry.cpp.
Referenced by handleConsoleLineInternal().