]> gerrit.simantics Code Review - simantics/sysdyn.git/commitdiff
Version updates to plugins (refs #3646)
authorlempinen <lempinen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Tue, 5 Mar 2013 13:19:36 +0000 (13:19 +0000)
committerlempinen <lempinen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Tue, 5 Mar 2013 13:19:36 +0000 (13:19 +0000)
git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/branches@27008 ac1ea38d-2e2b-0410-8846-a27921b304fc

simantics-1.9/org.simantics.fmu.me.win32/META-INF/MANIFEST.MF
simantics-1.9/org.simantics.fmu/FMUSolution/FMUSimulator/src/fmu_control.cpp
simantics-1.9/org.simantics.fmu/META-INF/MANIFEST.MF
simantics-1.9/org.simantics.modelica/META-INF/MANIFEST.MF
simantics-1.9/org.simantics.sysdyn.feature/feature.xml
simantics-1.9/org.simantics.sysdyn.ui/META-INF/MANIFEST.MF
simantics-1.9/org.simantics.sysdyn.ui/sysdyn.product
simantics-1.9/org.simantics.sysdyn/META-INF/MANIFEST.MF

index 79b713ee75b564f32e985fd333b74bcba7a00e81..a08acbbff32079353bfeb041391553e38515c733 100644 (file)
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: Win32 binaries for FMI model exchange
 Bundle-SymbolicName: org.simantics.fmu.me.win32
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 1.1.0.qualifier
 Bundle-Vendor: Semantum Oy
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
index 43a1be983045c47bf85779eae5edb8aeede0720e..67ddd47841dea6c876e58deeb783fecd612032dc 100644 (file)
@@ -59,8 +59,9 @@ struct FMUControlStruct {
        \r
        bool initialized;                               // has the fmu been initialized\r
 \r
-       vector<int> subscription;               // result subscriptions\r
+       vector<fmiValueReference> subscription;         // result subscriptions\r
        vector<string> allVariables;    // all variables in an initialized model\r
+       vector<fmiValueReference> fmiValueReferences;           // all value references\r
 \r
        string lastErrorMessage;\r
 \r
@@ -127,10 +128,19 @@ JNIEXPORT jint JNICALL Java_org_simantics_fmu_FMUControlJNI_loadFMUFile_1
        FMUControlStruct& fmuStruct = fmus[fmuId];\r
        // Extract fmu from fmuPath to fmuTempDir and load it to fmuStruct.fmu\r
        int ret = loadFMU(&fmuStruct.fmu, fmuPath, fmuTempDir); \r
-       if(fmuStruct.fmu.modelDescription != NULL)\r
+       if(fmuStruct.fmu.modelDescription != NULL) {\r
                fmuStruct.vars = fmuStruct.fmu.modelDescription->modelVariables;\r
-       else\r
+\r
+               fmuStruct.fmiValueReferences.clear();\r
+\r
+               int i;\r
+               for (i=0; fmuStruct.vars[i]; i++) {\r
+                       fmuStruct.fmiValueReferences.push_back(getValueReference(fmuStruct.vars[i]));\r
+               }\r
+\r
+       } else {\r
                fmuStruct.vars = NULL;\r
+       }\r
 \r
        if(module != NULL) {\r
                /* \r
@@ -209,7 +219,7 @@ JNIEXPORT jint JNICALL Java_org_simantics_fmu_FMUControlJNI_subscribe_1
 \r
                        if(it != fmuStruct.indexes.end()) {\r
                                // Found the subscribed element\r
-                               fmuStruct.subscription.push_back(fmuStruct.indexes[name]);\r
+                               fmuStruct.subscription.push_back(fmuStruct.fmiValueReferences[fmuStruct.indexes[name]]);\r
                        } else {\r
                                // Element not found, use index -1\r
                                fmuStruct.subscription.push_back(-1);\r
@@ -225,10 +235,6 @@ JNIEXPORT jint JNICALL Java_org_simantics_fmu_FMUControlJNI_subscribe_1
        }\r
 }\r
 \r
-fmiValueReference getReference(ScalarVariable **vars, int index) {\r
-       return getValueReference(vars[index]);\r
-}\r
-\r
 bool referenceExists(FMUControlStruct fmuStruct, string variable) {\r
        map<string,int>::iterator it = fmuStruct.indexes.find(variable);\r
        if(it != fmuStruct.indexes.end()) {\r
@@ -240,7 +246,7 @@ bool referenceExists(FMUControlStruct fmuStruct, string variable) {
 \r
 // Remember to check if reference exists\r
 fmiValueReference getReference(FMUControlStruct fmuStruct, string variable) {\r
-       return getReference(fmuStruct.vars, fmuStruct.indexes[variable]);\r
+       return fmuStruct.fmiValueReferences[fmuStruct.indexes[variable]];\r
 }\r
 \r
 // Get string representation of a scalar variable type\r
@@ -418,8 +424,9 @@ JNIEXPORT jdouble JNICALL Java_org_simantics_fmu_FMUControlJNI_getTime_1
        }\r
 }\r
 \r
-double getRealValue(FMUControlStruct fmuStruct, ScalarVariable *sv) {\r
-       fmiValueReference vr = getValueReference(sv);\r
+double getRealValue(FMUControlStruct fmuStruct, int index) {\r
+       ScalarVariable *sv = fmuStruct.vars[index];\r
+       fmiValueReference vr = fmuStruct.fmiValueReferences[index];\r
        double real;\r
        fmiInteger integer;\r
        fmiBoolean fmibool;\r
@@ -455,6 +462,8 @@ JNIEXPORT jdoubleArray JNICALL Java_org_simantics_fmu_FMUControlJNI_getSubscribe
                jboolean isCopy;\r
                jdouble* resultElements = env -> GetDoubleArrayElements(result, &isCopy);\r
                jsize n = env -> GetArrayLength(result);\r
+\r
+               /*\r
                int i;\r
                for (i = 0; i < n; i++) {\r
                        if(fmuStruct.subscription.empty() || fmuStruct.fmu.modelDescription == NULL) {\r
@@ -465,9 +474,13 @@ JNIEXPORT jdoubleArray JNICALL Java_org_simantics_fmu_FMUControlJNI_getSubscribe
                                resultElements[i] = 0;\r
                        } else {\r
                                // Get value \r
-                               resultElements[i] = getRealValue(fmuStruct, fmuStruct.vars[fmuStruct.subscription[i]]);\r
+                               resultElements[i] = getRealValue(fmuStruct, fmuStruct.subscription[i]);\r
                        }\r
                } \r
+               */\r
+\r
+               fmuStruct.fmu.getReal(fmuStruct.c, &fmuStruct.subscription[0], n, resultElements);\r
+\r
                if (isCopy == JNI_TRUE) {\r
                        env -> ReleaseDoubleArrayElements(result, resultElements, 0);\r
                }\r
index e40cac9523577a4ae30d3716c50b9904c486e34a..525a0185b16997bfacf816b9508d1dc1b7b4dd44 100644 (file)
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: FMU Simulator
 Bundle-SymbolicName: org.simantics.fmu
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 1.1.0.qualifier
 Bundle-Activator: org.simantics.fmu.Activator
 Bundle-Vendor: Semantum Oy
 Require-Bundle: org.eclipse.core.runtime,
index 88a27ec5a970d3a2c57b7e52b722094ecde1a127..48ba713de74000b9af666c072bc823277da94aa3 100644 (file)
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: Modelica
 Bundle-SymbolicName: org.simantics.modelica;singleton:=true
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 1.1.0.qualifier
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Require-Bundle: gnu.trove2;bundle-version="2.0.4",
  org.eclipse.osgi;bundle-version="3.6.0",
index 855e54a1f035dca31201a01ca72645e425bf096e..52528821a9d2ec1ba279767733439a99968a366c 100644 (file)
@@ -13,7 +13,7 @@
 <feature\r
       id="org.simantics.sysdyn"\r
       label="Simantics System Dynamics Feature"\r
-      version="1.0.1.qualifier"\r
+      version="1.7.0.qualifier"\r
       provider-name="VTT Technical Research Centre of Finland">\r
 \r
    <description url="http://www.example.com/description">\r
    <includes\r
          id="org.simantics.eclipsec.launcher"\r
          version="0.0.0"/>\r
-\r
+<!--\r
+   <includes\r
+         id="org.simantics.document.feature"\r
+         version="0.0.0"/>\r
+-->\r
    <plugin\r
          id="org.simantics.objmap"\r
          download-size="0"\r
index 37abd3d84b9ff4fb0428e03c0ca888e926414244..7bbc99f8d6b19001e68b5d055ba8c60f8e03a243 100644 (file)
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: Simantics System Dynamics UI
 Bundle-SymbolicName: org.simantics.sysdyn.ui;singleton:=true
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 1.7.0.qualifier
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Require-Bundle: org.simantics.layer0.utils;bundle-version="0.6.2",
  org.simantics.scenegraph;bundle-version="0.9.0",
index 6d9d5612cec84f77f2a0c71c793117e32e0478a4..f565ec765eee6b1df9699b63f2f2bf7a6379e097 100644 (file)
@@ -1,13 +1,23 @@
 <?xml version="1.0" encoding="UTF-8"?>\r
 <?pde version="3.5"?>\r
 \r
-<product name="Simantics System Dynamic Tool" uid="org.simantics.sysdyn.product.Sysdyn" id="org.simantics.sysdyn.ui.product" application="org.simantics.workbench.application" version="1.8" useFeatures="true" includeLaunchers="false">\r
+<product name="Simantics System Dynamic Tool" uid="org.simantics.sysdyn.product.Sysdyn" id="org.simantics.sysdyn.ui.product" application="org.simantics.workbench.application" version="1.7" useFeatures="true" includeLaunchers="false">\r
+\r
+   <aboutInfo>\r
+      <text>\r
+         Simantics system dynamics\r
+\r
+Version 1.7.0\r
+\r
+Copyright (c) 2013 Association for Decentralized Information Management in Industry THTH ry.\r
+      </text>\r
+   </aboutInfo>\r
 \r
    <configIni use="default">\r
    </configIni>\r
 \r
    <launcherArgs>\r
-      <programArgs>-fixerrors\r
+      <programArgs>-fixerrors
 --launcher.XXMaxPermSize 192m</programArgs>\r
       <vmArgs>-ea  -Xmx768M -XX:MaxPermSize=192m -Xshare:off</vmArgs>\r
       <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>\r
@@ -24,6 +34,7 @@
       </win>\r
    </launcher>\r
 \r
+\r
    <vm>\r
       <windows include="true">org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6</windows>\r
    </vm>\r
@@ -108,7 +119,7 @@ This Agreement is governed by the laws of the State of New York and the intellec
    </plugins>\r
 \r
    <features>\r
-      <feature id="org.simantics.sysdyn" version="1.0.1.qualifier"/>\r
+      <feature id="org.simantics.sysdyn" version="1.7.0.qualifier"/>\r
    </features>\r
 \r
 \r
index 640aac4bebcf405a28d8dbd7719c19b1557341f2..8e6fd2e3bd88efcf9e93b1bc7399878f469a1293 100644 (file)
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: Simantics System Dynamics
 Bundle-SymbolicName: org.simantics.sysdyn;singleton:=true
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 1.7.0.qualifier
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Require-Bundle: org.simantics.objmap;bundle-version="0.1.0",
  org.simantics.db;bundle-version="0.6.2",