public class FMULogUtilities
extends java.lang.Object
This file contains a method based on fmusdk/src/shared/sim_support.c by Jakob Mauss, which has the following license:
FMU SDK license
Copyright (c) 2011, QTronic GmbH. All rights reserved.
The FmuSdk is licensed by the copyright holder under the BSD License
(http://www.opensource.org/licenses/bsd-license.html):
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY QTRONIC GMBH "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL QTRONIC GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Modifier and Type | Field and Description |
---|---|
(package private) static java.lang.Class |
FMI_BOOLEAN_TYPE_CLASS
The FMIBooleanType class.
|
(package private) static java.lang.Class |
FMI_INTEGER_TYPE_CLASS
The FMIIntegerType class.
|
(package private) static java.lang.Class |
FMI_REAL_TYPE_CLASS
The FMIRealType class.
|
(package private) static java.lang.Class |
FMI_STRING_TYPE_CLASS
The FMIStringType class.
|
Constructor and Description |
---|
FMULogUtilities() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
fmiStatusToString(int status)
Given a fmiStatus value, return a string description.
|
static java.lang.String |
replaceVariableReferences(FMIModelDescription modelDescription,
java.lang.String messageString)
Replace FMI variable references with the name of the variable.
|
static java.lang.Class FMI_REAL_TYPE_CLASS
static java.lang.Class FMI_INTEGER_TYPE_CLASS
static java.lang.Class FMI_BOOLEAN_TYPE_CLASS
static java.lang.Class FMI_STRING_TYPE_CLASS
public static java.lang.String replaceVariableReferences(FMIModelDescription modelDescription, java.lang.String messageString)
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
##.
This method is based on based on a method by the same name in shared/sim_support.c from FMUSDK.
modelDescription
- The model description that contains the
names of the variables.messageString
- The string that has had the % directed
processed. The input will be of the format "foo #r1234# bar".public static java.lang.String fmiStatusToString(int status)
status
- One of the values from
FMILibrary.FMIStatus