All of
 help / color / mirror / Atom feed
From: "Wiles, Keith" <>
To: Olivier Matz <>
Cc: Jerin Jacob <>,
	"" <>,
	"" <>
Subject: Re: next technical board meeting, 2017-04-06
Date: Fri, 31 Mar 2017 14:39:23 +0000	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

Here is a few advantages to CLI:

A couple big advantages I see are:
  - CLI supports commands, files, aliases, directories.
    - The alias command is just a string using a simple substitution support for other other commands similar to the bash shell like alias commands.
    - Files can be static or dynamic information, can be changed on the fly and saved for later. The file is backed with a simple function callback to allow the developer to update the content or not.
  - Added support for color and cursor movement APIs similar to Pktgen if needed by the developer.
  - It is a work alike replacement for cmdline library. Both cmdline and CLI can be used in the same application if care is taken.
  - Uses a simple fake like directory layout for command and files. Allowing for command hierarchy as path to the command can allow for specific targets to be identified without having to state it on the command line. 
  - Has auto-complete for commands, similar to Unix/Linux autocomplete and provides support for command option help as well.
  - Callback functions for commands are simply just argc/argv like functions. The CLI does not convert arguments for the user, it is up to the developer to decode the argv[] values.
    - Most of the arguments converted in the current cmdline are difficult to use or not required as the developer just picks string type and does the conversion himself.
  - Dynamically be able to add and remove commands, directories, files and aliases, does not need to be statically compiled into the application.
  - No weird structures in the code and reduces the line count for testpmd from 11K to 4K lines. I convert testpmd to have both CMDLINE and CLI with a command line option.
  - Two methods to parse command lines, first is the standard argc/argv method in the function. The second method is to use a map of strings with simple printf like formatting to detect which command line the user typed. An ID value it returned to the used to indicate which mapping string was found to make the command line to be used in a switch statement.
  - Central help support if needed (optional).


  reply	other threads:[~2017-03-31 14:39 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-30  9:41 next technical board meeting, 2017-04-06 Jerin Jacob
2017-03-30 14:25 ` Wiles, Keith
2017-03-30 15:05   ` Olivier Matz
2017-03-30 15:51     ` Wiles, Keith
2017-03-30 16:03       ` Jay Rolette
2017-03-30 18:09         ` Dumitrescu, Cristian
2017-04-03 19:51           ` Stephen Hemminger
2017-04-03 22:53             ` Wiles, Keith
2017-04-04  1:28               ` Stephen Hemminger
2017-04-04  5:01                 ` Vincent Jardin
2017-04-04 14:35                   ` Wiles, Keith
2017-03-31  8:52       ` Olivier Matz
2017-03-31  9:31         ` Dumitrescu, Cristian
2017-03-31 14:24         ` Wiles, Keith
2017-03-31 14:39           ` Wiles, Keith [this message]
2017-04-06 10:01 ` Jerin Jacob
2017-04-10  6:49   ` next technical board meeting, 2017-04-10 Yuanhan Liu
2017-04-10 14:34     ` Wiles, Keith
2017-04-10 14:43       ` Dumitrescu, Cristian
2017-04-10 14:54         ` Wiles, Keith

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.