3.1.6.2.1. waf_tools.battery_system_config_validate.parse_battery_system_config
- waf_tools.battery_system_config_validate.parse_battery_system_config(cfg: dict) BatterySystemConfiguration
Parse a raw JSON dictionary into a validated battery system configuration.
Extracts the
#defineentries forbattery_system_cfg.hfrom 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_system_cfg.json, expected to contain afileslist with an entry forbattery_system_cfg.h.- Returns:
A fully populated and validated
BatterySystemConfigurationinstance.- Raises:
InvalidBatterySystemConfigurationError – If a required define is missing or a value does not match the expected type.