EDCS Reference Manual
Functions EDCS ConvertQuantityValue |
---|
extern EDCS_Status_Code | ||||
EDCS_ConvertQuantityValue | ||||
( | ||||
const | EDCS_Unit_Code | src_unit, | (notes) | |
const | EDCS_Scale_Code | src_scale, | (notes) | |
EDCS_Long_Float | src_quantity, | (notes) | ||
const | EDCS_Unit_Code | dest_unit, | (notes) | |
const | EDCS_Scale_Code | dest_scale, | (notes) | |
EDCS_Long_Float | * | dest_quantity_ptr | (notes) | |
); |
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_STAT_CODE_SUCCESS | and *dest_quantity_ptr is set to the result of the specified conversion, if valid parameters were passed in. |
EDCS_STAT_CODE_NULL_REQUIRED_PARAMETER | and *dest_quantity_ptr is left unchanged, if dest_quantity_ptr was NULL. |
EDCS_STAT_CODE_INVALID_SOURCE_UNIT | and *dest_quantity_ptr is set to zero (0), if src_unit is not a valid EU code. |
EDCS_STAT_CODE_INVALID_DEST_UNIT | and *dest_quantity_ptr is set to zero (0), if dest_unit is not a valid EU code. |
EDCS_STAT_CODE_INVALID_SOURCE_SCALE | and *dest_quantity_ptr is set to zero (0), if src_scale is not a valid EU code. |
EDCS_STAT_CODE_INVALID_DEST_SCALE | and *dest_quantity_ptr is set to zero (0), if dest_scale is not a valid EU code. |
EDCS_STAT_CODE_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. |
the unit of measure for src_quantity
the unit scale for src_quantity
the quantity for which a conversion is requested
the unit of measure requested for *dest_quantity_ptr
the unit scale requested for *dest_quantity_ptr
pointer to a variable in the user's memory space where the result will be copied
Prev: EDCS_CompareUnitEquivalenceCodes.
Next: EDCS_EnumNameToAbstractValueType.
Up:Index.
|