diff --git a/Project.toml b/Project.toml index 14d7277..d3e1bb5 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "FMICore" uuid = "8af89139-c281-408e-bce2-3005eb87462f" authors = ["TT ", "LM ", "JK "] -version = "1.0.0" +version = "1.0.1" [deps] Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" diff --git a/src/FMI3/cfunc.jl b/src/FMI3/cfunc.jl index f5d66e5..256ea5a 100644 --- a/src/FMI3/cfunc.jl +++ b/src/FMI3/cfunc.jl @@ -24,7 +24,7 @@ function fmi3InstantiateModelExchange(cfunc::Ptr{Nothing}, instanceName, fmuInstantiationToken, fmuResourceLocation, visible, loggingOn, instanceEnvironment, logMessage) - @debug "fmi3InstantiateModelExchange(instanceName: $(instanceName), fmuType: $(fmuType), fmuInstantiationToken: $(fmuInstantiationToken), fmuResourceLocation: $(fmuResourceLocation), visible: $(visible), loggingOn: $(loggingOn)) → $(status)" + @debug "fmi3InstantiateModelExchange(instanceName: $(instanceName), fmuInstantiationToken: $(fmuInstantiationToken), fmuResourceLocation: $(fmuResourceLocation), visible: $(visible), loggingOn: $(loggingOn)) → $(status)" return status end export fmi3InstantiateModelExchange @@ -56,7 +56,7 @@ function fmi3InstantiateCoSimulation(cfunc::Ptr{Nothing}, visible, loggingOn, eventModeUsed, earlyReturnAllowed, requiredIntermediateVariables, nRequiredIntermediateVariables, instanceEnvironment, logMessage, intermediateUpdate) - @debug "fmi3InstantiateCoSimulation(instanceName: $(instanceName), fmuType: $(fmuType), fmuInstantiationToken: $(fmuInstantiationToken), fmuResourceLocation: $(fmuResourceLocation), visible: $(visible), loggingOn: $(loggingOn)) → $(status)" + @debug "fmi3InstantiateCoSimulation(instanceName: $(instanceName), fmuInstantiationToken: $(fmuInstantiationToken), fmuResourceLocation: $(fmuResourceLocation), visible: $(visible), loggingOn: $(loggingOn)) → $(status)" return status end export fmi3InstantiateCoSimulation @@ -88,7 +88,7 @@ function fmi3InstantiateScheduledExecution(cfunc::Ptr{Nothing}, visible, loggingOn, eventModeUsed, earlyReturnAllowed, requiredIntermediateVariables, nRequiredIntermediateVariables, instanceEnvironment, logMessage, clockUpdate, lockPreemption, unlockPreemption) - @debug "fmi3InstantiateScheduledExecution(instanceName: $(instanceName), fmuType: $(fmuType), fmuInstantiationToken: $(fmuInstantiationToken), fmuResourceLocation: $(fmuResourceLocation), visible: $(visible), loggingOn: $(loggingOn)) → $(status)" + @debug "fmi3InstantiateScheduledExecution(instanceName: $(instanceName), fmuInstantiationToken: $(fmuInstantiationToken), fmuResourceLocation: $(fmuResourceLocation), visible: $(visible), loggingOn: $(loggingOn)) → $(status)" return status end export fmi3InstantiateScheduledExecution @@ -989,7 +989,7 @@ function fmi3GetDirectionalDerivative!(cfunc::Ptr{Nothing}, c::fmi3Instance, nSeed::Csize_t, sensitivity::AbstractArray{fmi3Float64}, nSensitivity::Csize_t) - @assert fmi3ProvidesDirectionalDerivatives(c.fmu) ["fmi3GetDirectionalDerivative!(...): This FMU does not support build-in directional derivatives!"] + status = ccall(cfunc, fmi3Status, (fmi3Instance, Ptr{fmi3ValueReference}, Csize_t, Ptr{fmi3ValueReference}, Csize_t, Ptr{fmi3Float64}, Csize_t, Ptr{fmi3Float64}, Csize_t), @@ -1126,7 +1126,7 @@ This function can only be called in Model Exchange. fmi3GetNumberOfEventIndicators must be called after a structural parameter is changed. As long as no structural parameters changed, the number of states is given in the modelDescription.xml, alleviating the need to call this function. """ function fmi3GetNumberOfEventIndicators!(cfunc::Ptr{Nothing}, c::fmi3Instance, nEventIndicators::Ref{Csize_t}) - ccall(cfunc, + status = ccall(cfunc, fmi3Status, (fmi3Instance, Ptr{Csize_t}), c, nEventIndicators)