Using Enumerations in TestStand

The TestStand enumeration data type provides several advantages over the traditional alternative of using a number to represent an enumerated data type, including range checking, type safety, and the ability to extract the enumerator name as a string. To provide complete backward compatibility, all TestStand adapters provide full support for passing numbers for enumeration parameters.

TestStand enumerations attempt to provide an experience that as closely as possible mimics the behavior of enumerated data types in common modern programming languages. You typically interact with enumerated data types using their enumerators at edit time, while operations are generally based on the underlying number at run timer. There are subtleties that arise from the fact that the distinction between edit time and run time in TestStand is not clear-cut. Refer to the TestStand Enumerations Reference Guide for a detailed explanation of the behavior of TestStand enumerations.