Home > User Support > CoverageMaster winAMS FAQ

CoverageMaster winAMS FAQ

Test Data Settings

014_06: I cannot find the members of a structure declared by pointer in the "All Variables" or "Detected Variables" lists. How can I use them as Input/Output variables?

Question:

I want to use a member of a structure as an Input/Output variable in a test CSV File. But only a pointer to the structure is declared and the structure’s members are not displayed in the "All Variables" or "Detected Variables" lists. How can I select them as Input/Output variables?

Answer:

When a structure is declared through a pointer, its members do not appear automatically in the "All Variables" or "Detected Variables" lists.

To be able to select them, the structure itself must be allocated. To do this, select the structure pointer in either of the variable lists and add it as an Input or Output variable, in the Pointer Settings select "Allocate Memory" and "Pointer with Index" (if you are using an array of N structures, enter 0 to N-1 as the Index values). The selected number of structures appears in the variable list, and their members can be selected as standard variables and added as an Input or Output variable.

If you are only using one instance of the structure, you can also right-click on the structure pointer and select "Expand Pointer". The structure (with the index [0]) and its members will appear in the Variable List.

By selecting "Expand Pointer’s Allocated Memory Area" instead, in addition to allocating memory for the structure, the structure pointer will automatically be added to the Input list with the "Allocate memory" setting.

For void pointers, please refer to the following link:

How to use a void type pointer in a CSV file?

 

Related Technical Tips Search

Other technical tips in GAIO's web site can be searched for using the links below.

Search key word link: Structure Argument
Technical Tips Google Search


Information Links