32#ifndef _HWLITEOS_SHELL_SHCMD_H
33#define _HWLITEOS_SHELL_SHCMD_H
39#include "shcmdparse.h"
82#define SHELLCMD_ENTRY(l, cmdType, cmdKey, paraNum, cmdHook) \
83 CmdItem l LOS_HAL_TABLE_ENTRY(shellcmd) = { \
90#define NEED_NEW_LINE(timesPrint, lineCap) ((timesPrint) % (lineCap) == 0)
91#define SCREEN_IS_FULL(timesPrint, lineCap) ((timesPrint) >= ((lineCap) * DEFAULT_SCREEN_HEIGHT))
unsigned int OsCmdExec(CmdParsed *cmdParsed, char *cmdStr)
执行命令,shell是运行程序的程序.
unsigned int OsShellKeyInit(ShellCB *shellCB)
shell 命令初始化
void OsShellHistoryShow(unsigned int value, ShellCB *shellCB)
显示shell命令历史记录,支持上下键方式
void OsShellCmdPush(const char *string, CmdKeyLink *cmdKeyLink)
将shell命令 string 以 CmdKeyLink 方式加入链表
int OsTabCompletion(char *cmdKey, unsigned int *len)
tab键
void OsShellKeyDeInit(CmdKeyLink *cmdKeyLink)
shell的析构函数
unsigned int OsCmdKeyShift(const char *cmdKey, char *cmdOut, unsigned int size)
双向链表由内联函数实现 http://weharmonyos.com/openharmony/zh-cn/device-dev/kernel/kernel-small-apx-dll....
BOOL(* CmdVerifyTransID)(UINT32 transID)
UINT32 OsShellSysCmdRegister(VOID)
注册系统自带的shell命令
CmdModInfo * OsCmdInfoGet(VOID)
获取全局变量
const CHAR * cmdKey
命令关键字,例如:ls 函数在Shell中访问的名称。
CmdCallBackFunc cmdHook
命令执行函数地址,即命令实际执行函数。
UINT32 paraNum
调用的执行函数的入参最大个数,暂不支持。
CmdVerifyTransID transIdHook
暂不知何意.
UINT32 initMagicFlag
初始魔法标签 0xABABABAB
u32_t(* CmdCallBackFunc)(u32_t argc, const char **argv)