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 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_cell_json – Node pointing to the
battery_cell_cfg.jsonconfiguration file.
- Returns:
A validated
BatteryCellConfigurationinstance.- Raises:
InvalidBatteryCellConfigurationError – If a file entry or a required define is missing, or a value has the wrong type.