1.1.3.4.1. cli.cmd_bootloader.bootloader_can.BootloaderInterfaceCan

class cli.cmd_bootloader.bootloader_can.BootloaderInterfaceCan(can_bus: VirtualBus | PcanBus | BusABC)

This class implements all CAN relevant functions and can be used to wait ” or receive specified messages on CAN bus.

__init__(can_bus: VirtualBus | PcanBus | BusABC)

Init function.

Parameters:

can_bus – CAN bus object

Methods

__init__(can_bus)

Init function.

get_bootloader_state()

Ask bootloader for its current state.

get_bootloader_version_num()

Get the bootloader's version number.

get_current_num_of_loops()

Ask the bootloader to get its current number of data transfer loops.

get_foxbms_state()

Get the current state of foxBMS application if it is running.

reset_bootloader([time_to_wait, num_of_repeat])

Reset bootloader.

run_app_on_bootloader()

Run the BMS application on the BMS-Master (i.e., jump from the bootloader into the application via BMS state request.)

send_crc(crc_8_bytes[, is_crc_of_vector_table])

Send crc signature to bootloader and get the feedback from bootloader.

send_data_to_bootloader(data_8_bytes)

Send data in 8 bytes to bootloader.

send_loop_number_to_bootloader(num_of_loop)

Send the current loop number of the to-be-transferred data to bootloader.

send_program_info(len_of_program_in_bytes, ...)

Send program info to bootloader and check its states.

start_transfer()

Inform bootloader to start the transfer program process.

wait_can_ack_msg(acknowledge_msg[, ...])

Wait for a certain ACK message.