Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added initialize function for FMU C file.
fmu_model_interface.h contains structure that will be used to store model status information. Added checkInvalidState function in fmu_model_interface.c file to verify if a model is in invalid state or not. Added some code to fmi setter/getter functions also. git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@6857 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
- Loading branch information
Azam Zia
committed
Nov 3, 2010
1 parent
5be270a
commit 0041e9d
Showing
3 changed files
with
78 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
|
||
#include <stdio.h> | ||
#include <string.h> | ||
#include <assert.h> | ||
|
||
#include "fmiModelFunctions.h" | ||
|
||
|
||
/*saving states, this will be used later in checkstate function to check | ||
current state of a model. */ | ||
typedef enum { | ||
modelInstantiated = 1<<0, | ||
modelInitialized = 1<<1, | ||
modelTerminated = 1<<2, | ||
modelError = 1<<3 | ||
} State; | ||
|
||
/*This structure will contain data necessary for a model intance. I will | ||
add more values here. */ | ||
typedef struct { | ||
fmiReal *realVar; | ||
fmiInteger *intVar; | ||
fmiBoolean *boolVar; | ||
fmiString *strVar; | ||
fmiString instanceName; | ||
State state; | ||
} ModelInstance; |