ECU Measurement and Calibration Toolkit C API Reference

Content Type
Programming Language
Current manual

ECU M&C API for C

ECU M&C API for C

This topic lists the ECU M&C Toolkit functions and describes the format, purpose and parameters.

Unless otherwise stated, each ECU M&C function suspends execution of the calling thread until it completes. The functions in this topic are listed alphabetically.

Section Headings

The following are section headings found in the ECU M&C API for C functions.

Purpose

Each function description includes a brief statement of the purpose of the function.

Format

The format section describes the format of each function for the C programming language.

Input and Output

The input and output parameters for each function are listed.

Description

The description section gives details about the purpose and effect of each function.

Data Types

The following data types are used with functions of the ECU M&C API for C.

Data Types for the ECU M&C API for C

ECU M&C API functions for C
Data Type Purpose
i8 8-bit signed integer
i16 16-bit signed integer
i32 32-bit signed integer
i64 64-bit signed integer
u8 8-bit unsigned integer
u16 16-bit unsigned integer
u32 32-bit unsigned integer
u64 64-bit unsigned integer
f32 32-bit floating point number
f64 64-bit floating point number
str ASCII string represented as an array of characters terminated by null character ('\0'). This type is used with output strings. str is typically used in the ECU M&C API as a pointer to a string, as char*.
cstr ASCII string represented as an array of characters terminated by null character ('\0'). This type is used with input strings. cstr is typically used in the ECU M&C API as a pointer to a string, as const char*.
nctTypeTaskRef Reference to an initialized database task, ECU task, or Measurement task.
mcAddress C struct which represents the target address for a specific CCP operation in the ECU.

List of Functions

The following table contains an alphabetical list of the ECU M&C Toolkit API functions.

Functions for the ECU M&C API for C

Function Purpose
mcBuildChecksum Calculates a checksum over a defined memory range within the ECU.
mcCalculateChecksum Calculates the checksum of a data block in memory.
mcCCPActionService Calls an implementation-specific action service on the ECU.
mcCCPDiagService Calls an implementation-specific diagnostic service on the ECU.
mcCCPGetActiveCalPage Retrieves the ECU Memory Transfer Address pointer to the calibration data page.
mcCCPGetResult Uploads data from the ECU when the Memory Transfer Address pointer 0 (MTA0) has been set.
mcCCPGetSessionStatus Retrieves the current status of the Calibration Session.
mcCCPGetVersion Retrieves CCP version implemented in the ECU.
mcCCPMoveMemory Moves a memory block on the ECU.
mcCCPSelectCalPage Sets the specified address to be the start address of the calibration data page.
mcCCPSetSessionStatus Updates the ECU with the current state of the calibration session.
mcCharacteristicRead Reads all data as scaled from a named Characteristic on the ECU which is identified by the ECU Reference handle.
mcCharacteristicReadRaw Reads all data as raw (no scaling) from a named Characteristic on the ECU which is identified by the ECU Reference handle.
mcCharacteristicReadByteArray Reads all data as raw byte array (no scaling) from a named Characteristic on the ECU which is identified by the ECU Reference handle.
mcCharacteristicReadSingleValue Reads a single scaled value from a named Characteristic on the ECU which is identified by the ECU Reference handle.
mcCharacteristicReadRawSingleValue Reads a single raw value (no scaling) from a named Characteristic on the ECU which is identified by the ECU Reference handle.
mcCharacteristicWrite Downloads scaled data to a Characteristic for a selected ECU.
mcCharacteristicWriteRaw Downloads raw data (no scaling) to a Characteristic for a selected ECU.
mcCharacteristicWriteByteArray Downloads raw data as byte array (no scaling) to a Characteristic for a selected ECU.
mcCharacteristicWriteSingleValue Writes a single scaled value to a named Characteristic on the ECU.
mcCharacteristicWriteRawSingleValue Writes a single raw value (no scaling) to a named Characteristic on the ECU.
mcClearMemory Clears the contents of the specified ECU memory.
mcConversionCreate Creates a signal conversion object in memory.
mcDAQClear Stops communication for the Measurement task and clears the task.
mcDAQInitialize Initializes a Measurement task for the specified scaled Measurement channel list.
mcDAQInitializeEx Initializes a Measurement task for the specified scaled and raw (unscaled) Measurement channel lists.
mcDAQListInitialize Defines a DAQ list on a specific DAQ list number and initializes the Measurement task for the specified scaled Measurement channel list.
mcDAQListInitializeEx Defines a DAQ list on a specific DAQ list number and initializes the Measurement task for the specified scaled and raw (unscaled) Measurement channel lists.
mcDAQRead Reads scaled samples from a Measurement task. Samples are obtained from received CAN messages.
mcDAQReadEx Reads samples from a Measurement task. Samples are obtained from received CAN messages. Scaled and raw (unscaled) Measurements are acquired.
mcDAQReadTimestamped Reads timestamped scaled samples from a DAQ task initialized with the selected mode of mcDAQModeDAQListTimeStamped.
mcDAQReadTimestampedEx Reads timestamped scaled and timestamped raw (unscaled) samples from a DAQ task initialized with the selected mode of mcDAQModeDAQListTimeStamped.
mcDAQStartStop Starts or stops the transmission of the DAQ lists for the specified Measurement task on the ECU.
mcDAQWrite Writes scaled samples to an ECU DAQ list.
mcDAQWriteEx Writes scaled and raw (unscaled) samples to an ECU DAQ list.
mcDatabaseClose Closes a specified A2L Database reference.
mcDatabaseOpen Opens a specified A2L Database.
mcDatabaseOpenEx Creates an A2L database in memory.
mcDoubleToText Converts a numerical value to a text string using an enumeration or range text type scaling.
mcDownload Downloads data to an ECU.
mcECUConnect Establishes communication to the selected ECU through XCP or CCP.
mcECUConnect2 Establishes communication to the selected ECU through XCP or CCP. Allows you to specify the mode for the XCP CONNECT command.
mcECUCreate Creates an ECU object in memory.
mcECUDeselect Deselects an ECU and invalidates the ECU reference handle.
mcECUDisconnect Disconnects XCP or CCP communication to the selected ECU.
mcECUSelectEx Selects an ECU from the names stored in an A2L database.
mcECUSetCalibrationPage Sets the appropriate RAM or ROM calibration page on the ECU.
mcEventCreate Creates an Event object in memory.
mcGeneric Sends a generic XCP or CCP command.
mcGetNames Retrieves a comma-separated list of ECU names, Transport Layer Instance names, Measurement names, Characteristic names, Event names, Characteristic pages, or Group names from a specified A2L database.
mcGetNamesLength Retrieves the amount of memory required to store the names returned by mcGetNames.
mcGetProperty Retrieves a property of the driver, the database, the ECU, a characteristic, a Measurement, or a Measurement task.
mcMeasurementCreate Creates a Measurement object in memory.
mcMeasurementRead Reads a single scaled Measurement value from the ECU.
mcMeasurementReadRaw Reads a single raw (unscaled) Measurement value from the ECU.
mcMeasurementWrite Writes a single scaled Measurement value to the ECU.
mcMeasurementWriteRaw Writes a single raw (unscaled) Measurement value to the ECU.
mcProgram Programs a memory block on the ECU.
mcProgramReset Indicates the end of a programming sequence.
mcProgramStart Indicates the start of a programming sequence.
mcSetProperty Sets a property of the driver, the database, the ECU, a characteristic, a Measurement, or a Measurement task.
mcStatusToString Converts a status code into a descriptive string.
mcTextToDouble Converts a text string to a numerical value using an enumeration or range text scaling.
mcUpload Uploads data from an ECU.
mcXCPCopyCalPage Forces a copy transaction of one calibration page to another.
mcXCPGetCalPage Queries a calibration page setting.
mcXCPGetId Queries session configuration or slave device identification.
mcXCPGetStatus Queries the current session status from an ECU slave device.
mcXCPProgramPrepare Prepares the programming of non volatile memory.
mcXCPProgramVerify Performs a non-volatile memory certification task on the ECU device.
mcXCPSetCalPage Sets a calibration page.
mcXCPSetRequest Performs a request to save session and device information to non-volatile memory.
mcXCPSetSegmentMode Sets the mode of a specified segment.
Was this information helpful?