3.1.10. waf_tools.bms_config_validate

Validate the foxBMS BMS configuration file.

This module provides the top-level validation entry point for the bms.json configuration file used by the foxBMS build system. It reads the JSON configuration, parses it into the typed waf_tools.bms_config_model.System data model, and aborts the build with a descriptive error message if the configuration is invalid.

The actual validation of the individual configuration domains is performed by the dataclasses of bms_config_model:

  • Application - Aerosol sensor, current sensor, IMD, state estimation algorithms (SOC, SOE, SOF, SOH), balancing strategy, redundancy.

  • RTOS - Real-time operating system name and addons.

  • BMS-Slave - Analog front-end IC and temperature sensor incl. evaluation method.

  • Debug - Enabled debug interfaces.

It serves as the single entry point called from waf build scripts to obtain a validated system configuration object before code generation and environment setup proceed.

3.1.10.1. Usage

Call validate_bms_configuration() during the waf build phase:

bms_config_node = bld.srcnode.find_node(bld.env.BMS_CONFIG)
system = bms_config_validate.validate_bms_configuration(bld, bms_config_node)
bms_config_generate.set_env_variables(bld, system)

The returned waf_tools.bms_config_model.System instance is then passed to waf_tools.bms_config_generate.set_env_variables() to populate the build environment and used to create foxbms_config task generators.

3.1.10.2. Dependencies

Functions

validate_bms_configuration(bld, bms_config_node)

Validate the BMS configuration JSON file.