Browse Source

Removed SA submodule

Casper Thule 4 years ago
parent
commit
24c7732da5

+ 0 - 3
.gitmodules

@@ -1,3 +0,0 @@
-[submodule "DSL_SemanticAdaptation/be.uantwerpen.ansymo.semanticadaptation.cg.cpp.lib/src/resources/hybridCosimulation-framework"]
-	path = DSL_SemanticAdaptation/be.uantwerpen.ansymo.semanticadaptation.cg.cpp.lib/src/resources/hybridCosimulation-framework
-	url = https://github.com/into-cps/hybridCosimulation-framework.git

+ 0 - 1
DSL_SemanticAdaptation/be.uantwerpen.ansymo.semanticadaptation.cg.cpp.lib/src/resources/hybridCosimulation-framework

@@ -1 +0,0 @@
-Subproject commit e06f64f8885d146ab71f3e91f5acdd1f8d61127f

+ 5 - 5
DSL_SemanticAdaptation/be.uantwerpen.ansymo.semanticadaptation.cg.cpp/pom.xml

@@ -20,13 +20,13 @@
 
 	<dependencies>
 
-		<dependency>
+		<!-- dependency>
 			<groupId>be.uantwerpen.ansymo.semanticadaptation</groupId>
 			<artifactId>be.uantwerpen.ansymo.semanticadaptation.cg.cpp.lib</artifactId>
 			<type>jar</type>
 			<version>${project.version}</version>
 			<scope>compile</scope>
-		</dependency>
+		</dependency-->
 	</dependencies>
 
 	<build>
@@ -39,7 +39,7 @@
 
 
 
-			<plugin>
+			<!-- plugin>
 				<groupId>org.apache.maven.plugins</groupId>
 				<artifactId>maven-dependency-plugin</artifactId>
 				<executions>
@@ -61,7 +61,7 @@
 									<version>${project.version}</version>
 									
 									<overWrite>true</overWrite>
-									<!-- outputDirectory>${project.build.directory}/alternateLocation</outputDirectory> <destFileName>optional-new-name.jar</destFileName -->
+									
 									<destFileName>cppFramework.jar</destFileName>
 								</artifactItem>
 
@@ -75,7 +75,7 @@
 						</configuration>
 					</execution>
 				</executions>
-			</plugin>
+			</plugin-->
 
 
 			

+ 3 - 3
DSL_SemanticAdaptation/be.uantwerpen.ansymo.semanticadaptation.cg.cpp/src/be/uantwerpen/ansymo/semanticadaptation/cg/cpp/generation/CppGenerator.xtend

@@ -286,7 +286,7 @@ class CppGenerator extends SemanticAdaptationGenerator {
 					class «adapClassName» : public SemanticAdaptation<«adapClassName»>, public enable_shared_from_this<«adapClassName»>
 					{
 						public:
-							«adapClassName»(shared_ptr<string> resourceLocation, const fmi2CallbackFunctions* functions);
+							«adapClassName»(shared_ptr<std::string> fmiInstanceName, shared_ptr<string> resourceLocation, const fmi2CallbackFunctions* functions);
 							void initialize();
 							virtual ~«adapClassName»();
 							
@@ -339,8 +339,8 @@ class CppGenerator extends SemanticAdaptationGenerator {
 	def String compileDeAndConstructorAndInitialize(String adapClassName, String fmuName, String fmuTypeName,
 		String guid, String paramsCons, String inCons, String outCons) {
 		return '''
-			«adapClassName»::«adapClassName»(shared_ptr<string> resourceLocation, const fmi2CallbackFunctions* functions) : 
-				SemanticAdaptation(resourceLocation, createInputRules(),createOutputRules(), functions)
+			«adapClassName»::«adapClassName»(shared_ptr<std::string> fmiInstanceName,shared_ptr<string> resourceLocation, const fmi2CallbackFunctions* functions) : 
+				SemanticAdaptation(fmiInstanceName, resourceLocation, createInputRules(),createOutputRules(), functions)
 			{
 				
 				«paramsCons»

+ 4 - 3
DSL_SemanticAdaptation/be.uantwerpen.ansymo.semanticadaptation.cg.cpp/src/be/uantwerpen/ansymo/semanticadaptation/cg/cpp/generation/StaticGenerators.xtend

@@ -35,7 +35,7 @@ class StaticGenerators {
 			std::string m(message);
 			if (g_functions != NULL)
 			{
-				log(g_functions, (void*) 2, "", fmi2Error, "error", (base + m).c_str(), "");
+				log(g_functions, g_adaptation->getComponent(), "", fmi2Error, "error", (base + m).c_str(), "");
 			}
 		}
 		
@@ -44,7 +44,7 @@ class StaticGenerators {
 		{
 			if (g_functions != NULL)
 			{
-				log(g_functions, (void*) 2, name->c_str(), fmi2OK, "logAll", message, arg);
+				log(g_functions, g_adaptation->getComponent(), name->c_str(), fmi2OK, "logAll", message, arg);
 			}
 		}
 		
@@ -59,7 +59,8 @@ class StaticGenerators {
 			g_functions = functions;
 			fmiprintf("instantiating %s\n", instanceName);
 			auto resourceLoc = make_shared<std::string>(URIToNativePath(fmuResourceLocation));
-			g_adaptation = make_shared<adaptation::«adapClassName»>(resourceLoc, functions);
+			auto name  = make_shared<std::string>(instanceName);
+			g_adaptation = make_shared<adaptation::«adapClassName»>(name, resourceLoc, functions);
 			try
 			{
 				g_adaptation->initialize();

+ 1 - 1
DSL_SemanticAdaptation/pom.xml

@@ -16,7 +16,7 @@
 		<module>be.uantwerpen.ansymo.semanticadaptation.tests</module>
 		<module>be.uantwerpen.ansymo.semanticadaptation.ide</module>
 		<module>be.uantwerpen.ansymo.semanticadaptation.ui</module>
-	  <module>be.uantwerpen.ansymo.semanticadaptation.cg.cpp.lib</module>
+	  <!--module>be.uantwerpen.ansymo.semanticadaptation.cg.cpp.lib</module-->
 		<module>be.uantwerpen.ansymo.semanticadaptation.cg.cpp</module>
 	  <module>be.uantwerpen.ansymo.semanticadaptation.cg.cpp.tests</module>
 		<!--module>../my.mavenized.herolanguage.ui</module>