#include <tr_cli.h>
Data Fields | |
char | buffer [TR_CLI_MAX_LINE] |
int | len |
int | cursor |
bool | done |
void(* | put_char )(char ch) |
void * | cb_data |
bool | have_escape |
bool | have_csi |
int | counter |
char * | argv [TR_CLI_MAX_ARGC] |
char | prompt [TR_CLI_MAX_PROMPT_LEN] |
This is the structure which defines the current state of the CLI NOTE: Although this structure is exposed here, it is not recommended that it be interacted with directly. Use the accessor functions below to interact with it. It is exposed here to make it easier to use as a static structure, but all elements of the structure should be considered private
char* tr_cli::argv[TR_CLI_MAX_ARGC] |
char tr_cli::buffer[TR_CLI_MAX_LINE] |
Internal buffer. This should not be accessed directly, use the access functions below
void* tr_cli::cb_data |
Data to provide to the put_char callback
int tr_cli::counter |
counter of the value for the CSI code
int tr_cli::cursor |
Position of the cursor
bool tr_cli::done |
Have we just parsed a full line?
bool tr_cli::have_csi |
bool tr_cli::have_escape |
int tr_cli::len |
Number of characters in buffer at the moment
char tr_cli::prompt[TR_CLI_MAX_PROMPT_LEN] |
void(* tr_cli::put_char) (char ch) |
Callback function to output a single character to the user