diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-03-11 12:36:30 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-03-11 12:36:30 +0000 |
commit | c390084bbc63e3c2548734af1b2c53a9a5771729 (patch) | |
tree | 1d665a4ce05d84882e165127198eeb10670a7dd6 /nuttx/include | |
parent | ee17172d5800fca4fab951e65050b711a6d3b0d4 (diff) | |
download | px4-nuttx-c390084bbc63e3c2548734af1b2c53a9a5771729.tar.gz px4-nuttx-c390084bbc63e3c2548734af1b2c53a9a5771729.tar.bz2 px4-nuttx-c390084bbc63e3c2548734af1b2c53a9a5771729.zip |
apps/-related updates
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3364 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/include')
-rw-r--r-- | nuttx/include/nuttx/nuttapp.h | 56 |
1 files changed, 36 insertions, 20 deletions
diff --git a/nuttx/include/nuttx/nuttapp.h b/nuttx/include/nuttx/nuttapp.h index a8b6e8397..1d6497283 100644 --- a/nuttx/include/nuttx/nuttapp.h +++ b/nuttx/include/nuttx/nuttapp.h @@ -72,49 +72,65 @@ extern "C" { #define EXTERN extern #endif + /**************************************************************************** - * Name: execute builtin NuttX application + * Name: check for availability of builtin NuttX application * * Description: - * Executes builtin application registerred during compile time. - * New application is run in a separate task context (and thread). + * Checks for availabiliy of application registerred during compile time. * * Input Parameter: * filename - Name of the linked-in binary to be started. - * argv - Argument list * * Returned Value: * This is an end-user function, so it follows the normal convention: - * Returns the PID of the exec'ed module. On failure, it.returns - * -1 (ERROR) and sets errno appropriately. + * Returns index of builtin application. If it is not found then it + * returns -1 (ERROR) and sets errno appropriately. * - * Implementation within drivers/bchsbin ****************************************************************************/ -EXTERN int exec_nuttapp(FAR const char *appname, FAR const char *argv[]); +EXTERN int nuttapp_isavail(FAR const char *appname); + /**************************************************************************** - * Name: execute a nutt shell command + * Name: get name of built-in application * * Description: - * Invokes an application that is either: - * - invokes a nsh script or directly invoke: - * - system application list, registerred via XXXX - * - resides in a file system compiled/linked in NXFLAT model - * - resides in a non-executable file-system, which is loaded - * into the memory first and then executed. + * Returns pointer to a name of built-in application pointed by the + * index. * * Input Parameter: - * Sheel command. + * index, from 0 and on ... * * Returned Value: - * Zero on success or -1 on error with errno set. + * Returns valid pointer pointing to the app name if index is valid. + * Otherwise NULL is returned. * - * TODO: move this command to the stdlib.h (?) and - * merge implementation with the nuttshell sh command ****************************************************************************/ -EXTERN FAR int system(const char *command); +EXTERN const char * nuttapp_getname(int index); + + +/**************************************************************************** + * Name: execute builtin NuttX application + * + * Description: + * Executes builtin application registerred during compile time. + * New application is run in a separate task context (and thread). + * + * Input Parameter: + * filename - Name of the linked-in binary to be started. + * argv - Argument list + * + * Returned Value: + * This is an end-user function, so it follows the normal convention: + * Returns the PID of the exec'ed module. On failure, it.returns + * -1 (ERROR) and sets errno appropriately. + * + ****************************************************************************/ + +EXTERN int exec_nuttapp(FAR const char *appname, FAR const char *argv[]); + #undef EXTERN #if defined(__cplusplus) |