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 thevalidatorcallback to thecodegen_configwaf feature. The raised error is reported bywaf_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.jsonconfiguration file.
- Returns:
A validated
BatterySystemConfigurationinstance.- Raises:
InvalidBatterySystemConfigurationError – If a file entry or a required define is missing, or a value has the wrong type.