SystemDescription Access
The systemDescription API provides methods to retrieve system description data like the path to the flat extract or the flat map instance.
It is grouped by the AUTOSAR version. So the getAutosar4() methods provides access to AUTOSAR 4 model elements.
The getPaths() provides common paths to elements like:
- FlatMap path
- FlatExtract path
- FlatCompositionType path
Get the FlatExtract and FlatMap paths by the SystemDescription API
AsrPath flatExtractPath = systemDescription.paths.flatExtractPath
AsrPath flatMapPath = systemDescription.paths.flatMapPath
Get FlatExtract instance by the SystemDescription API
systemDescription{
autosar4{
flatExtract.ifPresent{ theFlatExtract ->
// do something with the flatMap
}
}
}
// Or in property style
def theFlatExtractOpt = systemDescription.autosar4.flatExtract
if(theFlatExtractOpt){
def theFlatExtract = theFlatExtractOpt.get()
}