functionevaluateProbe
Information
Evaluates a property of a node of the probe tree of a file, see getProbeTree,
and returns the result as JSON: a list of items, each a text, a node
(the id of a node of the tree), a diagnostic with a severity (error, warning or
info), a span and a message, or an arrow with a color, a span, the
span it points to and a message.
The properties are:
text,hover: the source of the node and what an editor shows when hovering it.errors,topClasses,contextModel,omcVersionof the file: the names that couldn't be looked up and the messages ofcheckModelof the models in it, and its classes.definition,uses,useArrows,role: what a name refers to and how it's used there, and the uses in the file of a class, component or declared name, as nodes or as arrows from the declaration.dependsOn,checkModel,flatModelica,modelInstanceof a class: the classes it uses, as ingetDependencyGraph, and the results ofcheckModel, ofinstantiateModelas Base Modelica and ofgetModelInstance.simVariables,simEquations,jacobianEquations,cCode,translationMessages,flatDeclarations,connectionEquations: what a class, component, equation or connect became in the translation of the context model: its simulation variables, the simulation equations with the symbolic operations done on them, the generated C functions of the equations, the declarations in the flat model and the equations of the flat model a connect generates.bltof a class andbltBlockof an equation or statement: the blocks of the initial and regular equations of the translation in the order they're solved, with the systems of equations and their iteration variables, and the block the simulation equations of an equation are in, each with links to the equations of the file the equations of the block come from.stateSelectionof a class or component: the states of the translation, the variables index reduction didn't choose as states (dummy states) with the variable they're equal to and how, and thestateSelectattributes.
The translation of the context model is kept in a directory in the temporary directory, named by the hash of the name and contents of the file, so it's done once for each version of the file.
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| String | fileName | A file whose classes are loaded. | |
| String | nodeId | The id of a node of getProbeTree. | |
| String | property | One of the properties of the node. | |
| String | contextModel | "" | The model translated for the simulation properties, the model the node is in if empty. |
| Boolean | prettyPrint | false |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| String | result |