Chapter 9: context, Chapter 9, Context – Teledyne LeCroy Protocol Analyzers File-Based Decoding User Manual User Manual
Page 35
File-based Decoding User Manual
Chapter 9: Context
LeCroy Corporation
29
Chapter 9: Context
The context is the mechanism by which transaction data is passed in and out of the
scripts. There is an output context that is modified by the script, and there are possibly
multiple input contexts that the script is invoked on separately.
A context serves two roles: It functions as a symbol table whose values are local to a
particular transaction, and it functions as an interface to the application.
Two keywords are used to reference symbols in the context: in and out. Dot notation is
used to specify a symbol within a context:
out.symbol = "abcd";
out.type = in.type;
The output context can be read and written to, but the input context can only be read.
Context symbols follow the same rules as local variables: they are created on demand,
and uninitialized symbols always evaluate to null.