1.2.3.1 How the Library Works

Abstraction Model

The Command Processor System Service is a module that works closely with the Console System Service to present a user interface command prompt.

sys_command_abstraction_model

Working Flow

Initialization and Reinitialization

Initialization of the Command Processor System Service initializes the status of the module and sets the state of the internal state machine.

The Command Processor Status and Tasks routines are required for the normal operation of the service.

Adding Commands

The Command Processor System Service will accept commands dynamically during run-time through the follow interface:

SYS_COMMAND_ADDGRP(const _SYS_CMD_DCPT* pCmdTbl, int nCmds, const char* groupName, const char* menuStr)

Command Prompt

In conjunction with the Console System Service, the Command Processor System Service provides the user with an ASCII command prompt.

It will interpret the commands entered at the prompt and process accordingly. It also supports command history, as well as command help.