3.1.19.2.2. waf_tools.diag_array_config_validate.validate_diag_array_configuration
- waf_tools.diag_array_config_validate.validate_diag_array_configuration(bld: BuildContext, diag_array_json: Node) DiagArrayConfiguration
Validate the diagnostic array configuration file.
Reads the JSON configuration, parses it into a typed
DiagArrayConfiguration, and cross-checks the configured events against theDIAG_ID_eenumeration indiag_cfg.has well as theFatalErrorCodesignal choices infoxbms.dbc.This function shall be called in the build phase and is intended to be passed as the
validatorcallback 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.
diag_array_json – Node pointing to the
diag_array_cfg.jsonconfiguration file.
- Returns:
Validated diagnostic array configuration.
- Return type:
- Raises:
InvalidDiagConfigurationError – If
diag_cfg.hor the DBC file cannot be found, the configuration is invalid, or it is inconsistent withdiag_cfg.hor the DBC file.ValueError – If the number of configured events differs the number of
DIAG_ID_eenumerators.