CAPL Script

LookupProvidedField

This reference collection includes Vector documentation reproduced with permission. Snippets may require configuration-specific symbols and are not all standalone programs. Sources and validation limits.

Syntax

providedFieldRef * LookupProvidedField(char[] path)

Function

Searches for the specified provided field. The path must be complete including namespaces and both endpoints:(Namespace::)+Service.providerSide[consumer,provider].Field. You can downcast the result to a concrete type, see the example.

Parameters

path Path of the provided field.

Return Values

The provided field. An uninitialized object if the field is not found, which will also be reported in the Write Window or as an error in test system (if the function is called in a test routine).

providedFieldRef MirrorAdjustment.Position positionField;
char path[200];
char service[50] = "Mirrors::MirrorAdjustment";
char consumer[20] = "CANoe";
char provider[20] = "LeftMirror";
char field[20] = "Position";
snprintf(path, elcount(path), "%s.providerSide[%s,%s].%s", service, consumer, provider, field);
positionField = (providedFieldRef MirrorAdjustment.Position) lookupProvidedField(path);

Related reference: LookupProvidedEvent | LookupConsumedField