Package org.ptolemy.fmi
Class FMI20CallbackFunctions
- java.lang.Object
-
- com.sun.jna.Structure
-
- org.ptolemy.fmi.FMI20CallbackFunctions
-
public class FMI20CallbackFunctions extends com.sun.jna.Structure
Functional Mock-up Interface (FMI) 2.0 callback functions needed by Java Native Access (JNA) so that a FMU * can perform functions like allocating and freeing memory, printing log messages and handle the end of a step.The C language interface to Functional Mock-up Unit (FMU) files includes a fmiCallbackFunctions struct whose elements are callbacks to methods are called to log status messages, allocate memory, free memory and to notify the system that the step is finished. This class encapsulates those callbacks.
For details about how Callbacks work in JNA, see http://twall.github.com/jna/3.4.0/javadoc/overview-summary.html#callbacks.
This file is based on a file that was autogenerated by JNAerator,
a tool written by Olivier Chafik that uses a few opensource projects..- Since:
- Ptolemy II 11.0
- Version:
- $Id$, $Id$
- Author:
- Christopher Brooks
- Pt.AcceptedRating:
- Red (cxh)
- Pt.ProposedRating:
- Red (cxh)
-
-
Field Summary
Fields Modifier and Type Field Description FMILibrary.FMICallbackAllocateMemory
allocateMemory
C type : fmiCallbackAllocateMemory.com.sun.jna.Pointer
componentEnvironment
C type: fmiComponentEnvironment, which is a void *.FMILibrary.FMICallbackFreeMemory
freeMemory
C type: fmiCallbackFreeMemory.FMILibrary.FMICallbackLogger
logger
C type: fmiCallbackLogger.FMILibrary.FMIStepFinished
stepFinished
C type: fiStepFinished.
-
Constructor Summary
Constructors Constructor Description FMI20CallbackFunctions()
Instantiate a Java representation of the C structure that contains the FMI call backs.FMI20CallbackFunctions(FMILibrary.FMICallbackLogger logger, FMILibrary.FMICallbackAllocateMemory allocateMemory, FMILibrary.FMICallbackFreeMemory freeMemory, FMILibrary.FMIStepFinished stepFinished, com.sun.jna.Pointer componentEnvironment)
Instantiate a Java representation of the C structure that contains the FMI call backs.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected java.util.List
getFieldOrder()
Return the field names in the proper order.protected void
initFieldOrder()
Deprecated.As of jna-3.5.0, use getFieldOrder() instead.-
Methods inherited from class com.sun.jna.Structure
allocateMemory, allocateMemory, autoAllocate, autoRead, autoRead, autoWrite, autoWrite, cacheTypeInfo, clear, ensureAllocated, equals, fieldOffset, getAutoRead, getAutoWrite, getFieldList, getFields, getNativeAlignment, getNativeSize, getNativeSize, getPointer, getStringEncoding, getStructAlignment, hashCode, newInstance, newInstance, read, readField, readField, setAlignType, setAutoRead, setAutoSynch, setAutoWrite, setFieldOrder, setStringEncoding, size, sortFields, toArray, toArray, toString, toString, useMemory, useMemory, write, writeField, writeField, writeField
-
-
-
-
Field Detail
-
logger
public FMILibrary.FMICallbackLogger logger
C type: fmiCallbackLogger.
-
allocateMemory
public FMILibrary.FMICallbackAllocateMemory allocateMemory
C type : fmiCallbackAllocateMemory.
-
freeMemory
public FMILibrary.FMICallbackFreeMemory freeMemory
C type: fmiCallbackFreeMemory.
-
stepFinished
public FMILibrary.FMIStepFinished stepFinished
C type: fiStepFinished.
-
componentEnvironment
public com.sun.jna.Pointer componentEnvironment
C type: fmiComponentEnvironment, which is a void *.
-
-
Constructor Detail
-
FMI20CallbackFunctions
public FMI20CallbackFunctions()
Instantiate a Java representation of the C structure that contains the FMI call backs.
-
FMI20CallbackFunctions
public FMI20CallbackFunctions(FMILibrary.FMICallbackLogger logger, FMILibrary.FMICallbackAllocateMemory allocateMemory, FMILibrary.FMICallbackFreeMemory freeMemory, FMILibrary.FMIStepFinished stepFinished, com.sun.jna.Pointer componentEnvironment)
Instantiate a Java representation of the C structure that contains the FMI call backs.- Parameters:
logger
- The method called to log a status message (C type: fmiCallbackLogger).allocateMemory
- The method called to allocate cleared memory (C type: fmiCallbackAllocateMemoryfreeMemory
- The method called to free allocated memory (C type: fmiCallbackFreeMemory)stepFinished
- The method called when the step is finished. (C type: FmiStepFinished)componentEnvironment
- The environment for the component. (C type: fmi2ComponentEnvironment)
-
-
Method Detail
-
getFieldOrder
protected java.util.List getFieldOrder()
Return the field names in the proper order.This is new in jna-3.5.0.
- Specified by:
getFieldOrder
in classcom.sun.jna.Structure
- Returns:
- a list of strings that name the fields in order.
-
initFieldOrder
@Deprecated protected void initFieldOrder()
Deprecated.As of jna-3.5.0, use getFieldOrder() instead.Set the initialization order of the fields so that the order matches the order of the C structure.
-
-