Stream, Session, and SuperNode Parameters

Parameters can be defined for use in CLEM expressions and in scripting. They are, in effect, user-defined variables that are saved and persisted with the current stream, session, or SuperNode and can be accessed from the user interface as well as through scripting. If you save a stream, for example, any parameters set for that stream are also saved. (This distinguishes them from local script variables, which can be used only in the script in which they are declared.) Parameters are often used in scripting to control the behavior of the script, by providing information about fields and values that do not need to be hard coded in the script.

The scope of a parameter depends on where it is set:

  • Stream parameters can be set in a stream script or in the stream properties dialog box, and they are available to all nodes in the stream. They are displayed on the Parameters list in the Expression Builder.
  • Session parameters can be set in a stand-alone script or in the session parameters dialog box. They are available to all streams used in the current session (all streams listed on the Streams tab in the managers pane).

Parameters can also be set for SuperNodes, in which case they are visible only to nodes encapsulated within that SuperNode.

Using Parameters in CLEM Expressions

Parameters are represented in CLEM expressions by $P-pname, where pname is the name of the parameter. When used in CLEM expressions, parameters must be placed within single quotes––for example, '$P-scale'.

Available parameters are easily viewed using the Expression Builder. To view current parameters:

  1. In any dialog box accepting CLEM expressions, click the Expression Builder button.
  2. From the Fields list, select Parameters.

You can select parameters from the list for insertion into the CLEM expression. See the topic Selecting fields, parameters, and global variables for more information.