The ECU’s I make all have a small CLI included to execute a selection of commands including set/get commands accessing the dictionary. This started as a proprietary addition on 3 x CAN Hub, but is beeing upgraded to become standard on all as a minimal shell language. It is actually three modules involved as I have CLI, CLIParser and Dictionary. The initial scope was debugging, but I soon realized that this was a great way to do config as well. Below is a list of commands currently supported.
set <variable> <value>
Variable syntax is name of variable as listed in dictionary. tables use table[index].column format. Modules add another module[n]. in front so if you want to access variable x in table y on module 1 that is “module[1].y[n].x“.
get <variable>
See “set” for <vaiable> syntax. Will print the value of the variable on the console.
list
Will list all variables available.
reboot
Reboot system.
stats on/off
Will start or stop statistics.
module n on/off
Switch on/off selecte module.
help
Will display list of commands.
debug …. on/off
Switch debug prints on/off.
save/load …
Save/load config
download …
download new firmware- TBD
Other commands exist and will be added in time, but the majority of work is the set/get commands. This needs to be kept at a minimum. One candidate is file system commands to access flash and SD card, but I need to think about that. One option is to implement a reduced Linux syntax. I will need to use a few #ifdef’s so that I can start with a bare minimu (set/get etc) and extend based on available space.