1.1.4.23 DRV_METROLOGY_GetEnergyValue Function
C
float DRV_METROLOGY_GetEnergyValue(bool restartEnergy);
Summary
Gets the active energy value.
Description
Gets the active energy value. Energy is updated at the end of each integration period.
Parameters
| Parameters | Description |
|---|---|
| restartEnergy | Flag to indicate if the accumulated energy value should be restarted after calling this routine |
Returns
The active energy value obtained according to the last integration period.
Example
/* Send new Energy values to the Energy Task */
app_metrologyData.queueFree = uxQueueSpacesAvailable(appEnergyQueueID);
if (app_metrologyData.queueFree)
{
newMetrologyData.energy = DRV_METROLOGY_GetEnergyValue(true);
newMetrologyData.Pt = DRV_METROLOGY_GetMeasureValue(MEASURE_PT);
xQueueSend(appEnergyQueueID, &newMetrologyData, (TickType_t) 0);
}
else
{
SYS_CMD_MESSAGE("ENERGY Queue is FULL!!!\n\r");
}
Remarks
None.
