Class FMULibrary.FMULogger

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.jna.Callback

        com.sun.jna.Callback.UncaughtExceptionHandler
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected FMIModelDescription _modelDescription
      The model description that contains the names of the variables.
      • Fields inherited from interface com.sun.jna.Callback

        FORBIDDEN_NAMES, METHOD_NAME
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void apply​(com.sun.jna.Pointer fmiComponent, java.lang.String instanceName, int status, java.lang.String category, java.lang.String message)
      Log a message.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • _modelDescription

        protected FMIModelDescription _modelDescription
        The model description that contains the names of the variables.
    • Constructor Detail

      • FMULogger

        public FMULogger​(FMIModelDescription modelDescription)
        Instantiate a FMULogger.
        Parameters:
        modelDescription - The model description that contains the names of the variables. The FMI specification states that the variable names might not be stored in the C-functions, which is why we can't just use the fmiComponent.
    • Method Detail

      • apply

        public void apply​(com.sun.jna.Pointer fmiComponent,
                          java.lang.String instanceName,
                          int status,
                          java.lang.String category,
                          java.lang.String message)
        Log a message.
        Specified by:
        apply in interface FMILibrary.FMICallbackLogger
        Parameters:
        fmiComponent - The component that was instantiated.
        instanceName - The name of the instance of the FMU.
        status - The fmiStatus, see FMILibrary.FMIStatus
        category - The category of the message, defined by the tool that created the fmu. Typical values are "log" or "error".
        message - The printf style format string.