Skip to content

Commit

Permalink
Remove LinearTransform
Browse files Browse the repository at this point in the history
  • Loading branch information
t-sommer committed Nov 15, 2023
1 parent 896f5a8 commit e75aaf6
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 264 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ if (${FMI_VERSION} GREATER 1 OR "${FMI_TYPE}" STREQUAL "CS")
endif ()

if (${FMI_VERSION} GREATER 2)
set (MODEL_NAMES ${MODEL_NAMES} LinearTransform StateSpace Clocks)
set (MODEL_NAMES ${MODEL_NAMES} StateSpace Clocks)
endif ()

foreach (MODEL_NAME ${MODEL_NAMES})
Expand Down
51 changes: 0 additions & 51 deletions LinearTransform/FMI3.xml

This file was deleted.

13 changes: 0 additions & 13 deletions LinearTransform/buildDescription.xml

This file was deleted.

41 changes: 0 additions & 41 deletions LinearTransform/config.h

This file was deleted.

146 changes: 0 additions & 146 deletions LinearTransform/model.c

This file was deleted.

7 changes: 0 additions & 7 deletions LinearTransform/readme.md

This file was deleted.

2 changes: 1 addition & 1 deletion examples/Examples.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ elseif(${FMI_VERSION} EQUAL 2)
set(MODEL_NAMES ${MODEL_NAMES} Resource)
set(INTERFACE_TYPES cs me)
else()
set(MODEL_NAMES ${MODEL_NAMES} LinearTransform Resource)
set(MODEL_NAMES ${MODEL_NAMES} Resource StateSpace)
set(INTERFACE_TYPES cs me)
endif()

Expand Down
8 changes: 4 additions & 4 deletions examples/LinearTransform.c → examples/StateSpace.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ FILE *createOutputFile(const char *filename) {
FILE *file = fopen(filename, "w");

if (file) {
fputs("time,y[1],y[2]\n", file);
fputs("time,y\n", file);
}

return file;
Expand All @@ -18,11 +18,11 @@ FMIStatus recordVariables(FMIInstance *S, FILE *outputFile) {

const fmi3ValueReference valueReferences[1] = { vr_y };

fmi3Float64 values[2] = { 0 };
fmi3Float64 values[3] = { 0 };

FMIStatus status = FMI3GetFloat64((FMIInstance *)S, valueReferences, 1, values, 2);
FMIStatus status = FMI3GetFloat64((FMIInstance *)S, valueReferences, 1, values, 3);

fprintf(outputFile, "%g,%g,%g\n", ((FMIInstance *)S)->time, values[0], values[1]);
fprintf(outputFile, "%g,%g %g %g\n", ((FMIInstance *)S)->time, values[0], values[1], values[2]);

return status;
}

0 comments on commit e75aaf6

Please sign in to comment.