3.1.4.2.2. waf_tools.battery_cell_config_validate.validate_battery_cell_configuration

waf_tools.battery_cell_config_validate.validate_battery_cell_configuration(bld: BuildContext, battery_cell_json: Node) → BatteryCellConfiguration

Validate the battery cell configuration JSON file.

Reads the JSON configuration from the provided node and parses it into a typed BatteryCellConfiguration. This function is intended to be passed as the validator callback to the codegen_config waf feature. The raised error is reported by waf_tools.config_codegen_task.CreateCfgFile, which then fails the task.

Parameters:
  • bld – The active waf build context.

  • battery_cell_json – Node pointing to the battery_cell_cfg.json configuration file.

Returns:

A validated BatteryCellConfiguration instance.

Raises:

InvalidBatteryCellConfigurationError – If a file entry or a required define is missing, or a value has the wrong type.