3.1.4.2.1. waf_tools.battery_cell_config_validate.parse_battery_cell_config
- waf_tools.battery_cell_config_validate.parse_battery_cell_config(cfg: dict) BatteryCellConfiguration
Parse a raw JSON dictionary into a validated battery cell configuration.
Extracts the
#defineentries forbattery_cell_cfg.handbattery_cell_cfg.cfrom the configuration dictionary and maps them to the corresponding typed dataclasses. The define name expected for each field is derived as described inparse_defines_to_dataclass().- Parameters:
cfg – Parsed JSON content of
battery_cell_cfg.json, expected to contain afileslist with entries forbattery_cell_cfg.handbattery_cell_cfg.c.- Returns:
A fully populated and validated
BatteryCellConfigurationinstance.- Raises:
InvalidBatteryCellConfigurationError – If a required define is missing or a value does not match the expected type.