2.1.22.8. cli.helpers.misc

Miscellaneous helper functions and path definitions for foxBMS utilities.

This module provides helper functions for environment setup, logging configuration, hashing, and path management, as well as constants for important foxBMS file locations.

cli.helpers.misc.DISABLE_LOGGING_FOR_MODULES

Modules where logging should be disabled.

cli.helpers.misc.PROJECT_ROOT

Path to the root of the project repository.

cli.helpers.misc.PROJECT_BUILD_ROOT

Path to the project’s build directory.

cli.helpers.misc.PATH_FILE

Path to the platform-specific paths file.

cli.helpers.misc.FOXBMS_ELF_FILE

Path to the foxBMS ELF file.

cli.helpers.misc.FOXBMS_BIN_FILE

Path to the foxBMS binary file.

cli.helpers.misc.FOXBMS_APP_CRC_FILE

Path to the foxBMS CRC CSV file.

cli.helpers.misc.FOXBMS_APP_INFO_FILE

Path to the foxBMS CRC info JSON file.

cli.helpers.misc.APP_DBC_FILE

Path to the application DBC file.

cli.helpers.misc.BOOTLOADER_DBC_FILE

Path to the bootloader DBC file.

Functions

create_pre_commit_file()

Add or update a pre-commit file in the .git/hooks directory.

file_name_from_current_time()

Create a file-system-friendly ISO timestamp as a Path.

get_multiple_files_hash_str(files[, buffer_size])

Return the hexadecimal SHA256 hash string for multiple files.

get_project_root([path])

Find the repository root directory.

get_sha256_file_hash(file_path[, ...])

Calculate the SHA256 hash of a file.

get_sha256_file_hash_str(file_path[, ...])

Return the hexadecimal SHA256 hash string of a file.

ignore_third_party_logging()

Disable logging for specific third-party modules, except for errors.

initialize_path_variable_for_foxbms()

Add expected foxBMS paths to the PATH environment variable.

set_logging_level([verbosity, _format, datefmt])

Configure the logging level and format for the module.

set_other_environment_variables_for_foxbms()

Set environment variables according to foxBMS specifications.

terminal_link_print(link)

Create a clickable hyperlink string for terminal output.