EDCS Reference Manual
Functions EDCS ConvertQuantityValue |
---|
extern EDCS_Status_Code | ||||
EDCS_ConvertQuantityValue | ||||
( | ||||
const | EDCS_Real_Value | * | from_value, | 1 |
EDCS_Real_Value | * | to_value | 2 | |
); |
Given a numeric quantity (src_quantity) specified with a given unit (src_unit) and scale (src_scale), convert that quantity to a specified unit and scale.
EDCS_SC_SUCCESS | and *dest_quantity_ptr is set to the result of the specified conversion, if valid parameters were passed in. |
EDCS_SC_NULL_REQUIRED_PARAMETER | and *dest_quantity_ptr is left unchanged, if dest_quantity_ptr was NULL. |
EDCS_SC_INVALID_INPUT_UNIT | and *dest_quantity_ptr is set to zero (0), if src_unit is not a valid EU code. |
EDCS_SC_INVALID_OUTPUT_UNIT | and *dest_quantity_ptr is set to zero (0), if dest_unit is not a valid EU code. |
EDCS_SC_INVALID_INPUT_UNIT_SCALE | and *dest_quantity_ptr is set to zero (0), if src_scale is not a valid ES code. |
EDCS_SC_INVALID_OUTPUT_UNIT_SCALE | and *dest_quantity_ptr is set to zero (0), if dest_scale is not a valid ES code. |
EDCS_SC_UNITS_NOT_EQUIVALENT | and *dest_quantity_ptr is set to zero (0), if src_unit and dest_unit do not belong to the same EQ. |
1 the from value
2 the to value
Prev: EDCS_ConvertQuantityLongFloatValue.
Next: EDCS_EnumNameToAttributeValueType.
Up:Index.
|