ubinos
Typedefs | Functions
cli.h File Reference

ubiclib command line interface API More...

#include <ubinos_config.h>
#include <ubinos/type.h>

Go to the source code of this file.

Typedefs

typedef int(* cli_hookfunc_ft) (char *str, int max, void *arg)
 
typedef void(* cli_helphookfunc_ft) ()
 

Functions

int cli_sethookfunc (cli_hookfunc_ft hookfunc, void *arg)
 
int cli_sethelphookfunc (cli_helphookfunc_ft helphookfunc)
 
int cli_setprompt (char *prompt)
 
void cli_main (void *arg)
 

Detailed Description

ubiclib command line interface API

ubiclib command line interface API를 정의합니다.

Typedef Documentation

◆ cli_helphookfunc_ft

typedef void(* cli_helphookfunc_ft) ()

cli help 후크 함수 포인터 형 정의

◆ cli_hookfunc_ft

typedef int(* cli_hookfunc_ft) (char *str, int max, void *arg)

cli 후크 함수 포인터 형 정의

Function Documentation

◆ cli_main()

void cli_main ( void *  arg)

cli 메인 함수

Parameters
사용자정의 인수
Returns
0: 성공

-1: 오류

◆ cli_sethelphookfunc()

int cli_sethelphookfunc ( cli_helphookfunc_ft  helphookfunc)

도움말 후크 함수를 등록하는 함수

사용자는 도움말 후크 함수를 이용해 cli 도움말을 추가할 수 있습니다.

Parameters
도움말후크 함수 포인터
Returns
0: 성공

-1: 오류

◆ cli_sethookfunc()

int cli_sethookfunc ( cli_hookfunc_ft  hookfunc,
void *  arg 
)

후크 함수를 등록하는 함수

사용자는 후크 함수를 이용해 cli에 원하는 기능을 추가할 수 있습니다.

Parameters
후크함수 포인터
후크함수가 호출될 때 전달할 인수
Returns
0: 성공

-1: 오류

◆ cli_setprompt()

int cli_setprompt ( char *  prompt)

프로프트 문자열을 설정하는 함수

Parameters
프롬프트문자열
Returns
0: 성공

-1: 오류