Click or drag to resize

Instance Class

Fmu instance.
Inheritance Hierarchy
SystemObject
  Emulate3D.FMI.V3Instance

Namespace:  Emulate3D.FMI.V3
Assembly:  Emulate3D.FMI (in Emulate3D.FMI.dll) Version: 18.04.00
Syntax
C#
public sealed class Instance : IInstance, 
	IDisposable, INotifyPropertyChanged

The Instance type exposes the following members.

Properties
  NameDescription
Public propertyCurrentStep
The current communication step size in milliseconds. Updated after the step size has been calculated, but before the step is executed. -1 indicates no current step size.
Public propertyDiscardAction
The action to take when an API method returns a Discard status. These action is only taken when the API is called by the simulation, not as a result of scripting.
Public propertyErrorAction
The action to take when an API method returns an Error status. These action is only taken when the API is called by the simulation, not as a result of scripting.
Public propertyFatalAction
The action to take when an API method returns a Fatal status. These action is only taken when the API is called by the simulation, not as a result of scripting.
Public propertyFmu
Fmu that created this instance.
Public propertyIndividualIO
If true, IO functions are called for each variable individually.
Public propertyMaxStep
The minimum communication step size in milliseconds.
Public propertyMinStep
The minimum communication step size in milliseconds.
Public propertyName
Instance name.
Public propertyNameToVariable
Read-only mapping between Name and the variable.
Public propertyOKAction
The action to take when an API method returns an OK status. These action is only taken when the API is called by the simulation, not as a result of scripting.
Public propertyPlatform
Instance platform.
Public propertyPreferredStep
The preferred communication step size in milliseconds. -1 indicates no preferred step size.
Public propertyStopTimeAction
Defines what action to take when the simulation reaches a pre-defined stop-time.
Public propertyVariables
Read-only list of all variables.
Public propertyWarningAction
The action to take when an API method returns a Warning status. These action is only taken when the API is called by the simulation, not as a result of scripting.
Top
Methods
  NameDescription
Public methodDeserializeFmuState
Deserializes the byte vector, constructs a copy of the FMU state and returns the pointer to this copy.
Public methodDispose
Releases all resources used by the Instance
Public methodDoStep
Requests the computation of the next time step.
Public methodEnterConfigurationMode
Enter configuration mode.
Public methodEnterEventMode
Enter event mode.
Public methodEnterInitializationMode
Enter initialization mode.
Public methodExitConfigurationMode
Exit configuration mode.
Public methodExitInitializationMode
Exit initialization mode.
Public methodFreeFmuState
This function frees all memory and other resources allocated with the GetFmuState(IntPtr) call for the provided pointer.
Public methodFreeInstance
Disposes the given instance, unloads the loaded model, and frees all the allocated memory and other resources that have been allocated by the functions of the FMU interface.
Public methodGetAdjointDerivative
Get adjoint derivative.
Public methodGetBinary
Update values of binary variables. Calls the respective API function call.
Public methodGetBoolean
Update values of boolean variables. Calls the respective API function call.
Public methodGetClock
Update values of clock variables. Calls the respective API function call.
Public methodGetDirectionalDerivative
Get directional derivative.
Public methodGetFloat32
Update values of Float32 variables. Calls the respective API function call.
Public methodGetFloat64
Update values of Float64 variables. Calls the respective API function call.
Public methodGetFmuState
This function copies the internal FMU state and returns a pointer to this copy.
Public methodGetInt16
Update values of Int16 variables. Calls the respective API function call.
Public methodGetInt32
Update values of Int32 variables. Calls the respective API function call.
Public methodGetInt64
Update values of Int64 variables. Calls the respective API function call.
Public methodGetInt8
Update values of Int8 variables. Calls the respective API function call.
Public methodGetIntervalDecimal
Get interval decimal for clock variables.
Public methodGetIntervalFraction
Get interval fraction for clock variables.
Public methodGetNumberOfContinuousStates
Get number of continuous states.
Public methodGetNumberOfEventIndicators
Get number of event indicators.
Public methodGetNumberOfVariableDependencies
Get the number of dependencies for a variable.
Public methodGetOutputDerivatives
Get output derivatives.
Public methodGetSerializedFmuStateSize
Returns the size of the byte vector, in order that the FMU state can be serialized in it.
Public methodGetShiftDecimal
Get shift decimal for clock variables.
Public methodGetShiftFraction
Get shift fraction for clock variables.
Public methodGetString
Update values of string variables. Calls the respective API function call.
Public methodGetUInt16
Update values of UInt16 variables. Calls the respective API function call.
Public methodGetUInt32
Update values of UInt32 variables. Calls the respective API function call.
Public methodGetUInt64
Update values of UInt64 variables. Calls the respective API function call.
Public methodGetUInt8
Update values of UInt8 variables. Calls the respective API function call.
Public methodGetVariableDependencies
Get variable dependencies for a specific dependent variable.
Public methodReset
Reset the FMU after a simulation run.
Public methodSerializeFmuState
Serializes the data which is referenced by the pointer and copies this data in to the byte vector.
Public methodSetBinary
Write current values of binary variables. Calls the respective API function call.
Public methodSetBoolean
Write current values of boolean variables. Calls the respective API function call.
Public methodSetClock
Write current values of clock variables. Calls the respective API function call.
Public methodSetDebugLogging
Controls the debug logging that is output via the logger callback function by the FMU.
Public methodSetFloat32
Write current values of Float32 variables. Calls the respective API function call.
Public methodSetFloat64
Write current values of Float64 variables. Calls the respective API function call.
Public methodSetFmuState
This function restores the state provided by the pointer to FMU state.
Public methodSetInt16
Write current values of Int16 variables. Calls the respective API function call.
Public methodSetInt32
Write current values of Int32 variables. Calls the respective API function call.
Public methodSetInt64
Write current values of Int64 variables. Calls the respective API function call.
Public methodSetInt8
Write current values of Int8 variables. Calls the respective API function call.
Public methodSetIntervalDecimal
Set interval decimal for clock variables.
Public methodSetIntervalFraction
Set interval fraction for clock variables.
Public methodSetShiftDecimal
Set shift decimal for clock variables.
Public methodSetShiftFraction
Set shift fraction for clock variables.
Public methodSetString
Write current values of string variables. Calls the respective API function call.
Public methodSetUInt16
Write current values of UInt16 variables. Calls the respective API function call.
Public methodSetUInt32
Write current values of UInt32 variables. Calls the respective API function call.
Public methodSetUInt64
Write current values of UInt64 variables. Calls the respective API function call.
Public methodSetUInt8
Write current values of UInt8 variables. Calls the respective API function call.
Public methodTerminate
Changes instance state to terminated.
Top
Events
  NameDescription
Public eventOnClockUpdate
Raised when the FMU calls the clock update callback function.
Public eventOnEnterConfigurationMode
Raised when the FMU has entered configuration or reconfiguration mode.
Public eventOnEnterInitializationMode
Raised when the FMU has entered initialization mode.
Public eventOnExitConfigurationMode
Raised when the FMU has exited configuration or reconfiguration mode.
Public eventOnExitInitializationMode
Raised when the FMU has exited initialization mode.
Public eventOnIntermediateUpdate
Raised when the FMU calls the intermediate update callback function.
Public eventOnLockPreemption
Raised when the FMU calls the lock preemption callback function.
Public eventOnLogMessage
Raised when the FMU calls the log message callback function.
Public eventOnUnlockPreemption
Raised when the FMU calls the unlock preemption callback function.
Public eventPropertyChanged
Top
See Also