mcCharacteristicRead
- Updated2023-02-21
- 1 minute(s) read
mcCharacteristicRead
Purpose
Reads all data as scaled from a named Characteristic on the ECU which is identified by the ECU Reference handle.
Format
mcTypeStatus | mcCharacteristicRead(
|
Input
ECURefNum
ECURefNum is the task reference which links to the selected ECU. This reference is originally returned from mcECUSelectEx.
CharacteristicName
CharacteristicName is the name of the Characteristic defined in the A2L database file.
NumberOfValues
Specifies the number of values to read. To determine the dimension of the Characteristic, use the mcGetProperty function with the parameter mcPropChar_Dimension. To determine the size of each dimension use the mcGetProperty function with the parameter mcPropChar_Sizes.
Output
Values
Returns a single value, a 1-dimensional array, or a 2-dimensional array of values for the selected Characteristic.
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
mcCharacteristicRead reads values from a named Characteristic on the ECU which is identified by the ECU Reference handle. The function returns a scaled double, 1D, or 2D array.