|
simulink | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.tum.cs.simulink.model.ParameterizedElement
edu.tum.cs.simulink.model.SimulinkElementBase
edu.tum.cs.simulink.model.SimulinkBlock
edu.tum.cs.simulink.model.SimulinkModel
public class SimulinkModel
A Simulink model a specialized Simulink block that primarily maintains the default parameters of blocks, annotations and lines. See the package documentation for details on the parameter mechanism.
Constructor Summary | |
---|---|
|
SimulinkModel(java.io.File file,
boolean isLibrary)
Create new model. |
protected |
SimulinkModel(SimulinkModel origModel)
This copy constructor clones the whole model. |
Method Summary | |
---|---|
SimulinkModel |
deepClone()
Deep clone this model. |
java.lang.String |
getAnnotationDefaultParameter(java.lang.String name)
Get default annotation parameter. |
|
getAnnotationDefaultParameterNames()
Get names of annotation default parameters. |
SimulinkBlock |
getBlock(java.lang.String id)
Get a block specified by its full qualified name. |
java.lang.String |
getBlockDefaultParameter(java.lang.String name)
Get block default parameter. |
|
getBlockDefaultParameterNames()
Get names of block default parameters. |
java.util.Set<java.lang.String> |
getBlockDefaultParameterNames(java.lang.String type)
Get all default parameter names for a given type. |
java.lang.String |
getId()
Returns the name of the model. |
java.lang.String |
getLineDefaultParameter(java.lang.String name)
Get default line parameter. |
|
getLineDefaultParameterNames()
Get default line parameter names. |
SimulinkModel |
getModel()
Returns itself. |
StateflowMachine |
getStateflowMachine()
Get Stateflow machine of this model (may be null ). |
java.lang.String |
getType()
Returns SimulinkConstants.TYPE_Model . |
java.lang.String |
getTypeBlockDefaultParameter(java.lang.String type,
java.lang.String name)
Get named default parameter for a given type. |
boolean |
isLibrary()
Is this model a library? |
void |
setAnnotationDefaultParameter(java.lang.String name,
java.lang.String value)
Set annotation default parameter. |
void |
setBlockDefaultParameter(java.lang.String name,
java.lang.String value)
Set a default parameter for all blocks. |
void |
setBlockTypeDefaultParameter(java.lang.String type,
java.lang.String name,
java.lang.String value)
Set default parameter for blocks of a specified type. |
void |
setLineDefaultParameter(java.lang.String name,
java.lang.String value)
Set default parameter for lines. |
protected void |
setParent(SimulinkBlock parent)
This throws a UnsupportedOperationException as models cannot have
parents. |
void |
setStateflowMachine(StateflowMachine machine)
Set Stateflow machine. |
Methods inherited from class edu.tum.cs.simulink.model.SimulinkBlock |
---|
addAnnotation, addSubBlock, getAnnotations, getInLines, getInPort, getInPorts, getOutLines, getOutPort, getOutPorts, getResolvedType, getSubBlock, getSubBlocks, hasSubBlocks, remove, toString |
Methods inherited from class edu.tum.cs.simulink.model.SimulinkElementBase |
---|
getName, getParent |
Methods inherited from class edu.tum.cs.simulink.model.ParameterizedElement |
---|
getDeclaredParameter, getDeclaredParameterNames, getParameter, getParameterNames, setParameter |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SimulinkModel(java.io.File file, boolean isLibrary)
file
- the file this model is stored inprotected SimulinkModel(SimulinkModel origModel) throws DeepCloneException
DeepCloneException
Method Detail |
---|
public void setAnnotationDefaultParameter(java.lang.String name, java.lang.String value)
public void setBlockDefaultParameter(java.lang.String name, java.lang.String value)
public void setBlockTypeDefaultParameter(java.lang.String type, java.lang.String name, java.lang.String value)
public void setLineDefaultParameter(java.lang.String name, java.lang.String value)
public SimulinkModel deepClone() throws DeepCloneException
deepClone
in class SimulinkBlock
DeepCloneException
public java.lang.String getAnnotationDefaultParameter(java.lang.String name)
publicgetAnnotationDefaultParameterNames()
public SimulinkBlock getBlock(java.lang.String id)
null
if the block was
not found.
public java.lang.String getBlockDefaultParameter(java.lang.String name)
public java.lang.String getTypeBlockDefaultParameter(java.lang.String type, java.lang.String name)
getBlockDefaultParameter(String)
)
is returned.
publicgetBlockDefaultParameterNames()
public java.util.Set<java.lang.String> getBlockDefaultParameterNames(java.lang.String type)
getBlockDefaultParameterNames()
).
public java.lang.String getId()
getId
in class SimulinkElementBase
public java.lang.String getLineDefaultParameter(java.lang.String name)
publicgetLineDefaultParameterNames()
public SimulinkModel getModel()
getModel
in class SimulinkElementBase
public StateflowMachine getStateflowMachine()
null
).
public java.lang.String getType()
SimulinkConstants.TYPE_Model
.
getType
in class SimulinkBlock
public boolean isLibrary()
public void setStateflowMachine(StateflowMachine machine)
StateflowMachine
.
PreconditionException
- if this model already has a machine of if the machine does
not belong to this model.protected void setParent(SimulinkBlock parent)
UnsupportedOperationException
as models cannot have
parents.
setParent
in class SimulinkElementBase
|
simulink | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |