Closed CThuleHansen closed 2 years ago
HashMap<String, List<InitializeStatusModel.LogLevelModel>> logcategoryKeyToLogCategories = new HashMap<>();
// Load the FMUs
for (Map.Entry<String, String> fmuKeyToFmuURI : body.getFmus().entrySet()) {
IFmu iFmu = FmuFactory.create(fmuKeyToFmuURI.getValue());
Fmi2ModelDescription fmi2ModelDescription = new Fmi2ModelDescription(iFmu.getModelDescription());
List<ModelDescription.LogCategory> logCategories = fmi2ModelDescription.getLogCategories();
logcategoryKeyToLogCategories.put(fmuKeyToFmuURI.getKey(),
logCategories.stream().map(x -> new InitializeStatusModel.LogLevelModel(x.getName(), x.toString())).collect(Collectors.toList()));
}
return new InitializeStatusModel("initialized", sessionId, logcategoryKeyToLogCategories, 0);
Initialize is supposed to return the loglevels from all the FMUs, but currently it does not in maestro2.