org.ptolemy.fmi
Class FMICallbackFunctions

java.lang.Object
  extended by com.sun.jna.Structure
      extended by org.ptolemy.fmi.FMICallbackFunctions
Direct Known Subclasses:
FMICallbackFunctions.ByValue

public class FMICallbackFunctions
extends com.sun.jna.Structure

Functional Mock-up Interface (FMI) 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..

Version:
$Id: FMICallbackFunctions.java 66026 2013-04-07 16:41:23Z cxh $
Author:
Christopher Brooks
Accepted Rating:
Red (cxh)
Proposed Rating:
Red (cxh)

Nested Class Summary
static class FMICallbackFunctions.ByValue
          A class that contains references to the callback functions.
 
Nested classes/interfaces inherited from class com.sun.jna.Structure
com.sun.jna.Structure.ByReference
 
Field Summary
 FMILibrary.FMICallbackAllocateMemory allocateMemory
          C type : fmiCallbackAllocateMemory.
 FMILibrary.FMICallbackFreeMemory freeMemory
          C type: fmiCallbackFreeMemory.
 FMILibrary.FMICallbackLogger logger
          C type: fmiCallbackLogger.
 FMILibrary.FMIStepFinished stepFinished
          C type: fiStepFinished.
 
Fields inherited from class com.sun.jna.Structure
ALIGN_DEFAULT, ALIGN_GNUC, ALIGN_MSVC, ALIGN_NONE, CALCULATE_SIZE
 
Constructor Summary
FMICallbackFunctions()
          Instantiate a Java representation of the C structure that contains the FMI call backs.
FMICallbackFunctions(FMILibrary.FMICallbackLogger logger, FMILibrary.FMICallbackAllocateMemory allocateMemory, FMILibrary.FMICallbackFreeMemory freeMemory, FMILibrary.FMIStepFinished stepFinished)
          Instantiate a Java representation of the C structure that contains the FMI call backs.
 
Method Summary
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, getStructAlignment, hashCode, newInstance, read, readField, setAlignType, setAutoRead, setAutoSynch, setAutoWrite, setFieldOrder, setTypeMapper, size, sortFields, toArray, toArray, toString, toString, useMemory, useMemory, write, writeField, writeField
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

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.

Constructor Detail

FMICallbackFunctions

public FMICallbackFunctions()
Instantiate a Java representation of the C structure that contains the FMI call backs.


FMICallbackFunctions

public FMICallbackFunctions(FMILibrary.FMICallbackLogger logger,
                            FMILibrary.FMICallbackAllocateMemory allocateMemory,
                            FMILibrary.FMICallbackFreeMemory freeMemory,
                            FMILibrary.FMIStepFinished stepFinished)
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: fmiCallbackAllocateMemory
freeMemory - The method called to free allocated memory (C type: fmiCallbackFreeMemory)
stepFinished - The method called when the step is finished. (C type: FmiStepFinished)
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 class com.sun.jna.Structure
Returns:
a list of strings that name the fields in order.

initFieldOrder

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.