openbcm

Git mirror of https://github.com/Broadcom-Network-Switching-Software/OpenBCM
git clone git://git.finwo.net/mirror/broadcom/openbcm
Log | Files | Refs | README

ui_consts.h (4085B)


      1 /* 
      2  * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
      3  * 
      4  * Copyright 2007-2020 Broadcom Inc. All rights reserved.
      5 */
      6 
      7 
      8 #ifndef __UI_CONSTS_H_INCLUDED__
      9 /* { */
     10 #define __UI_CONSTS_H_INCLUDED__
     11 
     12 #ifdef  __cplusplus
     13 extern "C" {
     14 #endif
     15 
     16 
     17 /*
     18  * Special editing characters: ASCII codes.
     19  */
     20 /*
     21  * CTRL-A
     22  */
     23 #define DEBUG_INFO             0x01
     24 /*
     25  * CTRL-B
     26  */
     27 /*
     28  * CTRL-C
     29  */
     30 #define CTRL_C                 0x03
     31 #define FLUSH_STD_OUTPUT       CTRL_C
     32 /*
     33  * Ctrl-e. Enter 'no echo' mode
     34  */
     35 #define CTRL_E                 0x05
     36 #define ENTER_ECHO_MODE_OFF    CTRL_E
     37 /*
     38  * Ctrl-F. Enter 'echo' mode
     39  */
     40 #define CTRL_F                 0x06
     41 #define ENTER_ECHO_MODE_ON     CTRL_F
     42 /*
     43  * CTRL-H
     44  */
     45 #define BACK_SPACE             0x08
     46 /*
     47  * CTRL-I
     48  */
     49 #define TAB                    0x09
     50 /*
     51  * CTRL-J
     52  */
     53 #define LINE_FEED              0x0A
     54 /*
     55  * CTRL-K
     56  */
     57 #define CLEAR_LINE             0x0B
     58 /*
     59  * CTRL-M
     60  */
     61 #define CARRIAGE_RETURN        0x0D
     62 /*
     63  * CTRL-T
     64  */
     65 #define CLEAR_TYPE_AHEAD       0x14
     66 /*
     67  * Ctrl-U. Equivalent of 'up-arrow'
     68  */
     69 #define CTRL_U                 0x15
     70 #define CTRL_H                 0x48
     71 
     72 /*
     73  * Ctrl-d. Equivalent of 'down-arrow'
     74  */
     75 #define CTRL_D                 0x04
     76 #define CTRL_P                 0x50
     77 
     78 #define DOWN_ARROW             CTRL_H
     79 #define UP_ARROW               CTRL_P
     80 
     81 #define CTRL_Q                 0x11
     82 #define RESTART_TERMINAL       CTRL_Q
     83 #define EXIT_TERMINAL          '`'
     84 
     85 /*
     86  * Escape key
     87  */
     88 #define ESC                    0x1B
     89 /*
     90  * Space
     91  */
     92 #define BLANK_SPACE            0x20
     93 /*
     94  * Quotation mark (for text with spaces)
     95  */
     96 #define QUOTATION_MARK         0x22
     97 /*
     98  * Dollar sign (special character for marking space and
     99  * for marking specila fields)
    100  */
    101 #define SPECIAL_DOLLAR         0x24
    102 #define SPECIAL_DOLLAR_STRING  "$"
    103 /*
    104  * Single quotation mark (for text within text)
    105  */
    106 /*
    107  * Question mark (for help)
    108  */
    109 #define QUESTION_MARK          0x3F
    110 /*
    111  * DEL key (on PC)
    112  */
    113 #define DEL_KEY                0x7F
    114 /*
    115  * Maximal number of characters in any symbol in this
    116  * system (including ending null). Must be larger
    117  * than maximal number of characters in any field
    118  * on current line.
    119  */
    120 #define MAX_SIZE_OF_SYMBOL      50
    121 /*
    122  * BELL character on ansi chracter table.
    123  */
    124 #define BELL_CHAR               ((char)(0x7))
    125 /*
    126  * Maximal number of characters in text input variable
    127  * (including ending null).
    128  */
    129 #define MAX_SIZE_OF_TEXT_VAR           140
    130 /*
    131  * Maximal number of parameter strings on one line.
    132  */
    133 #define MAX_PARAM_NAMES_ON_LINE 50
    134 /*
    135  * Maximal number of parameters per one subject.
    136  * This system will only accept that many parameters
    137  * from input rom arrays.
    138  */
    139 #define MAX_PARAMS_PER_SUBJECT         2800
    140 /*
    141  * Maximal number of values per one parameter.
    142  * This system will only accept that many values
    143  * from input rom arrays.
    144  */
    145 #define MAX_VALUES_PER_PARAM           400
    146 /*
    147  * Maximal number of characters per help one value.
    148  */
    149 #define MAX_CHAR_PER_HELP_PER_VALUE    (80*3)
    150 /*
    151  * Maximal number of subjects in this system.
    152  * This system will only accept that much subjects
    153  * from input rom arrays.
    154  */
    155 #define MAX_SUBJECTS_IN_UI             100
    156 /*
    157  * Maximal number of parameter strings and corresponding
    158  * values on one line.
    159  */
    160 #define MAX_PARAMS_VAL_PAIRS_ON_LINE   300
    161 /*
    162  * Maximal number of times a value can be repeated
    163  * for one parameter (e.g. 'data' on 'mem write' command).
    164  */
    165 #define MAX_REPEATED_PARAM_VAL         300
    166 /*
    167  * The size of screen (terminal) line.
    168  */
    169 #define MAX_CHARS_ON_SCREEN_LINE       79
    170 /*
    171  * Maximal number of characters acceptable on one line.
    172  * One line is 4 screen lines
    173  */
    174 #define MAX_CHARS_ON_LINE    MAX_CHARS_ON_SCREEN_LINE*15
    175 /*
    176  * Maximal number of characters on a null terminated string
    177  * representing IP address. Add 2 bytes as spare.
    178  */
    179 #define MAX_IP_STRING (4*3+3+1+2)
    180 #define BROADCAST_IP 0xFFFFFFFF
    181 #define INVALID_UNICAST_IP  (BROADCAST_IP)
    182 #define DEFAULT_DOWNLOAD_IP (INVALID_UNICAST_IP)
    183 
    184 
    185 #ifdef  __cplusplus
    186 }
    187 #endif
    188 
    189 
    190 /* } __UI_CONSTS_H_INCLUDED__*/
    191 #endif