Conditions
It can be useful to disable or enable one variable depending on the value of another. Each variable can have another variable selected as its condition variable. The value of this condition variable is treated as a boolean value where zero means false and any other value is true. Only variables that are numeric (Integer, Boolean or Integer list) are available to be used as a condition.
If the condition variable is deemed to be false, then this variable will be disabled and no value can be entered for it. If the condition variable is true then this variable will be enabled and a value must be provided.
If the condition is inverted (by checking the Invert checkbox) then the logic is inverted and a false value will enable the variable and true will disable it.
Examples
There are two common scenarios where conditions are useful:
- When providing a fixed list of values, but for maximum flexibility you want the user to be able to specify a custom value that is not in the list. For example, we may have a Manufacturer ID variable that is an Integer list, where each value is a manufacturer ID associated with the manufacturer's name. To handle other unknown manufacturers, we define the zero value to be "User Defined" and create a second variable named Custom Manufacturer ID that is conditional on Manufacturer with Invert checked. This means if Manufacturer ID is zero, Custom Manufacturer ID is enabled, but if any fixed manufacturer is selected, Custom Manufacturer ID is disabled.
- There might be an optional step in the testing that has some additional configuration necessary. If this optional step is not enabled, then it is unnecessary to require the user to supply the configuration for the step. For example, when testing a flash there might be an optional programming step. We therefore have a Boolean variable named Enable Programming and then a Filename variable named Flash Image File. This second variable will be conditional on Enable Programming so that it is only enabled when programming is enabled.
XJTAG v4.1.100