public class FMIScalarVariable
extends java.lang.Object
A Functional Mock-up Unit file is a .fmu file in zip format that contains a .xml file named "modelDescription.xml". In that file, the ModelVariables element may contain elements such as ScalarVariable.
FMI documentation may be found at http://www.modelisar.com/fmi.html.
Modifier and Type | Class and Description |
---|---|
static class |
FMIScalarVariable.Alias
Acceptable values for the alias xml attribute.
|
static class |
FMIScalarVariable.Causality
Acceptable values for the causality xml attribute.
|
static class |
FMIScalarVariable.Initial
Acceptable values for the initial xml attribute.
|
static class |
FMIScalarVariable.Variability
Acceptable values for the variability xml attribute.
|
Modifier and Type | Field and Description |
---|---|
FMIScalarVariable.Alias |
alias
The value of the alias xml attribute.
|
FMIScalarVariable.Causality |
causality
The value of the causality xml attribute.
|
java.lang.String |
description
The value of the description xml attribute.
|
java.util.Set<java.lang.String> |
directDependency
The input ports on which an output has a direct dependence.
|
FMIModelDescription |
fmiModelDescription
The Model Description for this variable.
|
boolean |
hasChanged
The boolean attribute for variable value changed.
|
FMIScalarVariable.Initial |
initial
The value of the initial xml attribute.
|
java.util.List<FMIScalarVariable> |
inputStateDependentScalarVariables
The input and state variables on which an output has a direct dependence.
|
boolean |
isState
The boolean attribute for state variable.
|
java.lang.String |
name
The value of the name xml attribute.
|
FMIType |
type
The value of the type xml attribute.
|
long |
valueReference
The value of the valueReference xml attribute.
|
FMIScalarVariable.Variability |
variability
The value of the variability xml attribute.
|
Constructor and Description |
---|
FMIScalarVariable()
Create an empty ScalarVariable.
|
FMIScalarVariable(FMIModelDescription fmiModelDescription,
org.w3c.dom.Element element)
Create a ScalarVariable from an XML Element.
|
Modifier and Type | Method and Description |
---|---|
boolean |
getBoolean(com.sun.jna.Pointer fmiComponent)
Return the value of this variable as a boolean.
|
Token |
getBooleanHybrid(com.sun.jna.Pointer fmiComponent)
Return the value of this variable as a boolean.
|
double |
getDouble(com.sun.jna.Pointer fmiComponent)
Return the value of this variable as a double.
|
Token |
getDoubleHybrid(com.sun.jna.Pointer fmiComponent)
Return the value of this variable as a double.
|
int |
getInt(com.sun.jna.Pointer fmiComponent)
Return the value of this variable as an int.
|
Token |
getIntHybrid(com.sun.jna.Pointer fmiComponent)
Return the value of this variable as an int.
|
java.lang.String |
getString(com.sun.jna.Pointer fmiComponent)
Return the value of this variable as a String.
|
Token |
getStringHybrid(com.sun.jna.Pointer fmiComponent)
Return the value of this variable as a String.
|
void |
setBoolean(com.sun.jna.Pointer fmiComponent,
boolean value)
Set the value of this variable as a boolean.
|
void |
setBooleanHybrid(com.sun.jna.Pointer fmiComponent,
boolean value,
boolean isAbsent)
Set the value of this variable as a boolean.
|
void |
setDouble(com.sun.jna.Pointer fmiComponent,
double value)
Set the value of this variable as a double.
|
void |
setDoubleHybrid(com.sun.jna.Pointer fmiComponent,
java.lang.Double value,
boolean isAbsent)
Set the value of this variable as a double.
|
void |
setInt(com.sun.jna.Pointer fmiComponent,
int value)
Set the value of this variable as an integer.
|
void |
setIntHybrid(com.sun.jna.Pointer fmiComponent,
java.lang.Integer value,
boolean isAbsent)
Set the value of this variable as an integer.
|
void |
setString(com.sun.jna.Pointer fmiComponent,
java.lang.String value)
Set the value of this variable as a String.
|
void |
setStringHybrid(com.sun.jna.Pointer fmiComponent,
java.lang.String value,
boolean isAbsent)
Set the value of this variable as a String.
|
public FMIScalarVariable.Alias alias
public FMIScalarVariable.Causality causality
public java.lang.String description
public java.util.Set<java.lang.String> directDependency
public FMIModelDescription fmiModelDescription
public boolean hasChanged
public FMIScalarVariable.Initial initial
public java.util.List<FMIScalarVariable> inputStateDependentScalarVariables
public boolean isState
public java.lang.String name
public FMIType type
public long valueReference
public FMIScalarVariable.Variability variability
public FMIScalarVariable()
public FMIScalarVariable(FMIModelDescription fmiModelDescription, org.w3c.dom.Element element)
fmiModelDescription
- the Model Description for this variable.element
- The XML Element that contains attributes.public boolean getBoolean(com.sun.jna.Pointer fmiComponent)
fmiComponent
- The Functional Mock-up Interface (FMI)
component that contains a reference to the variable.setBoolean(Pointer, boolean)
public double getDouble(com.sun.jna.Pointer fmiComponent)
fmiComponent
- The Functional Mock-up Interface (FMI)
component that contains a reference to the variable.setDouble(Pointer, double)
public int getInt(com.sun.jna.Pointer fmiComponent)
fmiComponent
- The Functional Mock-up Interface (FMI)
component that contains a reference to the variable.setInt(Pointer, int)
public java.lang.String getString(com.sun.jna.Pointer fmiComponent)
fmiComponent
- The Functional Mock-up Interface (FMI)
component that contains a reference to the variable.setString(Pointer, String)
public void setBoolean(com.sun.jna.Pointer fmiComponent, boolean value)
fmiComponent
- The Functional Mock-up Interface (FMI)
component that contains a reference to the variable.value
- The value of this variable.getBoolean(Pointer fmiComponent)
public void setDouble(com.sun.jna.Pointer fmiComponent, double value)
fmiComponent
- The Functional Mock-up Interface (FMI)
component that contains a reference to the variable.value
- The value of this variable.getDouble(Pointer)
public void setInt(com.sun.jna.Pointer fmiComponent, int value)
fmiComponent
- The Functional Mock-up Interface (FMI)
component that contains a reference to the variable.value
- The value of this variable.getInt(Pointer)
public void setString(com.sun.jna.Pointer fmiComponent, java.lang.String value)
fmiComponent
- The Functional Mock-up Interface (FMI)
component that contains a reference to the variable.value
- The value of this variable.getString(Pointer)
public Token getBooleanHybrid(com.sun.jna.Pointer fmiComponent)
fmiComponent
- The Functional Mock-up Interface (FMI)
component that contains a reference to the variable.setBooleanHybrid(Pointer, boolean, boolean)
public Token getDoubleHybrid(com.sun.jna.Pointer fmiComponent)
fmiComponent
- The Functional Mock-up Interface (FMI)
component that contains a reference to the variable.setDoubleHybrid(Pointer, Double, boolean)
public Token getIntHybrid(com.sun.jna.Pointer fmiComponent)
fmiComponent
- The Functional Mock-up Interface (FMI)
component that contains a reference to the variable.setIntHybrid(Pointer, Integer, boolean)
public Token getStringHybrid(com.sun.jna.Pointer fmiComponent)
fmiComponent
- The Functional Mock-up Interface (FMI)
component that contains a reference to the variable.setStringHybrid(Pointer, String, boolean)
public void setBooleanHybrid(com.sun.jna.Pointer fmiComponent, boolean value, boolean isAbsent)
fmiComponent
- The Functional Mock-up Interface (FMI)
component that contains a reference to the variable.value
- The value of this variable.isAbsent
- True if the variable can have the value of absent.getBooleanHybrid(Pointer fmiComponent)
public void setDoubleHybrid(com.sun.jna.Pointer fmiComponent, java.lang.Double value, boolean isAbsent)
fmiComponent
- The Functional Mock-up Interface (FMI)
component that contains a reference to the variable.value
- The value of this variable.isAbsent
- True if the variable can have the value of absent.getDoubleHybrid(Pointer)
public void setIntHybrid(com.sun.jna.Pointer fmiComponent, java.lang.Integer value, boolean isAbsent)
fmiComponent
- The Functional Mock-up Interface (FMI)
component that contains a reference to the variable.value
- The value of this variable.isAbsent
- True if the variable can have the value of absent.getIntHybrid(Pointer)
public void setStringHybrid(com.sun.jna.Pointer fmiComponent, java.lang.String value, boolean isAbsent)
fmiComponent
- The Functional Mock-up Interface (FMI)
component that contains a reference to the variable.value
- The value of this variable.isAbsent
- True if the variable can have the value of absent.getStringHybrid(Pointer)