1.1.3.4 Library Interface

Metrology driver library provides the following interfaces:

Functions

NameDescription
DRV_METROLOGY_InitializeInitializes the metrology Driver for MISTRAL dual-core devices
DRV_METROLOGY_ReinitializeRe-initializes the metrology Driver for MISTRAL dual-core devices
DRV_METROLOGY_OpenOpens the specified metrology driver
DRV_METROLOGY_CloseCloses an opened instance of the metrology driver
DRV_METROLOGY_StartStart running the metrology library in coprocessor
DRV_METROLOGY_TasksPerforms the tasks necessary to maintain a state machine of the metrology driver
DRV_METROLOGY_IntegrationCallbackRegisterAllows a client to set an event handling function for the driver to call back when the integration period has completed
DRV_METROLOGY_CalibrationCallbackRegisterAllows a client to set an event handling function for the driver to call back when the calibration process has finished
DRV_METROLOGY_HarmonicAnalysisCallbackRegisterAllows a client to set an event handling function for the driver to call back when the harmonic data is ready as a result of the harmonic analysis
DRV_METROLOGY_GetStatusGets the current status of the metrology driver
DRV_METROLOGY_GetStatusDataGet the pointer to the status registers of the metrology library
DRV_METROLOGY_GetControlDataGets the pointer to the control registers of the metrology library
DRV_METROLOGY_GetControlByDefaultGets the pointer to the control registers defined by MCC configurator
DRV_METROLOGY_GetAccDataGets the pointer to the accumulated quantities of the metrology library
DRV_METROLOGY_GetHarDataGets the pointer to the Harmonic analysis quantities of the metrology library
DRV_METROLOGY_SetControlSets the value of all the control registers of the metrology library
DRV_METROLOGY_GetEnergyValueGets the last energy calculated value
DRV_METROLOGY_GetRMSValueGets the RMS value of the desired measurement
DRV_METROLOGY_GetRMSSignGets the RMS sign of the desired measurement
DRV_METROLOGY_SetConfigurationApplies the proper configuration before calibrating the system
DRV_METROLOGY_GetEventsDataGets the pointer to the last events obtained from the metrology library
DRV_METROLOGY_GetCalibrationReferencesGets the pointer to calibration references used in the calibration process
DRV_METROLOGY_StartCalibrationStarts internal calibration process
DRV_METROLOGY_StartHarmonicAnalysisRequest a new Harmonic analysis

Data types and constants

NameTypeDescription
DRV_METROLOGY_RESULTEnumResult of a Metrology driver interface operation
DRV_METROLOGY_START_MODEEnumIdentifies types of startup process
DRV_METROLOGY_RMS_SIGNEnumIdentifies the sign of RMS values
DRV_METROLOGY_CALLBACKTypedefPointer to a metrology event handler function
DRV_METROLOGY_CALIBRATION_CALLBACKTypedefPointer to a calibration event handler function
DRV_METROLOGY_HARMONICS_CALLBACKTypedefPointer to a harmonic analysis event handler function
DRV_METROLOGY_SENSOR_TYPEEnumIdentifies types of metrology sensors
DRV_METROLOGY_GAIN_TYPEEnumIdentifies possible gain values for the AFE (Analog Front End)
DRV_METROLOGY_PHASE_IDEnumIdentifies all the metrology phases
DRV_METROLOGY_CALIBRATION_REFSStructSpecifies the all reference values used for the auto calibration process
DRV_METROLOGY_CALIBRATIONStructSpecifies all data internally needed for the auto calibration process
DRV_METROLOGY_HARMONIC_RMSStructIdentifies the result of the Harmonic Analysis process
DRV_METROLOGY_HARMONIC_ANALYSISStructInternal data used to perform an harmonic analysis
DRV_METROLOGY_AFE_EVENTSStructIdentifies all events related to metrology library
DRV_METROLOGY_RMS_TYPEEnumIdentifies the all RMS types of measurements
DRV_METROLOGY_AFE_DATAStructIdentifies the data calculated from the metrology AFE measurements
DRV_METROLOGY_CONFIGURATIONStructIdentifies values needed to set different metrology configurations
DRV_METROLOGY_STATUSEnumIdentifies the status of the metrology library
DRV_METROLOGY_INITStructIdentifies values needed for the initialization routine