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

#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]
 

Detailed Description

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

Field Documentation

◆ argv

char* tr_cli::argv[TR_CLI_MAX_ARGC]

◆ 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

◆ have_escape

bool tr_cli::have_escape

◆ len

int tr_cli::len

Number of characters in buffer at the moment

◆ prompt

char tr_cli::prompt[TR_CLI_MAX_PROMPT_LEN]

◆ 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: