Purpose

Converts a text string to a numerical value using an enumeration or range text scaling. Format

        mcTypeStatus  mcTextToDouble(
                 mcTypeTaskRef ECURefNum,
                 u32 ObjectType,
                 cstr ObjectName,
                 cstr TextValue,
                 double *Value);
      

Input

ECURefNum

The task reference that links to the selected ECU.

This reference is originally returned from mcECUSelectEx.

ObjectType

Indicates the type of the object named in ObjectName. Valid values are:

1 Measurement Name

2 Characteristic Name

ObjectName

Indicates the object (measurement or characteristic) for which the enumeration or range text scaling is performed.

TextValue

The text that you want to turn into the numeric representation. Output

Value

Returns the converted value.

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

mcTextToDouble performs text to double conversion for measurement or characteristic values.

Especially if the measurement or characteristic has an associated enumeration or range text type scaling, the text input will be converted into the numeric representation, using the related COMPU_VTAB or COMPU_VTAB_RANGE table.