Package org.lemsml.jruntime
Class NativeWrapper
- java.lang.Object
-
- org.lemsml.jruntime.NativeWrapper
-
- All Implemented Interfaces:
StateRunnable
public class NativeWrapper extends java.lang.Object implements StateRunnable
-
-
Field Summary
Fields Modifier and Type Field Description (package private) NativeTypenativeType(package private) GeneratedInstancetarget
-
Constructor Summary
Constructors Constructor Description NativeWrapper(GeneratedInstance geninst, NativeType nt)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAttachment(java.lang.String destAttachments, StateInstance rsi)voidaddAttachment(StateInstance rsi)voidadvance(StateRunnable parent, double t, double dt)voidcheckBuilt()voidevaluate(StateRunnable parent)voidexportState(java.lang.String pfx, double t, LineDisplay ld)StateRunnablegetChild(java.lang.String snm)StateRunnablegetChildInstance(java.lang.String string)java.lang.StringgetChildSummary()java.lang.ObjectgetComponentID()java.lang.StringgetDimensionString(java.lang.String lastbit)InPortgetFirstInPort()OutPortgetFirstOutPort()doublegetFloatProperty(java.lang.String sel)java.lang.StringgetID()InPortgetInPort(java.lang.String portId)InstanceSet<StateRunnable>getInstanceSet(java.lang.String col)OutPortgetOutPort(java.lang.String sourcePortId)StateRunnablegetParent()java.util.ArrayList<StateRunnable>getPathInstances(java.lang.String sel)StateRunnablegetPathStateInstance(java.lang.String path)java.lang.StringgetPathStringValue(java.lang.String fieldName, double fac, double off)StateRunnablegetScopeInstance(java.lang.String id)MultiInstancegetSingleMI()java.util.ArrayList<StateRunnable>getStateInstances()java.util.ArrayList<StateRunnable>getStateInstances(java.lang.String path)InstanceSet<StateRunnable>getUniqueInstanceSet()doublegetVariable(java.lang.String varname)java.util.HashMap<java.lang.String,DoublePointer>getVariables()java.lang.ObjectgetWork()StateWrappergetWrapper(java.lang.String string)booleanhasChildInstance(java.lang.String string)booleanhasSingleMI()voidinitialize(StateRunnable sr)booleanisBuilt()doublequietGetFloatProperty(java.lang.String sel)java.util.ArrayList<StateRunnable>quietGetStateInstances(java.lang.String path)voidsetList(java.lang.String childrenName)voidsetNewVariable(java.lang.String string, double d)voidsetParent(StateRunnable par)voidsetVariable(java.lang.String varname, double d)java.lang.StringstateString()
-
-
-
Field Detail
-
target
GeneratedInstance target
-
nativeType
NativeType nativeType
-
-
Constructor Detail
-
NativeWrapper
public NativeWrapper(GeneratedInstance geninst, NativeType nt)
-
-
Method Detail
-
advance
public void advance(StateRunnable parent, double t, double dt) throws RuntimeError, ContentError
- Specified by:
advancein interfaceStateRunnable- Throws:
RuntimeErrorContentError
-
getVariable
public double getVariable(java.lang.String varname) throws RuntimeError- Specified by:
getVariablein interfaceStateRunnable- Throws:
RuntimeError
-
getChild
public StateRunnable getChild(java.lang.String snm) throws ConnectionError
- Specified by:
getChildin interfaceStateRunnable- Throws:
ConnectionError
-
exportState
public void exportState(java.lang.String pfx, double t, LineDisplay ld)- Specified by:
exportStatein interfaceStateRunnable
-
getFirstInPort
public InPort getFirstInPort() throws ConnectionError
- Specified by:
getFirstInPortin interfaceStateRunnable- Throws:
ConnectionError
-
getInPort
public InPort getInPort(java.lang.String portId) throws ConnectionError
- Specified by:
getInPortin interfaceStateRunnable- Throws:
ConnectionError
-
getWrapper
public StateWrapper getWrapper(java.lang.String string)
- Specified by:
getWrapperin interfaceStateRunnable
-
getVariables
public java.util.HashMap<java.lang.String,DoublePointer> getVariables()
- Specified by:
getVariablesin interfaceStateRunnable
-
stateString
public java.lang.String stateString()
- Specified by:
stateStringin interfaceStateRunnable
-
setVariable
public void setVariable(java.lang.String varname, double d)- Specified by:
setVariablein interfaceStateRunnable
-
getID
public java.lang.String getID()
- Specified by:
getIDin interfaceStateRunnable
-
setNewVariable
public void setNewVariable(java.lang.String string, double d)- Specified by:
setNewVariablein interfaceStateRunnable
-
evaluate
public void evaluate(StateRunnable parent) throws RuntimeError, ContentError
- Specified by:
evaluatein interfaceStateRunnable- Throws:
RuntimeErrorContentError
-
initialize
public void initialize(StateRunnable sr) throws RuntimeError, ContentError
- Specified by:
initializein interfaceStateRunnable- Throws:
RuntimeErrorContentError
-
getComponentID
public java.lang.Object getComponentID()
- Specified by:
getComponentIDin interfaceStateRunnable
-
hasChildInstance
public boolean hasChildInstance(java.lang.String string)
- Specified by:
hasChildInstancein interfaceStateRunnable
-
getChildInstance
public StateRunnable getChildInstance(java.lang.String string) throws ContentError
- Specified by:
getChildInstancein interfaceStateRunnable- Throws:
ContentError
-
quietGetStateInstances
public java.util.ArrayList<StateRunnable> quietGetStateInstances(java.lang.String path) throws ConnectionError, ContentError, RuntimeError
- Specified by:
quietGetStateInstancesin interfaceStateRunnable- Throws:
ConnectionErrorContentErrorRuntimeError
-
setParent
public void setParent(StateRunnable par)
- Specified by:
setParentin interfaceStateRunnable
-
getStateInstances
public java.util.ArrayList<StateRunnable> getStateInstances() throws ConnectionError, ContentError, RuntimeError
- Specified by:
getStateInstancesin interfaceStateRunnable- Throws:
ConnectionErrorContentErrorRuntimeError
-
checkBuilt
public void checkBuilt() throws ConnectionError, ContentError, RuntimeError- Specified by:
checkBuiltin interfaceStateRunnable- Throws:
ConnectionErrorContentErrorRuntimeError
-
getScopeInstance
public StateRunnable getScopeInstance(java.lang.String id)
- Specified by:
getScopeInstancein interfaceStateRunnable
-
getPathInstances
public java.util.ArrayList<StateRunnable> getPathInstances(java.lang.String sel) throws ContentError, ConnectionError, RuntimeError
- Specified by:
getPathInstancesin interfaceStateRunnable- Throws:
ContentErrorConnectionErrorRuntimeError
-
quietGetFloatProperty
public double quietGetFloatProperty(java.lang.String sel) throws ContentError- Specified by:
quietGetFloatPropertyin interfaceStateRunnable- Throws:
ContentError
-
hasSingleMI
public boolean hasSingleMI()
- Specified by:
hasSingleMIin interfaceStateRunnable
-
getOutPort
public OutPort getOutPort(java.lang.String sourcePortId)
- Specified by:
getOutPortin interfaceStateRunnable
-
getPathStateInstance
public StateRunnable getPathStateInstance(java.lang.String path) throws ContentError
- Specified by:
getPathStateInstancein interfaceStateRunnable- Throws:
ContentError
-
getFirstOutPort
public OutPort getFirstOutPort()
- Specified by:
getFirstOutPortin interfaceStateRunnable
-
getParent
public StateRunnable getParent()
- Specified by:
getParentin interfaceStateRunnable
-
getUniqueInstanceSet
public InstanceSet<StateRunnable> getUniqueInstanceSet() throws ContentError
- Specified by:
getUniqueInstanceSetin interfaceStateRunnable- Throws:
ContentError
-
getInstanceSet
public InstanceSet<StateRunnable> getInstanceSet(java.lang.String col)
- Specified by:
getInstanceSetin interfaceStateRunnable
-
getWork
public java.lang.Object getWork()
- Specified by:
getWorkin interfaceStateRunnable
-
getStateInstances
public java.util.ArrayList<StateRunnable> getStateInstances(java.lang.String path) throws ConnectionError, ContentError, RuntimeError
- Specified by:
getStateInstancesin interfaceStateRunnable- Throws:
ConnectionErrorContentErrorRuntimeError
-
getFloatProperty
public double getFloatProperty(java.lang.String sel) throws ContentError- Specified by:
getFloatPropertyin interfaceStateRunnable- Throws:
ContentError
-
getPathStringValue
public java.lang.String getPathStringValue(java.lang.String fieldName, double fac, double off) throws ContentError, RuntimeError- Specified by:
getPathStringValuein interfaceStateRunnable- Throws:
ContentErrorRuntimeError
-
addAttachment
public void addAttachment(java.lang.String destAttachments, StateInstance rsi) throws ConnectionError, ContentError, RuntimeError- Specified by:
addAttachmentin interfaceStateRunnable- Throws:
ConnectionErrorContentErrorRuntimeError
-
getSingleMI
public MultiInstance getSingleMI()
- Specified by:
getSingleMIin interfaceStateRunnable
-
setList
public void setList(java.lang.String childrenName)
- Specified by:
setListin interfaceStateRunnable
-
getChildSummary
public java.lang.String getChildSummary()
- Specified by:
getChildSummaryin interfaceStateRunnable
-
isBuilt
public boolean isBuilt()
- Specified by:
isBuiltin interfaceStateRunnable
-
addAttachment
public void addAttachment(StateInstance rsi) throws ConnectionError, ContentError, RuntimeError
- Specified by:
addAttachmentin interfaceStateRunnable- Throws:
ConnectionErrorContentErrorRuntimeError
-
getDimensionString
public java.lang.String getDimensionString(java.lang.String lastbit)
- Specified by:
getDimensionStringin interfaceStateRunnable
-
-