Skip to content

Commit

Permalink
Update to FMI 3.0-beta.5
Browse files Browse the repository at this point in the history
  • Loading branch information
t-sommer committed Mar 4, 2022
1 parent 0d39a7f commit 6174650
Show file tree
Hide file tree
Showing 15 changed files with 33 additions and 31 deletions.
2 changes: 1 addition & 1 deletion BouncingBall/FMI3.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<fmiModelDescription
fmiVersion="3.0-beta.4"
fmiVersion="3.0-beta.5"
modelName="BouncingBall"
description="This model calculates the trajectory, over time, of a ball dropped from a height of 1 m."
generationTool="Reference FMUs (development build)"
Expand Down
2 changes: 1 addition & 1 deletion Clocks/FMI3.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<fmiModelDescription fmiVersion="3.0-beta.4" modelName="Clocks" generationTool="Reference FMUs (development build)" instantiationToken="{8c4e810f-3df3-4a00-8276-176fa3c9f000}">
<fmiModelDescription fmiVersion="3.0-beta.5" modelName="Clocks" generationTool="Reference FMUs (development build)" instantiationToken="{8c4e810f-3df3-4a00-8276-176fa3c9f000}">
<ScheduledExecution modelIdentifier="Clocks"/>
<LogCategories>
<Category name="logEvents" description="Log events"/>
Expand Down
2 changes: 1 addition & 1 deletion Dahlquist/FMI3.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<fmiModelDescription fmiVersion="3.0-beta.4" modelName="Dahlquist" generationTool="Reference FMUs (development build)" instantiationToken="{8c4e810f-3df3-4a00-8276-176fa3c9f000}">
<fmiModelDescription fmiVersion="3.0-beta.5" modelName="Dahlquist" generationTool="Reference FMUs (development build)" instantiationToken="{8c4e810f-3df3-4a00-8276-176fa3c9f000}">

<ModelExchange
modelIdentifier="Dahlquist"
Expand Down
2 changes: 1 addition & 1 deletion Feedthrough/FMI3.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<fmiModelDescription fmiVersion="3.0-beta.4" modelName="Feedthrough" generationTool="Reference FMUs (development build)" instantiationToken="{8c4e810f-3df3-4a00-8276-176fa3c9f004}">
<fmiModelDescription fmiVersion="3.0-beta.5" modelName="Feedthrough" generationTool="Reference FMUs (development build)" instantiationToken="{8c4e810f-3df3-4a00-8276-176fa3c9f004}">

<ModelExchange
modelIdentifier="Feedthrough"
Expand Down
2 changes: 1 addition & 1 deletion LinearTransform/FMI3.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<fmiModelDescription fmiVersion="3.0-beta.4" modelName="LinearTransform" generationTool="Reference FMUs (development build)" instantiationToken="{8c4e810f-3df3-4a00-8276-176fa3c9f000}">
<fmiModelDescription fmiVersion="3.0-beta.5" modelName="LinearTransform" generationTool="Reference FMUs (development build)" instantiationToken="{8c4e810f-3df3-4a00-8276-176fa3c9f000}">

<ModelExchange
modelIdentifier="LinearTransform"
Expand Down
2 changes: 1 addition & 1 deletion Resource/FMI3.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<fmiModelDescription fmiVersion="3.0-beta.4" modelName="Resource" generationTool="Reference FMUs (development build)" instantiationToken="{7b9c2114-2ce5-4076-a138-2cbc69e069e5}">
<fmiModelDescription fmiVersion="3.0-beta.5" modelName="Resource" generationTool="Reference FMUs (development build)" instantiationToken="{7b9c2114-2ce5-4076-a138-2cbc69e069e5}">

<ModelExchange
modelIdentifier="Resource"
Expand Down
2 changes: 1 addition & 1 deletion Stair/FMI3.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<fmiModelDescription fmiVersion="3.0-beta.4" modelName="Stair" generationTool="Reference FMUs (development build)" instantiationToken="{8c4e810f-3df3-4a00-8276-176fa3c9f008}">
<fmiModelDescription fmiVersion="3.0-beta.5" modelName="Stair" generationTool="Reference FMUs (development build)" instantiationToken="{8c4e810f-3df3-4a00-8276-176fa3c9f008}">

<ModelExchange
modelIdentifier="Stair"
Expand Down
2 changes: 1 addition & 1 deletion VanDerPol/FMI3.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<fmiModelDescription fmiVersion="3.0-beta.4" modelName="van der Pol oscillator" generationTool="Reference FMUs (development build)" instantiationToken="{8c4e810f-3da3-4a00-8276-176fa3c9f000}">
<fmiModelDescription fmiVersion="3.0-beta.5" modelName="van der Pol oscillator" generationTool="Reference FMUs (development build)" instantiationToken="{8c4e810f-3da3-4a00-8276-176fa3c9f000}">

<ModelExchange
modelIdentifier="VanDerPol"
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
variables:
fmpy: https://github.com/CATIA-Systems/FMPy/archive/a083c624a2c2ffc59ee4151e49b5670e40eca4ca.zip
fmpy: https://github.com/CATIA-Systems/FMPy/archive/ed1764cf44abe27c5a45d04c9580542c95400e58.zip
conda.packages: python=3.10 dask lark-parser lxml numpy pathlib pip pytest requests scipy

jobs:
Expand Down
4 changes: 2 additions & 2 deletions include/FMI3.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ struct FMI3Functions_ {
fmi3FreeFMUStateTYPE *fmi3FreeFMUState;
fmi3SerializedFMUStateSizeTYPE *fmi3SerializedFMUStateSize;
fmi3SerializeFMUStateTYPE *fmi3SerializeFMUState;
fmi3DeSerializeFMUStateTYPE *fmi3DeSerializeFMUState;
fmi3DeserializeFMUStateTYPE *fmi3DeserializeFMUState;

/* Getting partial derivatives */
fmi3GetDirectionalDerivativeTYPE *fmi3GetDirectionalDerivative;
Expand Down Expand Up @@ -412,7 +412,7 @@ FMI_STATIC fmi3Status FMI3SerializeFMUState(FMIInstance *instance,
fmi3Byte serializedState[],
size_t size);

FMI_STATIC fmi3Status FMI3DeSerializeFMUState(FMIInstance *instance,
FMI_STATIC fmi3Status FMI3DeserializeFMUState(FMIInstance *instance,
const fmi3Byte serializedState[],
size_t size,
fmi3FMUState* FMUState);
Expand Down
16 changes: 8 additions & 8 deletions include/fmi3FunctionTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "fmi3PlatformTypes.h"

/*
This header file defines the data and function types of FMI 3.0-beta.4.
This header file defines the data and function types of FMI 3.0-beta.5.
It must be used when compiling an FMU or an FMI importer.
Copyright (C) 2011 MODELISAR consortium,
Expand Down Expand Up @@ -425,12 +425,12 @@ typedef fmi3Status fmi3SerializeFMUStateTYPE (fmi3Instance instance,
size_t size);
/* end::SerializeFMUState[] */

/* tag::DeSerializeFMUState[] */
typedef fmi3Status fmi3DeSerializeFMUStateTYPE (fmi3Instance instance,
/* tag::DeserializeFMUState[] */
typedef fmi3Status fmi3DeserializeFMUStateTYPE (fmi3Instance instance,
const fmi3Byte serializedState[],
size_t size,
fmi3FMUState* FMUState);
/* end::DeSerializeFMUState[] */
/* end::DeserializeFMUState[] */

/* Getting partial derivatives */
/* tag::GetDirectionalDerivative[] */
Expand Down Expand Up @@ -479,7 +479,7 @@ typedef fmi3Status fmi3GetIntervalDecimalTYPE(fmi3Instance instance,
typedef fmi3Status fmi3GetIntervalFractionTYPE(fmi3Instance instance,
const fmi3ValueReference valueReferences[],
size_t nValueReferences,
fmi3UInt64 intervalCounters[],
fmi3UInt64 counters[],
fmi3UInt64 resolutions[],
fmi3IntervalQualifier qualifiers[]);
/* end::GetIntervalFraction[] */
Expand All @@ -495,7 +495,7 @@ typedef fmi3Status fmi3GetShiftDecimalTYPE(fmi3Instance instance,
typedef fmi3Status fmi3GetShiftFractionTYPE(fmi3Instance instance,
const fmi3ValueReference valueReferences[],
size_t nValueReferences,
fmi3UInt64 shiftCounters[],
fmi3UInt64 counters[],
fmi3UInt64 resolutions[]);
/* end::GetShiftFraction[] */

Expand All @@ -510,7 +510,7 @@ typedef fmi3Status fmi3SetIntervalDecimalTYPE(fmi3Instance instance,
typedef fmi3Status fmi3SetIntervalFractionTYPE(fmi3Instance instance,
const fmi3ValueReference valueReferences[],
size_t nValueReferences,
const fmi3UInt64 intervalCounters[],
const fmi3UInt64 counters[],
const fmi3UInt64 resolutions[]);
/* end::SetIntervalFraction[] */

Expand All @@ -525,7 +525,7 @@ typedef fmi3Status fmi3SetShiftDecimalTYPE(fmi3Instance instance,
typedef fmi3Status fmi3SetShiftFractionTYPE(fmi3Instance instance,
const fmi3ValueReference valueReferences[],
size_t nValueReferences,
const fmi3UInt64 shiftCounters[],
const fmi3UInt64 counters[],
const fmi3UInt64 resolutions[]);
/* end::SetShiftFraction[] */

Expand Down
10 changes: 6 additions & 4 deletions include/fmi3Functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define fmi3Functions_h

/*
This header file declares the functions of FMI 3.0-beta.4.
This header file declares the functions of FMI 3.0-beta.5.
It must be used when compiling an FMU.
In order to have unique function names even if several FMUs
Expand Down Expand Up @@ -93,7 +93,7 @@ it may be set to __declspec(dllimport).
#endif

/* FMI version */
#define fmi3Version "3.0-beta.4"
#define fmi3Version "3.0-beta.5"

/***************************************************
Common Functions
Expand Down Expand Up @@ -156,7 +156,7 @@ Common Functions
#define fmi3FreeFMUState fmi3FullName(fmi3FreeFMUState)
#define fmi3SerializedFMUStateSize fmi3FullName(fmi3SerializedFMUStateSize)
#define fmi3SerializeFMUState fmi3FullName(fmi3SerializeFMUState)
#define fmi3DeSerializeFMUState fmi3FullName(fmi3DeSerializeFMUState)
#define fmi3DeserializeFMUState fmi3FullName(fmi3DeserializeFMUState)

/* Getting partial derivatives */
#define fmi3GetDirectionalDerivative fmi3FullName(fmi3GetDirectionalDerivative)
Expand Down Expand Up @@ -268,7 +268,7 @@ FMI3_Export fmi3SetFMUStateTYPE fmi3SetFMUState;
FMI3_Export fmi3FreeFMUStateTYPE fmi3FreeFMUState;
FMI3_Export fmi3SerializedFMUStateSizeTYPE fmi3SerializedFMUStateSize;
FMI3_Export fmi3SerializeFMUStateTYPE fmi3SerializeFMUState;
FMI3_Export fmi3DeSerializeFMUStateTYPE fmi3DeSerializeFMUState;
FMI3_Export fmi3DeserializeFMUStateTYPE fmi3DeserializeFMUState;

/* Getting partial derivatives */
FMI3_Export fmi3GetDirectionalDerivativeTYPE fmi3GetDirectionalDerivative;
Expand All @@ -285,6 +285,8 @@ FMI3_Export fmi3GetShiftDecimalTYPE fmi3GetShiftDecimal;
FMI3_Export fmi3GetShiftFractionTYPE fmi3GetShiftFraction;
FMI3_Export fmi3SetIntervalDecimalTYPE fmi3SetIntervalDecimal;
FMI3_Export fmi3SetIntervalFractionTYPE fmi3SetIntervalFraction;
FMI3_Export fmi3SetShiftDecimalTYPE fmi3SetShiftDecimal;
FMI3_Export fmi3SetShiftFractionTYPE fmi3SetShiftFraction;
FMI3_Export fmi3EvaluateDiscreteStatesTYPE fmi3EvaluateDiscreteStates;
FMI3_Export fmi3UpdateDiscreteStatesTYPE fmi3UpdateDiscreteStates;

Expand Down
2 changes: 1 addition & 1 deletion include/fmi3PlatformTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define fmi3PlatformTypes_h

/*
This header file defines the data types of FMI 3.0-beta.4.
This header file defines the data types of FMI 3.0-beta.5.
It must be used by both FMU and FMI master.
Copyright (C) 2008-2011 MODELISAR consortium,
Expand Down
6 changes: 3 additions & 3 deletions src/FMI3.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ static fmi3Status loadSymbols3(FMIInstance *instance) {
LOAD_SYMBOL(FreeFMUState);
LOAD_SYMBOL(SerializedFMUStateSize);
LOAD_SYMBOL(SerializeFMUState);
LOAD_SYMBOL(DeSerializeFMUState);
LOAD_SYMBOL(DeserializeFMUState);

/* Getting partial derivatives */
LOAD_SYMBOL(GetDirectionalDerivative);
Expand Down Expand Up @@ -806,11 +806,11 @@ fmi3Status FMI3SerializeFMUState(FMIInstance *instance,
CALL_ARGS(SerializeFMUState, "FMUstate=0x%p, serializedState=0x%p, size=%zu", FMUState, serializedState, size);
}

fmi3Status FMI3DeSerializeFMUState(FMIInstance *instance,
fmi3Status FMI3DeserializeFMUState(FMIInstance *instance,
const fmi3Byte serializedState[],
size_t size,
fmi3FMUState* FMUState) {
CALL_ARGS(DeSerializeFMUState, "serializedState=0x%p, size=%zu, FMUState=0x%p", serializedState, size, FMUState);
CALL_ARGS(DeserializeFMUState, "serializedState=0x%p, size=%zu, FMUState=0x%p", serializedState, size, FMUState);
}

/* Getting partial derivatives */
Expand Down
8 changes: 4 additions & 4 deletions src/fmi3Functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ do { \
#define MASK_fmi3FreeFMUState MASK_AnyState
#define MASK_fmi3SerializedFMUStateSize MASK_AnyState
#define MASK_fmi3SerializeFMUState MASK_AnyState
#define MASK_fmi3DeSerializeFMUState MASK_AnyState
#define MASK_fmi3DeserializeFMUState MASK_AnyState

/* Getting partial derivatives */
#define MASK_fmi3GetDirectionalDerivative (InitializationMode | EventMode | ContinuousTimeMode | Terminated)
Expand Down Expand Up @@ -973,14 +973,14 @@ fmi3Status fmi3SerializeFMUState(fmi3Instance instance,
return fmi3OK;
}

fmi3Status fmi3DeSerializeFMUState(fmi3Instance instance,
fmi3Status fmi3DeserializeFMUState(fmi3Instance instance,
const fmi3Byte serializedState[],
size_t size,
fmi3FMUState* FMUState) {

ASSERT_STATE(DeSerializeFMUState);
ASSERT_STATE(DeserializeFMUState);

if (invalidNumber(S, "fmi3DeSerializeFMUState", "size", size, sizeof(ModelInstance))) {
if (invalidNumber(S, "fmi3DeserializeFMUState", "size", size, sizeof(ModelInstance))) {
return fmi3Error;
}

Expand Down

0 comments on commit 6174650

Please sign in to comment.