ECU Measurement and Calibration Toolkit C API Reference

Table of Contents

mcMeasurementWrite

  • Updated2023-02-21
  • 1 minute(s) read

Purpose

Writes a single scaled Measurement value to the ECU.

Format

mcTypeStatus mcMeasurementWrite(
mcTypeTaskRef RefNum,
char *MeasurementName,
f64 Values);

Input

RefNum

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

MeasurementName

MeasurementName is the name of a Measurement channel stored in the A2L database file to which a Measurement value is to be written.

Values

Writes a single sample for the Measurement channel initialized in MeasurementName.

Output

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

mcMeasurementWrite performs a single point write (download) of a scaled Measurement into the selected ECU without opening a Measurement task. mcMeasurementWrite can only be performed if the Measurement channel is not set to read only. To query if an ECU Measurement channel can be accessed by mcMeasurementWrite, call mcGetProperty with the parameter mcPropMeas_ReadOnly.

Log in to get a better experience