Line | |
---|
1 | /* |
---|
2 | * BASED UPON SOURCE IN RTEMS, MODIFIED FOR SIMULATOR |
---|
3 | * |
---|
4 | * COPYRIGHT (c) 1989-2013. |
---|
5 | * On-Line Applications Research Corporation (OAR). |
---|
6 | * |
---|
7 | * The license and distribution terms for this file may be |
---|
8 | * found in the file LICENSE in this distribution or at |
---|
9 | * http://www.rtems.com/license/LICENSE. |
---|
10 | */ |
---|
11 | |
---|
12 | |
---|
13 | #ifndef __SHELL_h |
---|
14 | #define __SHELL_h |
---|
15 | |
---|
16 | #ifdef __cplusplus |
---|
17 | extern "C" { |
---|
18 | #endif |
---|
19 | |
---|
20 | typedef int (*rtems_shell_command_t)(int argc, char **argv); |
---|
21 | |
---|
22 | struct rtems_shell_cmd_tt; |
---|
23 | typedef struct rtems_shell_cmd_tt rtems_shell_cmd_t; |
---|
24 | |
---|
25 | struct rtems_shell_cmd_tt { |
---|
26 | const char *name; |
---|
27 | const char *usage; |
---|
28 | const char *topic; |
---|
29 | rtems_shell_command_t command; |
---|
30 | rtems_shell_cmd_t *alias; |
---|
31 | rtems_shell_cmd_t *next; |
---|
32 | }; |
---|
33 | |
---|
34 | typedef struct { |
---|
35 | const char *name; |
---|
36 | const char *alias; |
---|
37 | } rtems_shell_alias_t; |
---|
38 | |
---|
39 | void rtems_shell_initialize_command_set(void); |
---|
40 | |
---|
41 | rtems_shell_cmd_t * rtems_shell_lookup_cmd(const char *cmd); |
---|
42 | |
---|
43 | rtems_shell_cmd_t * rtems_shell_alias_cmd( |
---|
44 | const char *cmd, |
---|
45 | const char *alias |
---|
46 | ); |
---|
47 | |
---|
48 | rtems_shell_cmd_t * rtems_shell_add_cmd( |
---|
49 | const char *name, |
---|
50 | const char *topic, |
---|
51 | const char *usage, |
---|
52 | rtems_shell_command_t command |
---|
53 | ); |
---|
54 | |
---|
55 | int rtems_shell_make_args( |
---|
56 | char *commandLine, |
---|
57 | int *argc_p, |
---|
58 | char **argv_p, |
---|
59 | int max_args |
---|
60 | ); |
---|
61 | |
---|
62 | #ifdef __cplusplus |
---|
63 | } |
---|
64 | #endif |
---|
65 | |
---|
66 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.