Class 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)
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.sun.jna.Structure

        com.sun.jna.Structure.ByReference, com.sun.jna.Structure.ByValue, com.sun.jna.Structure.StructField
    • 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
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • 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: fmiCallbackAllocateMemory
        freeMemory - 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 class com.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.