Scripts
Script tools use outputs from other measurement tools to produce custom measurements.
Similar to other measurement tools, a script tool can output multiple measurement values and decisions. Scripts are added, configured, and removed much like other measurement tools; for more information on this, see Script under Profile Measurement
|
|
Scripts are limited to 1 megabyte of memory. As a general guideline, calculate the combined memory used by the script given its length in characters and the number and types of variables, structures, and arrays the script uses. |
Script tools use a simplified C-based syntax. The following elements of the C language are supported:
|
Elements |
Supported |
|
Control operators |
if, while, do, for, switch and return. |
|
Data types |
char, int, unsigned int, float, double, long long (64-bit integer). |
|
Arithmetic and logical Operator |
Standard C arithmetic operators, except ternary operator (i.e., "condition?trueValue:falseValue"). Explicit casting (e.g., int a = (int) a_float) is not supported. |
|
Function declarations |
Standard C function declarations with argument passed by values. Pointers are not supported. |
|
Array declarations |
Standard C array declarations. For example: float measurements[5]. |
|
Standard arithmetic functions |
+ , −, *, /, %, ++, -- |