Python Parameter Passing Tab - Type Properties Dialog Box

Python Parameter Passing Tab

Depending on the custom data type, the Python Parameter Passing tab provides different options for mapping a TestStand type to a Python type.

For a TestStand container, specify how TestStand maps the subproperties of a data type to the elements of a tuple parameter. If a data type contains a subproperty that is a named data type, you must separately configure the named data type.

The Python Parameter Passing tab contains the following options:

  • Property —Select a subproperty of the data type to display the type and index of the data in the tuple.

    You must separately configure the named data type to exclude its subproperties when passing a tuple by selecting Exclude When Passing Tuple , then select the behavior for passing its subproperties in the Pass Property as pull-down menu.

  • Exclude When Passing Tuple —Exclude the selected subproperty in the mapping between the data type and the structure.
  • Type —The data type of the selected subproperty. This is a read-only field.
  • Index of Property in Tuple —The index of the element in the tuple. You can use the index to access the data in the tuple inside the Python code module.
  • Pass Property as —Defines the behavior for passing a subproperty from TestStand to Python when the subproperty type is an array of numbers. It contains the following options:
    • Dynamic —Use the behavior specified in the Python Adapter Configuration dialog box for passing an array of numbers.
    • List —Pass the property from TestStand to Python as a list.
    • NumPy Array —Pass the property from TestStand to Python as a NumPy array.

For a TestStand enumeration, specify the Python module containing the enumeration definition and the Python enumeration that the TestStant enum type will be passed into the Python module as.

The Python Parameter Passing tab contains the following options:

  • Module —The path to a Python ( .py ) module on disk. Click Browse to browse for a Python module. Click View to view the module in a text editor.
  • Namespace —Displays the namespace of the selected module. To learn how TestStand determines the namespace, refer to Python Namespaces .
  • Enum —Select an enum from a list of enums present in the specified module.

    If the list does not show an enumeration which is present in the module, you can type the enumeration name into the text field.

See Also

Python Adapter Configuration Dialog Box