3.1.6.2.2. waf_tools.battery_system_config_validate.validate_battery_system_configuration

waf_tools.battery_system_config_validate.validate_battery_system_configuration(bld: BuildContext, battery_system_json: Node) → BatterySystemConfiguration

Validate the battery system configuration JSON file.

Reads the JSON configuration from the provided node and parses it into a typed BatterySystemConfiguration. 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_system_json – Node pointing to the battery_system_cfg.json configuration file.

Returns:

A validated BatterySystemConfiguration instance.

Raises:

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