Purpose

Calls an implementation-specific action service on the ECU (CCP only). Format

mcTypeStatus mcCCPActionService(
mcTypeTaskRef ECURefNum,
u16 ServiceNo,
u8 Params[4],
u8 *ResultLength,
u8 *DataType);

Input

ECURefNum

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

ServiceNo

ServiceNo determines the service that is executed inside the ECU. For more information about the services that are implemented in the ECU refer to the documentation for the ECU.

Params

Params passes the parameters of the service function as an array of bytes to the ECU. Since the parameters and their data types are specific to the ECU implementation, you are responsible of providing the required parameters in the correct byte ordering. Output

ResultLength

ResultLength indicates the amount of data that can be uploaded from the ECU as a result of the execution of the service. The result of this service can be accessed by calling the function right after mcCCPActionService.

DataType

DataType is a data type qualifier that determines the data format of the result.

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 function of the ECU M&C API to obtain a descriptive string for the return value.

Description

mcCCPActionService implements the CCP command ACTION_SERVICE. The ECU carries out the requested service and automatically sets the Memory Transfer Address MTA0 to the location from which the CCP master may upload the requested action service return information (if applicable).

The result of this service can be accessed by calling the function right after mcCCPActionService.