Enumeration is a user-defined data type where you can specify a set of values for a variable, and the variable can only take one out of the set of possible values. When there are no constant keywords before or after a target variable, but the values of the variable are predictably controlled, you can use Enumeration to define the variable. All the possible values must be included in a pair of parentheses after the variable name, and a vertical line (|) can be used to separate two possible values, e.g., $var1(value1|value2|value3). Note that even if there is only one possible value, the vertical line (|) must be added, e.g., $var1(value1|).

You can use Enumeration to parse all variable types, such as:

$var1(value1|value2) indicates to parse the value of a string-type variable.  
Note: Space is allowed in the value of a string, e.g., $duplex(Full Duplex|Auto Duplex).

$int:var1(value1|value2) indicates to parse the value of an integer-type variable.

$float:var1(value1|value2) indicates to parse the value of a float-type variable.

For example, to parse enumeration-type variables like $duplex and $speed, you can use $duplex(Full-duplex|Half-duplex|Auto-duplex)” and “$speed(Auto-speed|100Mb/s)” in the variable line pattern.

Note: Only the values listed in the line pattern can be successfully extracted.

Note: Possible values cannot contain special characters | and right bracket ).