|
RTEMS CPU Kit with SuperCore
4.11.2
|
#include <stdio.h>#include <time.h>#include <rtems.h>#include <rtems/error.h>#include <rtems/libio.h>#include <rtems/libio_.h>#include <rtems/system.h>#include <rtems/shell.h>#include <rtems/shellconfig.h>#include <rtems/console.h>#include "internal.h"#include <termios.h>#include <string.h>#include <stdlib.h>#include <ctype.h>#include <sys/stat.h>#include <unistd.h>#include <errno.h>#include <pwd.h>#include <pthread.h>#include <assert.h>
Macros | |
| #define | RTEMS_SHELL_MAXIMUM_ARGUMENTS (128) |
| #define | RTEMS_SHELL_CMD_SIZE (128) |
| #define | RTEMS_SHELL_CMD_COUNT (32) |
| #define | RTEMS_SHELL_PROMPT_SIZE (128) |
Functions | |
| rtems_shell_env_t * | rtems_shell_get_current_env (void) |
| void | rtems_shell_dup_current_env (rtems_shell_env_t *copy) |
| bool | rtems_shell_main_loop (rtems_shell_env_t *shell_env_arg) |
| rtems_status_code | rtems_shell_init (const char *task_name, size_t task_stacksize, rtems_task_priority task_priority, const char *devname, bool forever, bool wait, rtems_shell_login_check_t login_check) |
| Initialise the shell creating tasks to login and run the shell sessions. More... | |
| rtems_status_code | rtems_shell_script (const char *task_name, size_t task_stacksize, rtems_task_priority task_priority, const char *input, const char *output, bool output_append, bool wait, bool echo) |
| Run a shell script creating a shell tasks to execute the command under. More... | |
Variables | |
| const rtems_shell_env_t | rtems_global_shell_env |
| rtems_status_code rtems_shell_init | ( | const char * | task_name, |
| size_t | task_stacksize, | ||
| rtems_task_priority | task_priority, | ||
| const char * | devname, | ||
| bool | forever, | ||
| bool | wait, | ||
| rtems_shell_login_check_t | login_check | ||
| ) |
Initialise the shell creating tasks to login and run the shell sessions.
| task_name | Name of the shell task. |
| task_stacksize | The size of the stack. If 0 the default size is used. |
| task_priority | The priority the shell runs at. |
| forever | Repeat logins. |
| wait | Caller should block until shell exits. |
| login_check | User login check function, NULL disables login checks. |
| rtems_status_code rtems_shell_script | ( | const char * | task_name, |
| size_t | task_stacksize, | ||
| rtems_task_priority | task_priority, | ||
| const char * | input, | ||
| const char * | output, | ||
| bool | output_append, | ||
| bool | wait, | ||
| bool | echo | ||
| ) |
Run a shell script creating a shell tasks to execute the command under.
| task_name | Name of the shell task. |
| task_stacksize | The size of the stack. If 0 the default size is used. |
| task_priority | The priority the shell runs at. |
| input | The file of commands. Can be 'stdin' to use stdin. |
| output | The output file to write commands to. Can be 'stdout', 'stderr' or '/dev/null'. |
| output_append | Append the output to the file or truncate the file. Create if it does not exist. |
| wait | Wait for the script to finish. |
References RTEMS_INVALID_ID, RTEMS_LOCAL, RTEMS_SELF, RTEMS_SUCCESSFUL, and rtems_task_ident().
| const rtems_shell_env_t rtems_global_shell_env |
1.8.13