1.1.4 Library Interface
Metrology driver library provides the following interfaces:
Functions
| Name | Description |
|---|---|
| DRV_METROLOGY_Initialize | Initializes the metrology Driver for PIC32CXMTx dual-core devices |
| DRV_METROLOGY_Reinitialize | Re-initializes the metrology Driver for PIC32CXMTx dual-core devices |
| DRV_METROLOGY_Open | Opens the specified metrology driver |
| DRV_METROLOGY_Close | Closes an opened instance of the metrology driver |
| DRV_METROLOGY_Start | Start running the metrology library in coprocessor |
| DRV_METROLOGY_Tasks | Performs the tasks necessary to maintain a state machine of the metrology driver |
| DRV_METROLOGY_IntegrationCallbackRegister | Allows a client to set an event handling function for the driver to call back when the integration period has completed |
| DRV_METROLOGY_CalibrationCallbackRegister | Allows a client to set an event handling function for the driver to call back when the calibration process has finished |
| DRV_METROLOGY_HarmonicAnalysisCallbackRegister | Allows 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_GetStatus | Gets the current status of the metrology driver |
| DRV_METROLOGY_GetStatusData | Get the pointer to the status registers of the metrology library |
| DRV_METROLOGY_GetControlData | Gets the pointer to the control registers of the metrology library |
| DRV_METROLOGY_GetControlByDefault | Gets the pointer to the control registers defined by MCC configurator |
| DRV_METROLOGY_GetAccData | Gets the pointer to the accumulated quantities of the metrology library |
| DRV_METROLOGY_GetHarData | Gets the pointer to the Harmonic analysis quantities of the metrology library |
| DRV_METROLOGY_SetControl | Sets the value of all the control registers of the metrology library |
| DRV_METROLOGY_GetEnergyValue | Gets the last energy calculated value |
| DRV_METROLOGY_GetMeasureValue | Gets the value of the desired measurement |
| DRV_METROLOGY_GetMeasureSign | Gets the sign of the desired measurement |
| DRV_METROLOGY_SetConfiguration | Applies the proper configuration before calibrating the system |
| DRV_METROLOGY_GetEventsData | Gets the pointer to the last events obtained from the metrology library |
| DRV_METROLOGY_GetCalibrationReferences | Gets the pointer to calibration references used in the calibration process |
| DRV_METROLOGY_StartCalibration | Starts internal calibration process |
| DRV_METROLOGY_StartHarmonicAnalysis | Request a new Harmonic analysis |
| DRV_METROLOGY_StopHarmonicAnalysis | Stops the running Harmonic analysis |
Data Types and Constants
| Name | Type | Description |
|---|---|---|
| DRV_METROLOGY_RESULT | Enum | Result of a Metrology driver interface operation |
| DRV_METROLOGY_START_MODE | Enum | Identifies types of startup process |
| DRV_METROLOGY_MEASURE_SIGN | Enum | Identifies the sign of measured values |
| DRV_METROLOGY_CALLBACK | Typedef | Pointer to a metrology event handler function |
| DRV_METROLOGY_CALIBRATION_CALLBACK | Typedef | Pointer to a calibration event handler function |
| DRV_METROLOGY_HARMONICS_CALLBACK | Typedef | Pointer to a harmonic analysis event handler function |
| DRV_METROLOGY_SENSOR_TYPE | Enum | Identifies types of metrology sensors |
| DRV_METROLOGY_GAIN_TYPE | Enum | Identifies possible gain values for the AFE (Analog Front End) |
| DRV_METROLOGY_PHASE_ID | Enum | Identifies all the metrology phases |
| DRV_METROLOGY_CALIBRATION_REFS | Struct | Specifies the all reference values used for the auto calibration process |
| DRV_METROLOGY_CALIBRATION | Struct | Specifies all data internally needed for the auto calibration process |
| DRV_METROLOGY_HARMONIC_RMS | Struct | Identifies the result of the Harmonic Analysis process |
| DRV_METROLOGY_HARMONIC_ANALYSIS | Struct | Internal data used to perform an harmonic analysis |
| DRV_METROLOGY_AFE_EVENTS | Struct | Identifies all events related to metrology library |
| DRV_METROLOGY_MEASURE_TYPE | Enum | Identifies the all types of measurements |
| DRV_METROLOGY_AFE_DATA | Struct | Identifies the data calculated from the metrology AFE measurements |
| DRV_METROLOGY_CONFIGURATION | Struct | Identifies values needed to set different metrology configurations |
| DRV_METROLOGY_STATUS | Enum | Identifies the status of the metrology library |
| DRV_METROLOGY_INIT | Struct | Identifies values needed for the initialization routine |
