1.1.3.5.1. cli.cmd_bootloader.bootloader_can_basics.BootloaderCanBasics
- class cli.cmd_bootloader.bootloader_can_basics.BootloaderCanBasics(can_bus: VirtualBus | PcanBus | BusABC, dbc_file: Path = WindowsPath('D:/_github/foxbms-2/tools/dbc/foxbms-bootloader.dbc'))
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, dbc_file: Path = WindowsPath('D:/_github/foxbms-2/tools/dbc/foxbms-bootloader.dbc'))
Init function.
- Parameters:
can_bus – CAN bus object
Methods
__init__
(can_bus[, dbc_file])Init function.
send_can_message_to_bootloader
(*args)The function is to send any CAN messages contained in the dbc file.
send_crc_to_bootloader
(crc_8_bytes)The function is to send a CRC CAN message (8 bytes) to bootloader.
send_data_to_bootloader
(data_8_bytes)The function is to send a data CAN message (8 bytes) to bootloader.
send_loop_number_to_bootloader
(num_of_loop)Send loop number CAN message to bootloader.
send_request_to_bootloader
(request_code)The function is to send a request CAN message to bootloader.
send_transfer_program_info_to_bootloader
(...)The function is to send a transfer process info CAN message to the bootloader.
wait_bootloader_state_msg
()Waits for the CAN messages containing the state of bootloader.
wait_bootloader_version_info_msg
()This function is to wait for the messages contain the version information of the bootloader.
wait_can_ack_msg
(acknowledge_msg[, ...])Wait for a certain CAN acknowledge message
wait_can_message
(arbitration_id[, dbc_file, ...])This function wait for a specified CAN message.
wait_data_transfer_info_msg
()This function is to wait for the messages contain the information of the data transfer.