2.1.4.23 DRV_MCMETROLOGY_GetChannelMeasureValue Function
C
Returns
float DRV_MCMETROLOGY_GetChannelMeasureValue(uint8_t channel, DRV_MCMETROLOGY_CHANNEL_MEASURE_TYPE type);SummaryGets the last value of the selected measurement type on the selected channel.
DescriptionGets the last value of the selected measurement. Values are updated at the end of each integration period. For additional information about Measurement types, refer to the DRV_MCMETROLOGY_CHANNEL_MEASURE_TYPE definition.
Parameters| Param | Description |
|---|---|
| channel | Indicate channel index. |
| type | Indicate what type of measurement is obtained. |
The value of the selected type.
Exampleapp_metrologyData.queueFree = uxQueueSpacesAvailable(appEnergyQueueID);
if (app_metrologyData.queueFree)
{
newMetrologyData.energy = DRV_MCMETROLOGY_GetEnergyValue(true);
newMetrologyData.rmsChannel0 = DRV_MCMETROLOGY_GetChannelMeasureValue(0, CHN_MEASURE_RMS);
xQueueSend(appEnergyQueueID, &newMetrologyData, (TickType_t) 0);
}
else
{
SYS_CMD_MESSAGE("ENERGY Queue is FULL!!!\n\r");
}RemarksNone.
