@configvariable Tag

This tag specifies a configuration variable to create in the test device file when the tagged additional code file is added. The tag must be followed by at least two subtags which provide further information about the variable.

//! When this additional code file is added to a test device, automatically create
//! a configuration variable. The integer variable will have three possible values, 
//! referred to as options A, B and C, and will default to option B. The variable 
//! is also inversely conditional on the state of AnotherVariable.
//!
//! @configvariable MyVariable 
//!   @type integer list
//!   @displayname Example_Variable
//!   @description An example configuration variable
//!   @condition AnotherVariable @invert
//!   @defaultvalue 0x80
//!   @listoption Option A @value 0x40
//!   @listoption Option B @value 0x80
//!   @listoption Option C @value 0xC0
//!

@type Tag

This tag specifies the type of the configuration variable, and is mandatory. The type must be one of the following:

  • Boolean
  • Integer
  • String
  • Filename
  • Integer list
  • String list

The last two options (Integer list and String list) specify that the configuration variable will be of the associated type but that it may only be assigned one of a fixed set of named options. These options can be defined using @listoption tags, and there must be at least one option specified.

@displayname Tag

This tag specifies the display name of the configuration variable, and is mandatory.

//!   @displayname Example_Variable

@description Tag

This optional tag specifies the description of the configuration variable.

//!   @description An example configuration variable

@condition Tag

This optional tag specifies that the configuration variable should be conditionally enabled/disabled based on the value of another given variable. Only certain types of variable can be used as condition variables (integer, boolean, and integer list) and the value of that variable is equated to a boolean, where zero equates to false and any other value equates to true. The configuration variable being created is then only enabled if the condition variable evaluates to true.

//!   @condition AnotherVariable

@invert Tag

This optional tag specifies that the condition should be inverted, such that the variable being created is enabled when the condition evaluates to false rather than true, and vice versa.

//!   @condition AnotherVariable @invert

@defaultvalue Tag

This optional tag specifies the default value of the configuration variable. The value of the tag must be a value of the type specified by the @type tag. Note that for list types, this tag specifies the value of the default option, not the name of the option.

//!   @defaultvalue 0x80

@listoption Tag

This optional tag specifies one possible choice for the value of the configuration variable and, where used, is normally specified more than once. The text following the tag is used as the description of the choice.

//!   @listoption Option A @value 0x40

@value Tag

This tag is used in conjunction with the @listoption tag to specify the actual value to be assigned to the configuration variable when the user selects the corresponding @listoption's description in the configuration variable editor. In the example below (noting that the @type tag for this configuration variable has already been set to integer list), if the user selects "Option A" from the list of choices, the configuration variable will be set to the INT value 0x40.

//!   @listoption Option A @value 0x40