public void GenerateRteEnvironment(ComponentDefenition compDef, String outputDir) { /* Generate Rte_<ComponentName>.h file */ RteComponentGenerator compGenerator = new RteComponentGenerator(); compGenerator.CreateRteIncludes(outputDir, compDef); /* Generate Rte_DataTypes.h file */ RteDataTypesGenerator datatypeGenerator = new RteDataTypesGenerator(); datatypeGenerator.GenerateDataTypesFile(outputDir); /* Generate SystemErrors.h */ SystemErrorGenerator systemErrorGenerator = new SystemErrorGenerator(); systemErrorGenerator.GenerateSystemErrorsFile(outputDir); GenerateTestRteHFile(compDef, outputDir); GenerateTestRteCFile(compDef, outputDir); GenerateTestInitializationFile(compDef, outputDir); ReturnCodesGenerator returnCodesGenerator = new ReturnCodesGenerator(); returnCodesGenerator.GenerateReturnCodesFile(outputDir); }
void TestForComplexDependency() { ComplexDataTypesList allCDT = new ComplexDataTypesList(); allCDT.Capacity = autosarApp.ComplexDataTypes.Count; allCDT.AddRange(autosarApp.ComplexDataTypes); RteDataTypesGenerator.RemoveDataTypesWithoutDependencies(allCDT); bool result = RteDataTypesGenerator.SortDependenciedCDT(allCDT); if (!result) { String strRes = "There are recursion dependencies in components: " + Environment.NewLine; foreach (ComplexDataType cdt in allCDT) { strRes += cdt.Name + Environment.NewLine; } AppendText(strRes, Error: true); } }