Command Line Interface

From Embedded Workshop
Revision as of 12:27, 16 November 2020 by JMerkle (talk | contribs) (Created page with "==Command Line Interface== Once you have a serial interface for debug / printf() output, and have the ability to read serial characters entered from a terminal program, you're...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Command Line Interface

Once you have a serial interface for debug / printf() output, and have the ability to read serial characters entered from a terminal program, you're ready to implement a command line interface.
Why a Command Line Interface?

Main reason - control
With the command line interface, you can interact with different functionality you've created within your project,
testing many of your functions, and validating your recently added code.

Components needed:

Serial character input method
Line buffer editor - minimal
Line buffer parser - split the command line up into words, with the expectation that the first word
  is a command, with any following words being command line parameters/arguments
Command table with expected number of arguments count
Argument/word counter - argc
Array of character pointers - argv