#1643 closed enhancement (fixed)
CLI integration
Reported by: | riza | Owned by: | bennylp |
---|---|---|---|
Priority: | normal | Milestone: | release-2.2 |
Component: | pjlib-util | Version: | trunk |
Keywords: | Cc: | ||
Backport to 1.x milestone: | Backported: | no |
Description (last modified by riza)
A CLI framework features an interface for defining command specification, parsing, and executing a command.
Features
- Portable across desktop (windows, macosx, linux, etc) and mobile platforms (symbian, windows mobile, iphone, android, etc.)
- User may access the UI by telneting to the app, and be able to operate the app as if it's a desktop app
Enhancements to existing console UI
- Command (auto)completion, e.g. one can specify "makecall" or "make" or "m". The system will detect if a fraction of a word makes up unique command
- arguments completion, i.e. user may specify the arguments together with the command, or if not, he will be asked to provide them.
- command history (the use of up and down arrow)
Telnet interface
- will provide interface exactly the same as console interface on desktop
- may provide different logging level for each client
Command specification
The command specification includes:
- Definition in an xml file
- Command/argument name
- Command/argument id
- Argument data type (int, string, choice)
- Argument mandatory type (optional/mandatory)
- Text description (to show in help screen)
- Each command could contain argument list or other command
- Callback handler
XML example of a command specification:
<CMD name='vid' id='0' desc=""> <CMD name='help' id='0' desc='' /> <CMD name='enable' id='0' desc='' /> <CMD name='disable' id='0' desc='' /> <CMD name='call' id='0' desc='' > <CMD name='add' id='101' desc='...' /> <CMD name='cap' id='102' desc='...' > <ARG name='streamno' type='int' desc='...' id='1'/> <ARG name='devid' type='int' optional='1' id='2'/> </CMD> </CMD> </CMD> <CMD name='disable_codec' id=0 desc=""> <ARG name='codec_list' type='choice' id='3'> <CHOICE value='g711'/> <CHOICE value='g722'/> </ARG> </CMD>
Change History (13)
comment:1 Changed 12 years ago by riza
- Description modified (diff)
comment:2 Changed 12 years ago by riza
comment:3 Changed 12 years ago by bennylp
In 4459:
comment:4 Changed 12 years ago by riza
In 4461:
comment:5 Changed 11 years ago by riza
In 4476:
comment:6 Changed 11 years ago by riza
In 4489:
comment:7 Changed 11 years ago by riza
In 4513:
comment:8 Changed 11 years ago by riza
In 4522:
comment:9 Changed 11 years ago by riza
In 4525:
comment:10 Changed 11 years ago by riza
In 4589:
comment:11 Changed 11 years ago by riza
In 4634:
comment:12 Changed 11 years ago by bennylp
- Resolution set to fixed
- Status changed from new to closed
comment:13 Changed 11 years ago by ming
In 4752:
Note: See
TracTickets for help on using
tickets.
In 4440: