API for Mappings

Part of the Object based program API.

class MappingApi

Returned by

CreateAnalysisPackageMappingItem(pkgPath, referenceName=None, namespace=None, checkTarget=True)

Creates an analysis package mapping item that references an analysis package (e.g. MyAnalysisPackage.ta). This mapping item can be used for analysis package mapping steps in a project, an analysis package reference in a test case or a referenced trace analysis. These steps do not reference a concrete analysis package. Instead, the implemented analysis label is resolved in the global mapping to get this reference.

Parameters:
pkgPath : str

Path to the referenced package, either absolute or relative to the packages directory of the current workspace or given namespace, e.g. ‘MyPackage.pkg’. An absolute path located in the current workspace will also be resolved to a relative workspace reference.

referenceName : str

Name of the mapping item

namespace : str

Identifier of the workspace to which a relative pkgPath is resolved. If not present or None, the namespace is determined automatically. It is also possible to reference a library workspace using its namespace. A relative pkgPath is resolved relative to the packages directory of the given namespace. For example, the namespace parameter ‘myLibrary’ results in ‘<libraries.myLibrary.packages>/MyPackage.pkg’.

checkTarget : boolean

Selects if path should be checked

Returns:

The just created mapping item.

Return type:

AnalysisPackageMappingItem

CreateAudioChannelMappingItem(systemIdentifier, channel=1, output=False, referenceName=None, checkTarget=None)

Creates a mapping item pointing at a certain audio channel.

Parameters:
systemIdentifier : str

Name of the system according to the test configuration.

channel : int

Number of channel (optional). Uses channel 1 if ommitted.

output : boolean

True if this is an output channel

referenceName : str

Name of the mapping item (optional).

checkTarget : boolean

Determines if the target path should be checked (optional).

Returns:

The new mapping item

Return type:

AudioChannelMappingItem

CreateAudioDeviceMappingItem(systemIdentifier, referenceName=None, checkTarget=True)

Creates a mapping item pointing at a certain audio device.

Parameters:
systemIdentifier : str

Name of the system according to the test configuration.

referenceName : str

Name of the mapping item (optional).

checkTarget : boolean

Determines if the target path should be checked (optional).

Returns:

The new mapping item

Return type:

AudioDeviceMappingItem

CreateBusMonitoringMappingItem(systemIdentifier, nodeName, frameName, referenceName=None, checkTarget=True)

Creates a bus monitoring mapping item of the desired variable type.

Parameters:
systemIdentifier : str

Name of Bus system according to the test configuration

nodeName : str

Name of sending ECU

frameName : str

Name of the frame containing the signal

referenceName : str

Name of the mapping item (optional)

checkTarget : boolean

Selects if target path should be checked (optional)

Returns:

The just created mapping item

Return type:

BusMonitoringMappingItem

CreateBusSignalGroupMappingItem(systemIdentifier, nodeName='', frameName='', pduName='', referenceName=None, checkTarget=True, switchCode=None)

Creates a bus signal group mapping item of the desired variable type.

Parameters:
systemIdentifier : str

Name of Bus system according to the test configuration

nodeName : str

Name of sending ECU (optional)

frameName : str

Name of the frame containing the signal (optional)

pduName : str

Name of the PDU containing the signal (optional)

referenceName : str

Name of the mapping item (optional)

checkTarget : boolean

Selects if target path should be checked (optional)

switchCode : int

In case the underlying bus database does not support PDU names, switch code can be specified to disambiguate between multiplexed PDUs

Returns:

The just created mapping item

Return type:

BusSignalGroupMappingItem

CreateBusSignalWithPduMappingItem(systemIdentifier, signalName, nodeName='', frameName='', pduName='', referenceName=None, checkTarget=True)

Creates a bus signal mapping item of the desired variable type.

Parameters:
systemIdentifier : str

Name of Bus system according to the test configuration

signalName : str

Name of the signal

nodeName : str

Name of sending ECU (optional)

frameName : str

Name of the frame containing the signal (optional)

pduName : str

Name of the PDU containing the signal (optional)

referenceName : str

Name of the mapping item

checkTarget : boolean

Selects if target path should be checked

Returns:

The just created mapping item

Return type:

BusSignalMappingItem

CreateCalibrationMappingItem(systemIdentifier, targetPath, variableType=None, referenceName=None, xElement=None, yElement=None, checkTarget=True)

Creates a calibration mapping item of the desired variable type.

Parameters:
systemIdentifier : str

Name of ECU according to the test configuration

targetPath : str

Name of calibration variable to be accessed

variableType : str

Type of variable to be mapped (VALUE, VECTOR, MATRIX, CURVE, MAP, VECTOR-ELEMENT, MATRIX-ELEMENT)

referenceName : str

Name of the mapping item

xElement : integer

Index on x axis if single element of VECTOR or MATRIX should be accessed

yElement : integer

Index on y axis if single item of MATRIX should be accessed

checkTarget : boolean

Selects if target path should be checked

Returns:

The just created mapping item

Return type:

CalibrationMappingItem

CreateDebugMappingItem(ecuKey, targetPath, variableType=None, referenceName=None, checkTarget=True)

Creates a debug mapping item.

Parameters:
ecuKey : str

Name of the ECU

targetPath : str

Path to the debug variable to be accessed

variableType : str

Type of variable to be mapped (VALUE, VECTOR, MATRIX)

referenceName : str

Name of the mapping item (optional)

checkTarget : boolean

Selects if target path should be checked

Returns:

The just created mapping item

Return type:

DebugMappingItem

CreateDebugRegisterMappingItem(ecuKey, targetPath, referenceName=None, checkTarget=True)

Creates a debug register mapping item.

Parameters:
ecuKey : str

Name of the ECU

targetPath : str

Path to the register variable to be accessed

referenceName : str

Name of the mapping item (optional)

checkTarget : boolean

Selects if target path should be checked

Returns:

The just created mapping item

Return type:

DebugRegisterMappingItem

CreateDiagDidMappingItem(systemIdentifier, name, referenceName=None, checkTarget=True)

Creates DIAG DID mapping item.

Parameters:
systemIdentifier : str

Name of the ECU according to the test configuration

name : str

Name of the DIAG DID signal

referenceName : str

Name of the mapping item

checkTarget : boolean

Selects if target path should be checked

Returns:

The just created mapping item

Return type:

DiagDidMappingItem

CreateDiagFaultMemoryMappingItem(ecuKey, referenceName=None)

Creates a fault memory mapping item.

Parameters:
ecuKey : str

Name of the ECU

referenceName : str

Name of the mapping item (optional)

Returns:

The just created mapping item

Return type:

DiagFaultMemoryMappingItem

CreateDiagObdOnUdsServiceMappingItem(systemIdentifier, name, referenceName=None, checkTarget=True)

Creates a OBD Service mapping item.

Parameters:
systemIdentifier : str

Name of the ECU according to the test configuration

name : str

Name of the DIAG service

referenceName : str

Name of the mapping item

checkTarget : bool

Selects if target path should be checked

Returns:

The just created mapping item

Return type:

DiagObdOnUdsServiceMappingItem

CreateDiagRoutineMappingItem(systemIdentifier, name, referenceName=None, checkTarget=True)

Creates DIAG RoutineControl mapping item.

Parameters:
systemIdentifier : str

Name of the ECU according to the test configuration

name : str

Name of the DIAG RoutineControl

referenceName : str

Name of the mapping item

checkTarget : boolean

Selects if target path should be checked

Returns:

The just created mapping item

Return type:

DiagRoutineMappingItem

CreateDiagServiceMappingItem(systemIdentifier, name, protocol=0, referenceName=None, checkTarget=True)

Creates a DIAG Service mapping item.

Parameters:
systemIdentifier : str

Name of the ECU according to the test configuration

name : str

Name of the DIAG service

protocol : int

Protocol (0 - UDS, 1 - KWP_2000)

referenceName : str

Name of the mapping item

checkTarget : bool

Selects if target path should be checked

Returns:

The just created mapping item

Return type:

DiagServiceMappingItem

CreateEdiabasVariableMappingItem(ecuKey, job, referenceName=None, checkTarget=True)

Creates an ediabas variable mapping item.

Parameters:
ecuKey : str

Name of the ECU

job : str

Name of the job

referenceName : str

Name of the mapping item (optional)

checkTarget : boolean

Selects if the target path and the job should be checked (optional)

Returns:

The just created mapping item

Return type:

EdiabasVariableMappingItem

CreateEesPinVariableMappingItem(systemIdentifier, name, referenceName=None, checkTarget=True)

Creates an ees pin variable mapping item.

Parameters:
systemIdentifier : str

SUT key

name : str

Name of the signal

referenceName : str

Name of the mapping item (optional)

checkTarget : boolean

Selects if target path should be checked (optional)

Returns:

The just created mapping item

Return type:

EesPinVariableMappingItem

CreateEnvSimMappingItem(systemIdentifier, targetPath, variableType=None, isSignal=False, referenceName=None, checkTarget=True)

Creates a mapping item of the desired variable type pointing at a certain envsim variable. The envsim has to be loaded in order to create a envsim mapping item.

Parameters:
systemIdentifier : str

Name of system according to the test configuration, e.g. “Plant model”

targetPath : str

Path to the model variable to be accessed, e.g. “Model Root/varName”.

variableType : str

Type of variable to be mapped (VALUE, VECTOR, MATRIX)

isSignal : boolean

Selects if the mapping item should point to a model signal instead of variable

referenceName : str

Name of the mapping item

checkTarget : boolean

Selects if target path should be checked

Returns:

The just created mapping item

Return type:

EnvSimMappingItem

CreateGenericMappingItem(variableType=None, referenceName=None)

Creates a generic mapping item of the desired variable type.

Parameters:
variableType : str

Type of variable to be mapped (VALUE, VECTOR, CURVE, MATRIX, MAP, IMAGE, AUDIO, JOB, PACKAGE, PDU)

referenceName : str

Name of the mapping item

Returns:

The just created mapping item

Return type:

MappingItem

CreateImageMappingItem(systemIdentifier, targetPath, maskPath='', referenceName=None, checkTarget=True)

Creates a mapping item pointing at a certain image variable.

Parameters:
systemIdentifier : str

Name of system according to the test configuration, e.g. “CAM”

targetPath : str

Path to the image variable to be accessed, e.g. “Image” to read the whole image. To access a mask in a subfolder, the path to that folder must also be specified here, e.g. “Image/mymasks/moremasks/”. The actual name of the mask (and submask) however is specified in the parameter maskPath.

maskPath : str

The name of the mask, submask and index to use, e.g. “MyMask[1, 1]/icon” would refer to the submask “icon” of index [1, 1] of the mask “MyMask”.

referenceName : str

Name of the mapping item

checkTarget : boolean

Selects if target path should be checked

Returns:

The just created mapping item

Return type:

ImageMappingItem

CreateJobMappingItem(toolId, jobName, portId=None, checkTarget=True, referenceName=None)

Creates a tool job or port job mapping item.

Parameters:
toolId : str

Name of the used tool

jobName : str

Name of the job

portId : str

Name of the port

checkTarget : boolean

Selects if target path should be checked

referenceName : str

Name of the mapping item

Returns:

The just created mapping item

Return type:

MappingItem

CreateLogFilterMessageMappingItem(ecuKey, messageName, referenceName=None, checkTarget=True)

Creates a DLT log filter mapping item.

Parameters:
ecuKey : str

name of the ECU for which the filter has been loaded

messageName : str

name of the message filter

referenceName : str

Name of the mapping item

checkTarget : boolean

Selects if target path should be checked

Returns:

The just created mapping item

Return type:

LogFilterMessageMappingItem

CreateLoggingArgumentMappingItem(systemIdentifier, messageName, argumentName, referenceName=None, checkTarget=True)

Creates a logging argument mapping item.

Parameters:
systemIdentifier : str

Name of logging system according to the test configuration

messageName : str

Name of the message containing the argument

argumentName : str

Name of the message argument

referenceName : str

Name of the mapping item

checkTarget : boolean

Selects if target path should be checked

Returns:

The just created mapping item

Return type:

LoggingArgumentMappingItem

CreateMappingItem(systemIdentifier, targetPath, referenceName=None)

Creates a mapping item with automatically determined type.

The desired mapping target needs to exist in the currently loaded/activated configuration!

Parameters:
systemIdentifier : str

Name of system according to the test configuration

targetPath : str

Name of bus, model, calibration or measure variable to be accessed (Needs indices if datatype is VECTOR-ELEMENT label[idx_X] or if datatype is MATRIX-ELEMENT label[idx_X][idx_Y])

Bus signals need a target path of the following form: “<nodeName>/<frameName>/<pduName>/<signalName>” Note: <nodeName>, <frameName> and <pduName> are optional, that means ///<signalName> is also valid. Logging arguments need a target path of the form: “/<messageName>/<argumentName>/”

referenceName : str

Name of the mapping item

Returns:

The just created mapping item

Return type:

MappingItem

CreateMeasurementMappingItem(systemIdentifier, targetPath, variableType=None, referenceName=None, xElement=None, yElement=None, zElement=None, checkTarget=True)

Creates a measurement mapping item of the desired variable type.

Parameters:
systemIdentifier : str

Name of ECU according to the test configuration

targetPath : str

Name of measurement variable to be accessed

variableType : str

Type of variable to be mapped (VALUE, VECTOR, MATRIX, VECTOR-ELEMENT, MATRIX-ELEMENT)

referenceName : str

Name of the mapping item

xElement : integer

Index on x axis if single element of VECTOR or MATRIX should be accessed

yElement : integer

Index on y axis if single element of MATRIX should be accessed

zElement : integer

Index on z axis if single element of MATRIX should be accessed

checkTarget : boolean

Selects if target path should be checked

Returns:

The just created mapping item

Return type:

MeasureMappingItem

CreateModelMappingItem(systemIdentifier, targetPath, variableType=None, isSignal=False, referenceName=None, checkTarget=True)

Creates a mapping item of the desired variable type pointing at a certain model variable. The model has to be loaded in order to create a model mapping item.

Parameters:
systemIdentifier : str

Name of system according to the test configuration, e.g. “Plant model”

targetPath : str

Path to the model variable to be accessed, e.g. “Model Root/varName”.

variableType : str

Type of variable to be mapped (VALUE, VECTOR, MATRIX)

isSignal : boolean

Selects if the mapping item should point to a model signal instead of variable

referenceName : str

Name of the mapping item

checkTarget : boolean

Selects if target path should be checked

Returns:

The just created mapping item

Return type:

ModelMappingItem

CreatePackageMappingItem(pkgPath, referenceName=None, namespace=None, checkTarget=True)

Creates a package mapping item referencing the given package path. For example, CreatePackageMappingItem(‘MyPackage.pkg’) results in a reference to ‘<workspace.packages>/MyPackage.pkg’.

Parameters:
pkgPath : str

Path to the referenced package, either absolute or relative to the packages directory of the current workspace or given namespace, e.g. ‘MyPackage.pkg’. An absolute path located in the current workspace will also be resolved to a relative workspace reference.

referenceName : str

Name of the mapping item

namespace : str

Identifier of the workspace to which a relative pkgPath is resolved. If not present or None, the namespace is determined automatically. It is also possible to reference a library workspace using its namespace. A relative pkgPath is resolved relative to the packages directory of the given namespace. For example, the namespace parameter ‘myLibrary’ results in ‘<libraries.myLibrary.packages>/MyPackage.pkg’.

checkTarget : boolean

Selects if target path should be checked

Returns:

The just created mapping item

Return type:

PackageMappingItem

CreatePortMappingItem(systemIdentifier, portType, referenceName=None, checkTarget=True)

Creates a port mapping item.

Parameters:
systemIdentifier : str

SUT key

portType : str

type of the port - one of Bus, Service, or Logging

referenceName : str

Name of the mapping item (optional)

checkTarget : boolean

Selects if target path should be checked (optional)

Returns:

The just created mapping item

Return type:

PortMappingItem

CreateReferenceMappingItem(mappingItem, referenceName=None)

Creates a mapping item that references another mapping item. The created mapping item can be assigned as the target of mappings in the context of a parameter set of a project’s test case.

Parameters:
mappingItem

Mapping item that should be referenced

referenceName : str

Name of the mapping item (optional)

Returns:

The just created mapping item

Return type:

ReferenceMappingItem

CreateRunningValueMappingItem(systemIdentifier, targetPath, referenceName=None, checkTarget=True)

Creates a running value mapping item of the desired variable type.

Parameters:
systemIdentifier : str

Name of ECU according to the test configuration

targetPath : str

Name of running value variable to be accessed

referenceName : str

Name of the mapping item

checkTarget : boolean

Selects if target path should be checked

Returns:

The just created mapping item

Return type:

RunningValueMappingItem

CreateServiceEventLeafMappingItem(systemIdentifier, ecuName, serviceName, eventName, variablePath, eventgroupName='', fieldName='', serviceConsumer='', referenceName=None, checkTarget=True)

Creates a service event leaf mapping item.

Parameters:
systemIdentifier : str

SUT key

ecuName : str

Name of the ECU that provides the service

serviceName : str

Name of the service that provides the event

eventName : str

Name of the event

variablePath : str

Path to the return leaf node

eventgroupName : str

Name of the event group that contains the event (optional)

fieldName : str

Name of the field to which the event belongs (optional)

serviceConsumer : str

Name of the consumer ECU (optional)

referenceName : str

Name of the mapping item (optional)

checkTarget : boolean

Selects if target path should be checked (optional)

Returns:

The just created mapping item

Return type:

ServiceEventLeafMappingItem

CreateServiceMappingItem(systemIdentifier, ecuName, serviceName, eventOrMethodName, fieldName='', eventGroupName='', serviceConsumer='', referenceName=None, checkTarget=True)

Creates a service field event mapping item.

Parameters:
systemIdentifier : str

SUT key

ecuName : str

Name of the ECU that provides the service

serviceName : str

Name of the service that provides the event

eventOrMethodName : str

Name of the event or the method

fieldName : str

Name of the field (optional)

eventGroupName : str

Name of the event group that contains the event (optional)

serviceConsumer : str

Name of the consumer ECU (optional)

referenceName : str

Name of the mapping item (optional)

checkTarget : boolean

Selects if target path should be checked (optional)

Returns:

The just created mapping item

Return type:

ServiceMappingItem

CreateServiceMethodParameterMappingItem(systemIdentifier, ecuName, serviceName, methodName, variablePath, eventgroupName='', fieldName='', serviceConsumer='', referenceName=None, checkTarget=True)

Creates a service method parameter mapping item.

Parameters:
systemIdentifier : str

SUT key

ecuName : str

Name of the ECU that provides the service

serviceName : str

Name of the service that provides the method

methodName : str

Name of the method

variablePath : str

Path to the parameter leaf node

eventgroupName : str

Name of the event group that contains the method (optional)

fieldName : str

Name of the field to which the method belongs (optional)

serviceConsumer : str

Name of the consumer ECU (optional)

referenceName : str

Name of the mapping item (optional)

checkTarget : boolean

Selects if target path should be checked (optional)

Returns:

The just created mapping item

Return type:

ServiceMethodParameterMappingItem

CreateServiceMethodReturnMappingItem(systemIdentifier, ecuName, serviceName, methodName, variablePath, eventgroupName='', fieldName='', serviceConsumer='', referenceName=None, checkTarget=True)

Creates a service method return mapping item.

Parameters:
systemIdentifier : str

SUT key

ecuName : str

Name of the ECU that provides the service

serviceName : str

Name of the service that provides the method

methodName : str

Name of the method

variablePath : str

Path to the return leaf node

eventgroupName : str

Name of the event group that contains the method (optional)

fieldName : str

Name of the field to which the method belongs (optional)

serviceConsumer : str

Name of the consumer ECU (optional)

referenceName : str

Name of the mapping item (optional)

checkTarget : boolean

Selects if target path should be checked (optional)

Returns:

The just created mapping item

Return type:

ServiceMethodReturnMappingItem

CreateServiceServiceMappingItem(systemIdentifier, ecuName, serviceName, referenceName=None, checkTarget=True)

Creates a service mapping item.

Parameters:
systemIdentifier : str

SUT key

ecuName : str

Name of the ECU that provides the service

serviceName : str

Name of the service

referenceName : str

Name of the mapping item (optional)

checkTarget : boolean

Selects if target path should be checked (optional)

Returns:

The just created mapping item

Return type:

ServiceServiceMappingItem

CreateTraceFileMappingItem(targetPath, referenceName=None, systemIdentifier=None)

Creates a trace file mapping item pointing at a certain trace file signal.

Parameters:
targetPath : str

Path to the trace file signal to be accessed

referenceName : str

Name of the mapping item

systemIdentifier : str

Name of system (relevant for automatically assignment to a signal group)

Returns:

The just created mapping item

Return type:

MappingItem