1.1.3.4.18 DRV_METROLOGY_GetRMSValue Function

C

uint32_t DRV_METROLOGY_GetRMSValue(DRV_METROLOGY_RMS_TYPE type);

Summary

Gets the last RMS value of the selected measurement type.

Description

For further information about RMS types, refer to DRV_METROLOGY_RMS_TYPE definition.

Parameters

ParamDescription
typeIndicate what type of measurement is obtained.

Returns

The RMS value of the selected type.

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_GetRMSValue(RMS_PT);
          xQueueSend(appEnergyQueueID, &newMetrologyData, (TickType_t) 0);
      }
      else
      {
          SYS_CMD_MESSAGE("ENERGY Queue is FULL!!!\n\r");
      }

Remarks

None.