|
Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Data Structures | |
| struct | AltCbParam |
| struct | ShellCommand |
| Custom command entry type. More... | |
| struct | ShellConfig |
| Shell descriptor type. More... | |
Macros | |
| #define | printScreen(...) |
| #define | SHELL_DYNAMIC_ENTRIES_NUMBER 0U |
| #define | shellCreate(C, S, P) |
Typedefs | |
| typedef void | shellcmd_f(BaseSequentialStream *chp, int argc, const char *const argv[]) |
| Command handler function type. | |
Functions | |
| static void | cmd_info (BaseSequentialStream *lchp, int argc, const char *const argv[]) |
| static | MUTEX_DECL (mut) |
| void | microrlPrint (const char *str) |
| void | microrlExecute (int argc, const char *const *argv) |
| const char ** | microrlComplet (int argc, const char *const *argv) |
| void | microrlSigint (void) |
| static void | usage (BaseSequentialStream *lchp, char *p) |
| static | THD_FUNCTION (shell_thread, p) |
| Shell thread function. | |
| void | shellInit (void) |
| Shell manager initialization. | |
| thread_t * | shellCreateStatic (const ShellConfig *scp, void *wsp, size_t size, tprio_t prio) |
| Spawns a new shell. | |
| void | modeAlternate (void(*funcp)(uint8_t c, uint32_t mode), uint32_t mode) |
| void | modeShell (void) |
| bool | shellGetLine (BaseSequentialStream *chp, char *line, unsigned size) |
Variables | |
| void(* | AltCbParam::altFunc )(uint8_t c, uint32_t mode) |
| uint32_t | AltCbParam::param |
| event_source_t | shell_terminated |
| Shell termination event source. | |
| static microrl_t | rl |
| static BaseSequentialStream * | chpg |
| static const ShellCommand * | staticCommands = NULL |
| static const char * | complWorlds [64] |
| static const ShellCommand | localCommands [] |
| Array of the default and dynamic commands. | |
| static AltCbParam | altCbParam = {.altFunc = NULL, .param = 0} |
| event_source_t | shell_terminated |
| Shell termination event source. | |
| struct AltCbParam |
| struct ShellCommand |
Custom command entry type.
Definition at line 30 of file microrlShell.h.
| Data Fields | ||
|---|---|---|
| shellcmd_f * | sc_function | Command function. |
| const char * | sc_name | Command name. |
| struct ShellConfig |
Shell descriptor type.
Definition at line 38 of file microrlShell.h.
| Data Fields | ||
|---|---|---|
| BaseSequentialStream * | sc_channel | I/O channel associated to the shell. |
| const ShellCommand * | sc_commands | Shell extra commands table. |
| #define printScreen | ( | ... | ) |
| #define SHELL_DYNAMIC_ENTRIES_NUMBER 0U |
Definition at line 15 of file microrlShell.h.
| #define shellCreate | ( | C, | |
| S, | |||
| P ) |
Definition at line 19 of file microrlShell.h.
| typedef void shellcmd_f(BaseSequentialStream *chp, int argc, const char *const argv[]) |
Command handler function type.
Definition at line 24 of file microrlShell.h.
|
static |
Definition at line 145 of file microrlShell.c.
References BOARD_NAME, chprintf(), and usage().
| const char ** microrlComplet | ( | int | argc, |
| const char *const * | argv ) |
Definition at line 89 of file microrlShell.c.
References complWorlds, localCommands, mut, and staticCommands.
Referenced by shellInit().
| void microrlExecute | ( | int | argc, |
| const char *const * | argv ) |
Definition at line 61 of file microrlShell.c.
References chpg, localCommands, mut, ShellCommand::sc_function, ShellCommand::sc_name, and staticCommands.
Referenced by shellInit().
| void microrlPrint | ( | const char * | str | ) |
Definition at line 52 of file microrlShell.c.
References chpg.
Referenced by shellInit().
| void microrlSigint | ( | void | ) |
Definition at line 132 of file microrlShell.c.
References chpg, and chprintf().
Referenced by shellInit().
Definition at line 452 of file microrlShell.c.
References altCbParam, mode, and mut.
| void modeShell | ( | void | ) |
Definition at line 460 of file microrlShell.c.
References altCbParam, mut, and printScreen.
| thread_t * shellCreateStatic | ( | const ShellConfig * | scp, |
| void * | wsp, | ||
| size_t | size, | ||
| tprio_t | prio ) |
Spawns a new shell.
CH_USE_MALLOC_HEAP and CH_USE_DYNAMIC must be enabled.| [in] | scp | pointer to a ShellConfig object |
| [in] | size | size of the shell working area to be allocated |
| [in] | prio | priority level for the new shell |
| NULL | thread creation failed because memory allocation. |
Create statically allocated shell thread.
| [in] | scp | pointer to a ShellConfig object |
| [in] | wsp | pointer to a working area dedicated to the shell thread stack |
| [in] | size | size of the shell working area |
| [in] | prio | priority level for the new shell |
Definition at line 413 of file microrlShell.c.
| bool shellGetLine | ( | BaseSequentialStream * | chp, |
| char * | line, | ||
| unsigned | size ) |
References mode.
| void shellInit | ( | void | ) |
Shell manager initialization.
Definition at line 379 of file microrlShell.c.
References microrl_init(), microrl_set_complete_callback(), microrl_set_execute_callback(), microrl_set_sigint_callback(), microrlComplet(), microrlExecute(), microrlPrint(), microrlSigint(), rl, and shell_terminated.
Referenced by shell_init_arch().
|
static |
Shell thread function.
| [in] | p | pointer to a BaseSequentialStream object |
| MSG_OK | terminated by command. |
| RDY_RESET | terminated by reset condition on the I/O channel. |
Definition at line 351 of file microrlShell.c.
References altCbParam, chpg, microrl_insert_char(), p, printScreen, rl, shell_terminated, and staticCommands.
|
static |
Definition at line 138 of file microrlShell.c.
References chprintf(), and p.
Referenced by cmd_info(), and nps_main_parse_options().
|
static |
Definition at line 50 of file microrlShell.c.
Referenced by modeAlternate(), modeShell(), and THD_FUNCTION().
Definition at line 20 of file microrlShell.c.
|
static |
Definition at line 35 of file microrlShell.c.
Referenced by microrlExecute(), microrlPrint(), microrlSigint(), and THD_FUNCTION().
|
static |
Definition at line 37 of file microrlShell.c.
Referenced by microrlComplet().
|
static |
Array of the default and dynamic commands.
Definition at line 44 of file microrlShell.c.
Referenced by microrlComplet(), and microrlExecute().
| uint32_t AltCbParam::param |
Definition at line 21 of file microrlShell.c.
|
static |
Definition at line 34 of file microrlShell.c.
Referenced by shellInit(), and THD_FUNCTION().
| event_source_t shell_terminated |
Shell termination event source.
Definition at line 31 of file microrlShell.c.
Referenced by shellInit(), and THD_FUNCTION().
|
extern |
Shell termination event source.
Definition at line 31 of file microrlShell.c.
Referenced by shellInit(), and THD_FUNCTION().
|
static |
Definition at line 36 of file microrlShell.c.
Referenced by microrlComplet(), microrlExecute(), and THD_FUNCTION().