Trident IoT SDK
Loading...
Searching...
No Matches
tr_cli Struct Reference

Structure which defines the current state of the CLI. More...

#include <tr_cli.h>

Data Fields

char buffer [TR_CLI_MAX_LINE]
 Internal buffer. This should not be accessed directly, use the access functions below.
int len
 Number of characters in buffer at the moment.
int cursor
 Position of the cursor.
bool done
 Have we just parsed a full line?
void(* put_char )(char ch)
 Callback function to output a single character to the user.
void * cb_data
 Data to provide to the put_char callback.
bool have_escape
 Flag indicating if we have an escape sequence.
bool have_csi
 Flag indicating if we have a CSI sequence.
int counter
 Counter of the value for the CSI code.
char * argv [TR_CLI_MAX_ARGC]
 Array of argument strings.
char prompt [TR_CLI_MAX_PROMPT_LEN]
 CLI prompt string.

Detailed Description

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.

Field Documentation

◆ argv

char* tr_cli::argv[TR_CLI_MAX_ARGC]

Array of argument strings.

◆ buffer

char tr_cli::buffer[TR_CLI_MAX_LINE]

Internal buffer. This should not be accessed directly, use the access functions below.

◆ cb_data

void* tr_cli::cb_data

Data to provide to the put_char callback.

◆ counter

int tr_cli::counter

Counter of the value for the CSI code.

◆ cursor

int tr_cli::cursor

Position of the cursor.

◆ done

bool tr_cli::done

Have we just parsed a full line?

◆ have_csi

bool tr_cli::have_csi

Flag indicating if we have a CSI sequence.

◆ have_escape

bool tr_cli::have_escape

Flag indicating if we have an escape sequence.

◆ len

int tr_cli::len

Number of characters in buffer at the moment.

◆ prompt

char tr_cli::prompt[TR_CLI_MAX_PROMPT_LEN]

CLI prompt string.

◆ put_char

void(* tr_cli::put_char) (char ch)

Callback function to output a single character to the user.


The documentation for this struct was generated from the following file: