2.1.3.2.2. cli.cmd_bms.bms_shell.BMSShell
- class cli.cmd_bms.bms_shell.BMSShell(completekey='tab', stdin=None, stdout=None)
Class that defines the custom bms shell
- __init__(completekey='tab', stdin=None, stdout=None)
Instantiate a line-oriented interpreter framework.
The optional argument ‘completekey’ is the readline name of a completion key; it defaults to the Tab key. If completekey is not None and the readline module is available, command completion is done automatically. The optional arguments stdin and stdout specify alternate input and output file objects; if not specified, sys.stdin and sys.stdout are used.
Methods
__init__
([completekey, stdin, stdout])Instantiate a line-oriented interpreter framework.
cmdloop
([intro])Repeatedly issue a prompt, accept input, parse an initial prefix off the received input, and dispatch to action methods, passing them the remainder of the line as argument.
columnize
(list[, displaywidth])Display a list of strings as a compact set of columns.
complete
(text, state)Return the next possible completion for 'text'.
complete_help
(*args)completedefault
(*ignored)Method called to complete an input line when no command-specific complete_*() method is available.
completenames
(text, *ignored)default
(line)Method called on an input line when the command is not recognized.
do_boottimestamp
(_)Requests the Boot Timestamp
do_buildconfig
(_)Gets the Build Configuration
do_commithash
(_)Gets the Commit Hash the software version was built with
do_exit
(_)Terminates the child process, stops the shell and exits.
do_fram
(_)Reinitializes the FRAM
do_getrtc
(_)Gets the rtc time
do_help
(arg)List available commands with "help" or detailed help with "help cmd".
do_init
(_)Starts the receive and send process, the read process and initializes the CAN bus.
do_log
(arg)Logs message with the given ID as often as specified: LOG [ID] [#, DEFAULT: 1]
do_mcuid
(_)Gets the unique ID of the MCU
do_mculotnumber
(_)Gets the lot number of the MCU
do_mcuwaferinfo
(_)Gets the wafer information of the MCU
do_rtc
(_)Sets the rtc time to the current time
do_softwarereset
(_)Triggers a software reset
do_softwareversion
(_)Gets the software version of the BMS
do_uptime
(_)Get the Uptime information
emptyline
()Called when an empty line is entered in response to the prompt.
get_names
()onecmd
(line)Interpret the argument as though it had been typed in response to the prompt.
parseline
(line)Parse the line into a command name and a string containing the arguments.
postcmd
(stop, line)Hook method executed just after a command dispatch is finished.
postloop
()Hook method executed once when the cmdloop() method is about to return.
precmd
(line)Converts the input to lowercase.
preloop
()Hook method executed once when the cmdloop() method is called.
print_topics
(header, cmds, cmdlen, maxcol)Attributes
doc_header
doc_leader
identchars
initialized
intro
lastcmd
misc_header
msg_id
msg_num
network_ok
nohelp
prompt
rec_q
ruler
send_q
undoc_header
use_rawinput
bus_cfg
p_recv
p_read