mcCharacteristicReadByteArray
- Updated2025-09-25
- 1 minute(s) read
Purpose
Reads all data as raw byte array (no scaling) from a named Characteristic on the ECU which is identified by the ECU Reference handle. Format
| mcTypeStatus |
mcCharacteristicReadByteArray(
|
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 1-dimensional byte array of values for the selected Characteristic. The byte array corresponds to the memory area in the ECU representing this 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.
DescriptionmcCharacteristicReadByteArray reads values from a named Characteristic on the ECU which is identified by the ECU Reference handle. The function returns a raw (unscaled) 1D byte array.