Jump to main content

# 2.1.4.22 DRV_MCMETROLOGY_GetPowerMeasureValue Function

## C

    float DRV_MCMETROLOGY_GetPowerMeasureValue(uint8_t power, DRV_DRV_MCMETROLOGY_POWER_MEASURE_TYPE type);

## Summary

Gets the last value of the selected measurement type on the selected power.

## Description

Gets the last value of the selected measurement type on the selected power. Values are updated at the end of each integration period. For additional information about Measurement types, refer to the DRV_MCMETROLOGY_POWER_MEASURE_TYPE definition.

## Parameters

Parameters | Description
--- | ---
power | Indicate Power index
type | Indicate what type of measurement is obtained

## Returns

The value of the selected type.

## Example

    app_metrologyData.queueFree = uxQueueSpacesAvailable(appEnergyQueueID);
    if (app_metrologyData.queueFree)
    {
        newMetrologyData.energy = DRV_MCMETROLOGY_GetEnergyValue(true);
        newMetrologyData.activePower0 = DRV_MCMETROLOGY_GetPowerMeasureValue(0, POW_MEASURE_P);
        xQueueSend(appEnergyQueueID, &newMetrologyData, (TickType_t) 0);
    }
    else
    {
        SYS_CMD_MESSAGE("ENERGY Queue is FULL!!!\n\r");
    }

## Remarks

None.

Rev: E