org.ptolemy.fmi
Class FMULog

java.lang.Object
  extended by org.ptolemy.fmi.FMULog

public class FMULog
extends java.lang.Object

A Functional Mock-up Interface (FMI) log method implementation.

This Java method is called via a callback from the FMI C-side. The FMI log method optionally takes a variable number of arguments and handles #TypevalueReference#, specially where Type is one of r, i, b or s. To print a #, use ##.

Version:
$Id: FMULog.java 66133 2013-04-25 21:59:22Z cxh $
Author:
Christopher Brooks
Accepted Rating:
Red (cxh)
Proposed Rating:
Red (cxh)

Field Summary
private static boolean _printedMessage
           
 
Constructor Summary
FMULog()
           
 
Method Summary
static void log(com.sun.jna.Pointer fmiComponent, java.lang.String instanceName, int status, java.lang.String category, java.lang.String message, com.sun.jna.Pointer parameters)
          Log a message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_printedMessage

private static boolean _printedMessage
Constructor Detail

FMULog

public FMULog()
Method Detail

log

public static void log(com.sun.jna.Pointer fmiComponent,
                       java.lang.String instanceName,
                       int status,
                       java.lang.String category,
                       java.lang.String message,
                       com.sun.jna.Pointer parameters)
Log a message. Note that arguments after the message are currently ignored.

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 message in printf format
parameters - The printf style parameters.