API for Parameters

Part of the Object based program API.

class ParameterApi

API to access parameter files

Returned by

CreateGlobalConstantsDefinition()

Creates a new global constants definition.

Returns:

New empty global constants definition

Return type:

GlobalConstantsDefinition

CreatePackageParametersDefinition()

Creates a new package parameters definition.

Returns:

New empty package parameters definition

Return type:

PackageParametersDefinition

GetChangesForGlobalConstantsDefinitions(oldConstDefinition, newConstDefinition)

Get the changes that exist between two given constants definitions.

Parameters:
oldConstDefinition

The old constants definition to compare.

newConstDefinition

The new constants definition to compare.

Returns:

The changes that exist between the two constants definitions.

Return type:

list[Change]

GetChangesForPackageParametersDefinitions(oldParamDefinition, newParamDefinition)

Get the differences that exist between two given package parameters definitions.

Parameters:
oldParamDefinition

The old package parameters definition to compare.

newParamDefinition

The new package parameters definition to compare.

Returns:

The differences that exist between the two package parameters definitions.

Return type:

list[Change]

OpenGlobalConstantsDefinition(filename)

Opens an existing global constants definition file (*.gcd).

Parameters:
filename : str

File name of the global constants definition file; Either absolute or relative to the ‘Parameter’ directory

Returns:

Loaded global constants definition

Return type:

GlobalConstantsDefinition

Raises:

ApiError – If the global constants definition file (*.gcd) does not exist.

OpenPackageParametersDefinition(filename)

Opens an existing package parameters definition file (*.ppd).

Parameters:
filename : str

File name of the package parameters definition file; Either absolute or relative to the ‘Parameter’ directory

Returns:

Loaded package parameters definition

Return type:

PackageParametersDefinition

Raises:

ApiError – If the package parameters definition file (*.ppd) does not exist.

SearchGlobalConstantsDefinitions(searchCriteria, useExtendedMode=False)

Searches the current workspace and library workspaces for Global Constant Definitions matching the given search criteria.

Parameters:
searchCriteria : str

The search criteria expressed in the ecu.test filter syntax. See section “Handling” => “Filter” of the ecu.test User Documentation.

useExtendedMode : boolean

If True, extended search strings are enabled. The default is False, meaning each word in the searchCriteria will be enclosed by wildcards and mapped to the filename. (e.g. “hello world” => “Name = ‘*hello*’ and Name = ‘*world*’”)

Returns:

All matching global constant defintions. If no project matches, an emtpy list is returned.

Return type:

list[GlobalConstantsDefinition]

Raises:

ApiError – If the searchCriteria has an illegal syntax.

SearchPackageParametersDefinitions(searchCriteria, useExtendedMode=False)

Searches the current workspace and library workspaces for Package Parameter Definitions matching the given search criteria.

Parameters:
searchCriteria : str

The search criteria expressed in the ecu.test filter syntax. See section “Handling” => “Filter” of the ecu.test User Documentation.

useExtendedMode : boolean

If True, extended search strings are enabled. The default is False, meaning each word in the searchCriteria will be enclosed by wildcards and mapped to the filename. (e.g. “hello world” => “Name = ‘*hello*’ and Name = ‘*world*’”)

Returns:

All matching Package Parameter Definitions. If no file matches, an emtpy list is returned.

Return type:

list[PackageParametersDefinition]

Raises:

ApiError – If the searchCriteria has an illegal syntax.