Explorar o código

fmu being loaded with a warning, and libraries added

Claudio Gomes %!s(int64=6) %!d(string=hai) anos
pai
achega
5513eadcc7

+ 0 - 11
.gitignore

@@ -1,17 +1,6 @@
 # ---> Java
 *.class
 
-# Mobile Tools for Java (J2ME)
-.mtj.tmp/
-
-# Package Files #
-*.jar
-*.war
-*.ear
-
-# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
-hs_err_pid*
-
 /HintCO/bin/
 /HintCO/xtend-gen/
 /HintCO/instances/generated

+ 4 - 1
HintCO/.classpath

@@ -2,14 +2,17 @@
 <classpath>
 	<classpathentry kind="src" path="src-gen"/>
 	<classpathentry kind="src" path="lib/nativebinaries"/>
+	<classpathentry kind="src" path="resources"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="src" path="xtend-gen"/>
 	<classpathentry kind="src" path="test"/>
-	<classpathentry kind="lib" path="lib/fmi2.jar"/>
+	<classpathentry kind="lib" path="lib/fmi2.jar" sourcepath="lib/fmi2-sources.zip"/>
 	<classpathentry kind="lib" path="lib/jnifmuapi.jar" sourcepath="lib/jnifmuapi-sources.jar"/>
 	<classpathentry kind="lib" path="lib/slf4j-api.jar" sourcepath="lib/slf4j-api-sources.jar"/>
 	<classpathentry kind="lib" path="lib/slf4j-simple.jar" sourcepath="lib/slf4j-simple-sources.jar"/>
+	<classpathentry kind="lib" path="lib/commons-compress-1.18.jar" sourcepath="lib/commons-compress-1.18-sources.jar"/>
+	<classpathentry kind="lib" path="lib/commons-io-2.6.jar" sourcepath="lib/commons-io-2.6-sources.jar"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>

+ 6 - 0
HintCO/.settings/org.eclipse.jdt.core.prefs

@@ -1,7 +1,13 @@
 eclipse.preferences.version=1
 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
 org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
 org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.release=disabled
 org.eclipse.jdt.core.compiler.source=1.8

BIN=BIN
HintCO/lib/commons-compress-1.18-sources.jar


BIN=BIN
HintCO/lib/commons-compress-1.18.jar


BIN=BIN
HintCO/lib/commons-io-2.6-sources.jar


BIN=BIN
HintCO/lib/commons-io-2.6.jar


BIN=BIN
HintCO/lib/fmi2-sources.zip


BIN=BIN
HintCO/lib/fmi2.jar


BIN=BIN
HintCO/lib/jnifmuapi-sources.jar


BIN=BIN
HintCO/lib/jnifmuapi.jar


BIN=BIN
HintCO/lib/slf4j-api-sources.jar


BIN=BIN
HintCO/lib/slf4j-api.jar


BIN=BIN
HintCO/lib/slf4j-simple-sources.jar


BIN=BIN
HintCO/lib/slf4j-simple.jar


BIN=BIN
HintCO/resources/watertank.fmu


+ 14 - 0
HintCO/test/ua/ansymo/hintco/test/CosimRunnerTest.xtend

@@ -1,14 +1,26 @@
 package ua.ansymo.hintco.test
 
+import java.io.File
+import org.intocps.fmi.jnifmuapi.Factory
 import org.junit.Test
 import ua.ansymo.hintco.CandidatesGenerator
 import ua.ansymo.hintco.CosimRunner
 import ua.ansymo.hintco.ModelStorage
 
+import static org.junit.Assert.*
+
 class CosimRunnerTest {
 	val generator = new CandidatesGenerator()
 	val loader = new ModelStorage()
 	
+	@Test
+	def void loadAndRunFMUTest(){
+		val fmu = Factory.create(new File("resources/watertank.fmu"))
+		fmu.load()
+		assertNotNull(fmu)
+	}
+	
+	
 	@Test
 	def void executeCosimulationTest(){
 		val src = loader.loadCandidates("instances/execute_cosim_test.xmi")
@@ -26,4 +38,6 @@ class CosimRunnerTest {
 			])
 	}
 	
+	
+	
 }