Skip to main content
Skip to main content

VehicleConfigurationDataDependentConfig

VehicleConfigurationDataDependentConfig

Description

Adds the possibility to set other configs as dependent configurations to a configuration.

Functions

loadConfigItem

Description

Definition

loadConfigItem()

Arguments

anyconfigItem
anyxmlFile
anybaseKey
anyconfigKey
anybaseDirectory
anycustomEnvironment

Code

function VehicleConfigurationDataDependentConfig.loadConfigItem(configItem, xmlFile, baseKey, configKey, baseDirectory, customEnvironment)
configItem.dependentConfigurations = { }

for _, key in xmlFile:iterator(configKey .. ".dependentConfiguration" ) do
local dependentConfiguration = { }
dependentConfiguration.name = xmlFile:getValue(key .. "#name" )
dependentConfiguration.index = xmlFile:getValue(key .. "#index" )
if dependentConfiguration.name ~ = nil and dependentConfiguration.index ~ = nil then
table.insert(configItem.dependentConfigurations, dependentConfiguration)
end
end
end

registerXMLPaths

Description

Definition

registerXMLPaths()

Arguments

anyschema
anyrootPath
anyconfigPath

Code

function VehicleConfigurationDataDependentConfig.registerXMLPaths(schema, rootPath, configPath)
schema:register(XMLValueType.STRING, configPath .. ".dependentConfiguration(?)#name" , "Name of the other configuration to set" )
schema:register(XMLValueType.INT, configPath .. ".dependentConfiguration(?)#index" , "Index of the configuration to use" )
end