OMCompiler/Compiler/Util/FMIExt.mo
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /* | ||
| 2 | * This file is part of OpenModelica. | ||
| 3 | * | ||
| 4 | * Copyright (c) 1998-2026, Open Source Modelica Consortium (OSMC), | ||
| 5 | * c/o Linköpings universitet, Department of Computer and Information Science, | ||
| 6 | * SE-58183 Linköping, Sweden. | ||
| 7 | * | ||
| 8 | * All rights reserved. | ||
| 9 | * | ||
| 10 | * THIS PROGRAM IS PROVIDED UNDER THE TERMS OF AGPL VERSION 3 LICENSE OR | ||
| 11 | * THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. | ||
| 12 | * ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES | ||
| 13 | * RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GNU AGPL | ||
| 14 | * VERSION 3, ACCORDING TO RECIPIENTS CHOICE. | ||
| 15 | * | ||
| 16 | * The OpenModelica software and the OSMC (Open Source Modelica Consortium) | ||
| 17 | * Public License (OSMC-PL) are obtained from OSMC, either from the above | ||
| 18 | * address, from the URLs: | ||
| 19 | * http://www.openmodelica.org or | ||
| 20 | * https://github.com/OpenModelica/ or | ||
| 21 | * http://www.ida.liu.se/projects/OpenModelica, | ||
| 22 | * and in the OpenModelica distribution. | ||
| 23 | * | ||
| 24 | * GNU AGPL version 3 is obtained from: | ||
| 25 | * https://www.gnu.org/licenses/licenses.html#GPL | ||
| 26 | * | ||
| 27 | * This program is distributed WITHOUT ANY WARRANTY; without | ||
| 28 | * even the implied warranty of MERCHANTABILITY or FITNESS | ||
| 29 | * FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH | ||
| 30 | * IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. | ||
| 31 | * | ||
| 32 | * See the full OSMC Public License conditions for more details. | ||
| 33 | * | ||
| 34 | */ | ||
| 35 | |||
| 36 | encapsulated package FMIExt | ||
| 37 | " file: FMI.mo | ||
| 38 | package: FMI | ||
| 39 | description: This file contains FMI's import specific function, which are implemented in C." | ||
| 40 | |||
| 41 | public import FMI; | ||
| 42 | |||
| 43 |
7/14✓ Branch 1 taken 18 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 18 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 18 times.
✗ Branch 6 not taken.
✓ Branch 7 taken 18 times.
✗ Branch 8 not taken.
✓ Branch 9 taken 18 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 18 times.
✗ Branch 12 not taken.
✓ Branch 13 taken 18 times.
✗ Branch 14 not taken.
|
18 | public function initializeFMIImport |
| 44 | input String inFileName; | ||
| 45 | input String inWorkingDirectory; | ||
| 46 | input Integer inFMILogLevel; | ||
| 47 | input Boolean inInputConnectors; | ||
| 48 | input Boolean inOutputConnectors; | ||
| 49 | input Boolean inIsModelDescriptionImport = false; | ||
| 50 | output Boolean result; | ||
| 51 | output Option<Integer> outFMIContext "Stores a pointer. If it is declared as Integer, it is truncated to 32-bit."; | ||
| 52 | output Option<Integer> outFMIInstance "Stores a pointer. If it is declared as Integer, it is truncated to 32-bit."; | ||
| 53 | output FMI.Info outFMIInfo; | ||
| 54 | output list<FMI.TypeDefinitions> outTypeDefinitionsList; | ||
| 55 | output FMI.ExperimentAnnotation outExperimentAnnotation; | ||
| 56 | output Option<Integer> outModelVariablesInstance "Stores a pointer. If it is declared as Integer, it is truncated to 32-bit."; | ||
| 57 | output list<FMI.ModelVariables> outModelVariablesList; | ||
| 58 | external "C" result=FMIImpl__initializeFMIImport(inFileName, inWorkingDirectory, inFMILogLevel, inInputConnectors, inOutputConnectors, inIsModelDescriptionImport, | ||
| 59 | outFMIContext, outFMIInstance, outFMIInfo, outTypeDefinitionsList, outExperimentAnnotation, outModelVariablesInstance, outModelVariablesList) | ||
| 60 | annotation(Library = {"omcbackendruntime","omcruntime","fmilib"}); | ||
| 61 | end initializeFMIImport; | ||
| 62 | |||
| 63 | 36 | public function releaseFMIImport | |
| 64 | input Option<Integer> inFMIModelVariablesInstance "Stores a pointer. If it is declared as Integer, it is truncated to 32-bit."; | ||
| 65 | input Option<Integer> inFMIInstance "Stores a pointer. If it is declared as Integer, it is truncated to 32-bit."; | ||
| 66 | input Option<Integer> inFMIContext "Stores a pointer. If it is declared as Integer, it is truncated to 32-bit."; | ||
| 67 | input String inFMIVersion; | ||
| 68 | external "C" FMIImpl__releaseFMIImport(inFMIModelVariablesInstance, inFMIInstance, inFMIContext, inFMIVersion) annotation(Library = {"omcbackendruntime","omcruntime","fmilib"}); | ||
| 69 | end releaseFMIImport; | ||
| 70 | |||
| 71 | annotation(__OpenModelica_Interface="util"); | ||
| 72 | end FMIExt; | ||
| 73 |