weAut_01 / weAutSys    R 2.2.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines
Data Fields
cliThr_data_t Struct Reference

Data Fields

uint8_t commandEnd
 end of command (=first token) if any
uint8_t commandStart
 start of command (=first token) if any
uint8_t commNumb
 The command number of first token.
hierThr_data_t infoThread
 information threads and flags
uint8_t length
 number of characters in line
char line [LEN_OF_CLITHR_LINE+1]
 the input line (LEN_OF_CLITHR_LINE)
uint8_t optionNumb
 The option number of first parameter or second token.
outFlashTextThr_data_t outFlashTextThread
 for flash text output
uint8_t paramEnd
 end of first parameter (=second / third token) if any
uint8_t paramStart
 start of first parameter (=second / third token) if any
pt_t pt
 The (raw) protothread data structure for the user CLI thread.
FILE * repStreams
 The streams used for output, report, reply.
pt_t systCLIpt
 The (raw) protothread data structure for the system CLI thread.

Detailed Description

The organisational data for a command line interpreter (CLI) thread.

See also:
registerAppCliThread
appCliThreadF
appCliThread
modThr_data_t
Examples:
main.c.

Field Documentation

uint8_t commNumb

The command number of first token.

If found by setCliLine() in the userCommands the value will be the index found there (starting at 0). If found in the systemCommands the value will be that found index + INDEX_OFFSET_LIST2.

255 means no matching token found. 254 says the command was ambiguously abbreviated. 0 is used as no command or nothing (else) to do. That schema is consistent with thr_data_t .flag usage.

Examples:
main.c.
uint8_t optionNumb

The option number of first parameter or second token.

If a second token was found by setCliLine() (and set in paramStart, paramEnd) and this parameter starts with a - (minus) followed by a non digit character it will be matched against a list of standard options. If a non ambiguous match is found optionNumb will be set to its number and paramStart will be set to the next parameter (third token) if found or to to 255. paramEnd will be set to the third token's end if given or stay at the option parameters end.

optNotGivenNum (255) means no matching option found. optAmbigousNum (254) says the option was ambiguously abbreviated. In those two cases paramStart and paramEnd still point to the (non) option parameter.

Examples:
main.c.

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