1.1.4.22 DRV_METROLOGY_GetMeasureSign Function
C
Returns
DRV_METROLOGY_MEASURE_SIGN DRV_METROLOGY_GetMeasureSign(DRV_METROLOGY_MEASURE_TYPE type);SummaryGets the sign of the last value of the selected measurement type.
DescriptionGets the sign of the last value of the selected measurement type. Values are updated at the end of each integration period. For additional information about Measurement types, refer to the DRV_METROLOGY_MEASURE_TYPE definition.
Parameters| Param | Description |
|---|---|
| type | Indicate what type of measurement is obtained. |
The sign of the last value for the selected type. Positive sign is identified as MEASURE_SIGN_POSITIVE (0), negative sign as MEASURE_SIGN_NEGATIVE (1).
Examplebool APP_METROLOGY_GetMeasure(DRV_METROLOGY_MEASURE_TYPE measureId, uint32_t * value, DRV_METROLOGY_MEASURE_SIGN * sign)
{
if (measureId >= MEASURE_TYPE_NUM)
{
return false;
}
if (sign != NULL)
{
*sign = DRV_METROLOGY_GetMeasureSign(measureId);
}
*value = DRV_METROLOGY_GetMeasureValue(measureId);
return true;
}RemarksNone.
