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, omcVersion of the file: the names that couldn't be looked up and the messages of checkModel of 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, modelInstance of a class: the classes it uses, as in getDependencyGraph, and the results of checkModel, of instantiateModel as Base Modelica and of getModelInstance.
  • 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.
  • blt of a class and bltBlock of 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.
  • stateSelection of 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 the stateSelect attributes.

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

TypeNameDefaultDescription
StringfileNameA file whose classes are loaded.
StringnodeIdThe id of a node of getProbeTree.
StringpropertyOne of the properties of the node.
StringcontextModel""The model translated for the simulation properties, the model the node is in if empty.
BooleanprettyPrintfalse

Outputs

TypeNameDefaultDescription
Stringresult