ECU Measurement and Calibration Toolkit C API Reference

Content Type
Programming Language
Current manual

mcGetNames

mcGetNames

Purpose

Retrieves a comma-separated list of ECU names, Measurement names, Characteristic names, Event names, Characteristic pages, or Group names from a specified A2L database.

Format

mcTypeStatus mcGetNames(
mcTypeTaskRef RefNum,
u32 Type,
cstr ECUName,
u32 SizeOfNamesList,
str NameList);

Input

RefNum

RefNum is any ECU M&C task reference which consists of a valid link to the opened A2L database (DBRefNum), a selected ECU (ECURefNum) or a Measurement task (DAQRefNum). RefNum has to be valid for the related Type.

Type

Specifies the Type of names to return.

0mcTypeECUNames

Returns a list of ECU names. You can pass one of the returned names to mcECUSelectEx.

1mcTypeMeasurementNames

Returns a list of Measurement names. You can pass the returned NamesList to mcDAQInitialize.

2mcTypeCharacteristicNames

Returns a list of Characteristic names. You can pass a single name out of the NamesList to mcCharacteristicWrite or mcCharacteristicRead.

3mcTypeEventChannelNames

Returns a list of Event Channel names.

4mcTypeDefinedPagesNames

Returns a list of Calibration page names.

5mcTypeGroupNames

Returns a list of Group names.

6mcTypeGroup_SubGroupNames

Returns a list of Subgroup names of the specified Group name.

7mcTypeGroup_MeasurementNames

Returns a list of Measurement names within the specified Group.

8mcTypeGroup_CharacteristicNames

Returns a list of Characteristic names within the specified Group.

9mcTypeFuncNames

Returns a list of Function names within the specified ECU.

10mcTypeFunc_DefCharacNames

Returns a list of Characteristic names referred by the DEF_CHARACTERISTIC keyword within the related Function.

11mcTypeFunc_RefCharacNames

Returns a list of Characteristic names referred by the REF_CHARACTERISTIC keyword within the related Function.

12mcTypeFunc_InMeasNames

Returns a list of Measurement names referred by the IN_MEASUREMENT keyword within the related Function.

13mcTypeFunc_OutMeasNames

Returns a list of Measurement names referred by the OUT_MEASUREMENT keyword within the related Function.

14mcTypeFunc_LocMeasNames

Returns a list of Measurement names referred by the LOC_MEASUREMENT keyword within the related Function.

15mcTypeFunc_SubFuncNames

Returns a list of Function names referred by the SUB_FUNCTION keyword within the related Function.

16mcTypeGroup_FunctionListNames

Returns a list of Function names referred by the FUNCTION_LIST keyword within the related Group.

17mcTypeTLI_XcpOnCanNames

Returns a list of Transport Layer Instance names of the XCP_ON_CAN blocks within the IF_DATA XCPplus block. No entries are returned for XCP_ON_CAN blocks without the TRANSPORT_LAYER_INSTANCE keyword or an XCP_ON_CAN block within an IF_DATA XCP block.

18cTypeTLI_XcpOnTcpNames

Returns a list of Transport Layer Instance names of the XCP_ON_TCP_IP blocks within the IF_DATA XCPplus block. No entries are returned for XCP_ON_TCP_IP blocks without the TRANSPORT_LAYER_INSTANCE keyword or an XCP_ON_TCP_IP block within an IF_DATA XCP block.

19mcTypeTLI_XcpOnUdpNames

Returns a list of Transport Layer Instance names of the XCP_ON_UDP_IP blocks within the IF_DATA XCPplus block. No entries are returned for XCP_ON_UDP_IP blocks without the TRANSPORT_LAYER_INSTANCE keyword or an XCP_ON_UDP_IP block within an IF_DATA XCP block.

ECUName

If the Type = mcTypeMeasurementNames or Type = mcTypeCharacteristicNames and RefNum contains a DBRefNum, the corresponding ECU name has to be referenced in order to access ECU specific properties. If RefNum contains an ECURefNum or DAQRefNum the parameter ECUName is ignored and can be set to NULL.

SizeOfNamesList

Size of the buffer provided to take the names list. After calling mcGetNamesLength, you can allocate an array of size SizeofNamesList, and then pass that array to mcGetNames using the same input parameters. This ensures that mcGetNames will return all names without error.

Output

NameList

Returns the comma-separated list of names specified by Type.

Return Value

The return value indicates the status of the function call as a signed 32-bit integer. Zero means the function executed successfully. A negative value specifies an error, which means the function did not perform the expected behavior. A positive value specifies a warning, which means the function performed as expected, but a condition arose that may require attention.

Use the mcStatusToString function of the ECU M&C API to obtain a descriptive string for the return value.

Description

Get a comma-separated list of ECU, Measurement, Characteristic, or Event Channel names from a specified A2L database file.

If using mcGetNames to query the list of supported event channels on an ECU, the event channels might be stored inside the ECU instead of the A2L file. To query these event channel names from the ECU directly, connect to the ECU using mcECUConnect before calling mcGetNames.

Was this information helpful?