CNDP  22.08.0
cli_vt100.h File Reference
#include <stdarg.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <termios.h>
#include <unistd.h>
#include <cne_atomic.h>
#include <cne_common.h>
#include <cne_stdio.h>
#include <cne_system.h>
#include <cne_tty.h>
#include <vt100_out.h>

Go to the source code of this file.

Functions

CNDP_API struct cli_vt100 * vt100_setup (void)
 
CNDP_API void vt100_free (struct cli_vt100 *vt)
 
CNDP_API int vt100_parse_input (struct cli_vt100 *vt, uint8_t c)
 
CNDP_API void vt100_do_cmd (int idx)
 
CNDP_API struct vt100_cmds * vt100_get_cmds (void)
 

Detailed Description

CNE cursor and color support for VT100 using ANSI color escape codes.

Definition in file cli_vt100.h.

Function Documentation

◆ vt100_setup()

CNDP_API struct cli_vt100* vt100_setup ( void  )

Create the cli_vt100 structure

Returns
Pointer to cli_vt100 structure or NULL on error

◆ vt100_free()

CNDP_API void vt100_free ( struct cli_vt100 *  vt)

Destroy the cli_vt100 structure

Parameters
vtThe pointer to the cli_vt100 structure.

◆ vt100_parse_input()

CNDP_API int vt100_parse_input ( struct cli_vt100 *  vt,
uint8_t  c 
)

Input a new character.

Parameters
vtThe pointer to the cli_vt100 structure
cThe character to parse for cli_vt100 commands
Returns
-1 if the character is not part of a control sequence -2 if c is not the last char of a control sequence Else the index in vt100_commands[]

◆ vt100_do_cmd()

CNDP_API void vt100_do_cmd ( int  idx)

Detect and execute vt100 command strings (Internal function)

Parameters
idxThe vt100 command index value.

◆ vt100_get_cmds()

CNDP_API struct vt100_cmds* vt100_get_cmds ( void  )

Locate a vt100 command from stdin keys

Returns
Return the type of vt100 command found on stdin.