Jump to main content

# 2.1.4.21 DRV_MCMETROLOGY_GetMeasureValue Function

## C

    float DRV_MCMETROLOGY_GetMeasureValue(DRV_MCMETROLOGY_MEASURE_TYPE type);

## Summary

Gets the last value of the selected measurement type.

## 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_MEASURE_TYPE definition.

## Parameters

Parameters | Description
--- | ---
type | Indicate what type of measurement is obtained

## Returns

The value of the selected type.

## Example

    DRV_MCMETROLOGY_UpdateMeasurements();

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

## Remarks

None.

Rev: E