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",
\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
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
\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
}\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
\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
}\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
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
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
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,
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",
<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
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",
<?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
</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
</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
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",