Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
microrl.h File Reference
#include "microrlConfig.h"
Include dependency graph for microrl.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ring_history_t
struct  microrl_t

Macros

#define true   1
#define false   0
#define KEY_NUL   0
 ^@ Null character
#define KEY_SOH   1
 ^A Start of heading, = console interrupt
#define KEY_STX   2
 ^B Start of text, maintenance mode on HP console
#define KEY_ETX   3
 ^C End of text
#define KEY_EOT   4
 ^D End of transmission, not the same as ETB
#define KEY_ENQ   5
 ^E Enquiry, goes with ACK; old HP flow control
#define KEY_ACK   6
 ^F Acknowledge, clears ENQ logon hand
#define KEY_BEL   7
 ^G Bell, rings the bell...
#define KEY_BS   8
 ^H Backspace, works on HP terminals/computers
#define KEY_HT   9
 ^I Horizontal tab, move to next tab stop
#define KEY_LF   10
 ^J Line Feed
#define KEY_VT   11
 ^K Vertical tab
#define KEY_FF   12
 ^L Form Feed, page eject
#define KEY_CR   13
 ^M Carriage Return
#define KEY_SO   14
 ^N Shift Out, alternate character set
#define KEY_SI   15
 ^O Shift In, resume defaultn character set
#define KEY_DLE   16
 ^P Data link escape
#define KEY_DC1   17
 ^Q XON, with XOFF to pause listings; "okay to send".
#define KEY_DC2   18
 ^R Device control 2, block-mode flow control
#define KEY_DC3   19
 ^S XOFF, with XON is TERM=18 flow control
#define KEY_DC4   20
 ^T Device control 4
#define KEY_NAK   21
 ^U Negative acknowledge
#define KEY_SYN   22
 ^V Synchronous idle
#define KEY_ETB   23
 ^W End transmission block, not the same as EOT
#define KEY_CAN   24
 ^X Cancel line, MPE echoes !
#define KEY_EM   25
 ^Y End of medium, Control-Y interrupt
#define KEY_SUB   26
 ^Z Substitute
#define KEY_ESC   27
 ^[ Escape, next character is not echoed
#define KEY_FS   28
 ^\ File separator
#define KEY_GS   29
 ^] Group separator
#define KEY_RS   30
 ^^ Record separator, block-mode terminator
#define KEY_US   31
 ^_ Unit separator
#define KEY_DEL   127
 Delete (not a real control character...).
#define _HIST_UP   0
#define _HIST_DOWN   1
#define _ESC_BRACKET   1
#define _ESC_HOME   2
#define _ESC_END   3

Functions

void microrl_init (microrl_t *pThis, void(*print)(const char *))
void microrl_set_echo (int)
void microrl_set_complete_callback (microrl_t *pThis, const char **(*get_completion)(int, const char *const *))
void microrl_set_execute_callback (microrl_t *pThis, void(*execute)(int, const char *const *))
void microrl_set_sigint_callback (microrl_t *pThis, void(*sigintf)(void))
void microrl_insert_char (microrl_t *pThis, int ch)

Data Structure Documentation

◆ ring_history_t

struct ring_history_t

Definition at line 56 of file microrl.h.

Data Fields
int begin
int cur
int end
char ring_buf[_RING_HISTORY_LEN]

◆ microrl_t

struct microrl_t

Definition at line 65 of file microrl.h.

Collaboration diagram for microrl_t:
Data Fields
int cmdlen
char cmdline[_COMMAND_LINE_LEN]
int cursor
void(*)(int argc, const char *const *argv) execute
const char **(*)(int argc, const char *const *argv) get_completion
void(*)(const char *) print
char * prompt_str
ring_history_t ring_hist
void(*)(void) sigint
char const * tkn_arr[_COMMAND_TOKEN_NMB]

Macro Definition Documentation

◆ _ESC_BRACKET

#define _ESC_BRACKET   1

Definition at line 49 of file microrl.h.

Referenced by escape_process().

◆ _ESC_END

#define _ESC_END   3

Definition at line 51 of file microrl.h.

Referenced by escape_process().

◆ _ESC_HOME

#define _ESC_HOME   2

Definition at line 50 of file microrl.h.

Referenced by escape_process().

◆ _HIST_DOWN

#define _HIST_DOWN   1

Definition at line 47 of file microrl.h.

Referenced by escape_process(), and microrl_insert_char().

◆ _HIST_UP

#define _HIST_UP   0

Definition at line 46 of file microrl.h.

Referenced by escape_process(), hist_restore_line(), and microrl_insert_char().

◆ false

#define false   0

Definition at line 7 of file microrl.h.

◆ KEY_ACK

#define KEY_ACK   6

^F Acknowledge, clears ENQ logon hand

Definition at line 16 of file microrl.h.

Referenced by microrl_insert_char().

◆ KEY_BEL

#define KEY_BEL   7

^G Bell, rings the bell...

Definition at line 17 of file microrl.h.

◆ KEY_BS

#define KEY_BS   8

^H Backspace, works on HP terminals/computers

Definition at line 18 of file microrl.h.

Referenced by microrl_insert_char().

◆ KEY_CAN

#define KEY_CAN   24

^X Cancel line, MPE echoes !

!!

Definition at line 34 of file microrl.h.

◆ KEY_CR

#define KEY_CR   13

^M Carriage Return

Definition at line 23 of file microrl.h.

Referenced by microrl_insert_char().

◆ KEY_DC1

#define KEY_DC1   17

^Q XON, with XOFF to pause listings; "okay to send".

Definition at line 27 of file microrl.h.

◆ KEY_DC2

#define KEY_DC2   18

^R Device control 2, block-mode flow control

Definition at line 28 of file microrl.h.

◆ KEY_DC3

#define KEY_DC3   19

^S XOFF, with XON is TERM=18 flow control

Definition at line 29 of file microrl.h.

◆ KEY_DC4

#define KEY_DC4   20

^T Device control 4

Definition at line 30 of file microrl.h.

◆ KEY_DEL

#define KEY_DEL   127

Delete (not a real control character...).

Definition at line 43 of file microrl.h.

Referenced by microrl_insert_char().

◆ KEY_DLE

#define KEY_DLE   16

^P Data link escape

Definition at line 26 of file microrl.h.

Referenced by microrl_insert_char().

◆ KEY_EM

#define KEY_EM   25

^Y End of medium, Control-Y interrupt

Definition at line 35 of file microrl.h.

◆ KEY_ENQ

#define KEY_ENQ   5

^E Enquiry, goes with ACK; old HP flow control

Definition at line 15 of file microrl.h.

Referenced by microrl_insert_char().

◆ KEY_EOT

#define KEY_EOT   4

^D End of transmission, not the same as ETB

Definition at line 14 of file microrl.h.

◆ KEY_ESC

#define KEY_ESC   27

^[ Escape, next character is not echoed

Definition at line 37 of file microrl.h.

Referenced by microrl_insert_char().

◆ KEY_ETB

#define KEY_ETB   23

^W End transmission block, not the same as EOT

Definition at line 33 of file microrl.h.

◆ KEY_ETX

#define KEY_ETX   3

^C End of text

Definition at line 13 of file microrl.h.

Referenced by microrl_insert_char().

◆ KEY_FF

#define KEY_FF   12

^L Form Feed, page eject

Definition at line 22 of file microrl.h.

◆ KEY_FS

#define KEY_FS   28

^\ File separator

Definition at line 38 of file microrl.h.

◆ KEY_GS

#define KEY_GS   29

^] Group separator

Definition at line 39 of file microrl.h.

◆ KEY_HT

#define KEY_HT   9

^I Horizontal tab, move to next tab stop

Definition at line 19 of file microrl.h.

Referenced by microrl_insert_char().

◆ KEY_LF

#define KEY_LF   10

^J Line Feed

Definition at line 20 of file microrl.h.

Referenced by microrl_insert_char().

◆ KEY_NAK

#define KEY_NAK   21

^U Negative acknowledge

Definition at line 31 of file microrl.h.

Referenced by microrl_insert_char().

◆ KEY_NUL

#define KEY_NUL   0

^@ Null character

Definition at line 10 of file microrl.h.

◆ KEY_RS

#define KEY_RS   30

^^ Record separator, block-mode terminator

Definition at line 40 of file microrl.h.

◆ KEY_SI

#define KEY_SI   15

^O Shift In, resume defaultn character set

Definition at line 25 of file microrl.h.

◆ KEY_SO

#define KEY_SO   14

^N Shift Out, alternate character set

Definition at line 24 of file microrl.h.

Referenced by microrl_insert_char().

◆ KEY_SOH

#define KEY_SOH   1

^A Start of heading, = console interrupt

Definition at line 11 of file microrl.h.

Referenced by microrl_insert_char().

◆ KEY_STX

#define KEY_STX   2

^B Start of text, maintenance mode on HP console

Definition at line 12 of file microrl.h.

Referenced by microrl_insert_char().

◆ KEY_SUB

#define KEY_SUB   26

^Z Substitute

Definition at line 36 of file microrl.h.

◆ KEY_SYN

#define KEY_SYN   22

^V Synchronous idle

Definition at line 32 of file microrl.h.

◆ KEY_US

#define KEY_US   31

^_ Unit separator

Definition at line 41 of file microrl.h.

◆ KEY_VT

#define KEY_VT   11

^K Vertical tab

Definition at line 21 of file microrl.h.

Referenced by microrl_insert_char().

◆ true

#define true   1

Definition at line 6 of file microrl.h.

Function Documentation

◆ microrl_init()

void microrl_init ( microrl_t * pThis,
void(* print )(const char *) )

◆ microrl_insert_char()

◆ microrl_set_complete_callback()

void microrl_set_complete_callback ( microrl_t * pThis,
const char **(* get_completion )(int, const char *const *) )

Definition at line 353 of file microrl.c.

References microrl_t::get_completion.

Referenced by shellInit().

Here is the caller graph for this function:

◆ microrl_set_echo()

void microrl_set_echo ( int )

◆ microrl_set_execute_callback()

void microrl_set_execute_callback ( microrl_t * pThis,
void(* execute )(int, const char *const *) )

Definition at line 360 of file microrl.c.

References microrl_t::execute.

Referenced by shellInit().

Here is the caller graph for this function:

◆ microrl_set_sigint_callback()

void microrl_set_sigint_callback ( microrl_t * pThis,
void(* sigintf )(void) )

Definition at line 366 of file microrl.c.

References microrl_t::sigint.

Referenced by shellInit().

Here is the caller graph for this function: