ECU Measurement and Calibration Toolkit C API Reference

Content Type
Programming Language
Current manual

mcCCPGetVersion

mcCCPGetVersion

Purpose

Retrieves CCP version implemented in the ECU (CCP only).

Format

mcTypeStatus mcCCPGetVersion(
mcTypeTaskRef ECURefNum,
u8 *MajorVersion,
u8 *MinorVersion);

Input

ECURefNum

ECURefNum is the task reference which links to the selected ECU. This reference is originally returned from mcECUSelectEx.

Output

MajorVersion

MajorVersion returns the major version number of the CCP implementation.

MinorVersion

MinorVersion returns the minor version number of the CCP implementation.

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

mcCCPGetVersion can be used to query the CCP version implemented in the ECU. This command performs a mutual identification of the protocol version in the slave device to agree on a common protocol version.

mcCCPGetVersion implements the CCP command GET_CCP_VERSION defined by the CCP specification.

Was this information helpful?