no-OS
Enumerations | Functions
pqlib_convert.h File Reference
#include "adi_pqlib.h"
#include <math.h>
#include <stdint.h>
#include <stdio.h>
Include dependency graph for pqlib_convert.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  EVENT_TYPE {
  EVENT_DIPS,
  EVENT_SWELL,
  EVENT_RVC,
  EVENT_INTRPS
}
 Enumeration for possible event types for iio output preparation. More...
 

Functions

float convert_rms_type (ADI_AFE_RMS_TYPE mag, float scale)
 Converts ADI_AFE_RMS_TYPE to voltage/current magnitude. More...
 
float convert_pct_type (ADI_PQLIB_PCT_TYPE val)
 Converts ADI_PQLIB_PCT_TYPE to percentage. More...
 
ADI_PQLIB_COEF_TYPE convert_to_coef_fract_type (float val)
 Converts val to correction coefficient. More...
 
ADI_PQLIB_PCT_TYPE convert_to_pct_type (float val)
 Converts val to percentage. More...
 
ADI_PQLIB_FREQ_TYPE convert_to_freq_type (float val)
 Converts val to freq in mhz. More...
 
uint32_t convert_to_time_ms (float timesec)
 Converts time in sec to time in ms. More...
 
int prepara_string (EVENT_TYPE event_type, int event_value, char *buf)
 Prepare string output for specific event attribute types. More...
 

Enumeration Type Documentation

◆ EVENT_TYPE

enum EVENT_TYPE

Enumeration for possible event types for iio output preparation.

Enumerator
EVENT_DIPS 
EVENT_SWELL 
EVENT_RVC 
EVENT_INTRPS 

Function Documentation

◆ convert_pct_type()

float convert_pct_type ( ADI_PQLIB_PCT_TYPE  val)

Converts ADI_PQLIB_PCT_TYPE to percentage.

Parameters
[in]val- Value for conversion
Returns
Equivalent percentage value
Here is the caller graph for this function:

◆ convert_rms_type()

float convert_rms_type ( ADI_AFE_RMS_TYPE  mag,
float  scale 
)

Converts ADI_AFE_RMS_TYPE to voltage/current magnitude.

Parameters
[in]mag- Magnitude code from the library
[in]scale- Magnitude of full range RMS
Returns
magnitude in volts or amperes
Here is the caller graph for this function:

◆ convert_to_coef_fract_type()

ADI_PQLIB_COEF_TYPE convert_to_coef_fract_type ( float  val)

Converts val to correction coefficient.

Parameters
[in]val- Value for conversion
Returns
correction coefficient
Here is the caller graph for this function:

◆ convert_to_freq_type()

ADI_PQLIB_FREQ_TYPE convert_to_freq_type ( float  val)

Converts val to freq in mhz.

Parameters
[in]val- Value for conversion
Returns
frequency
Here is the caller graph for this function:

◆ convert_to_pct_type()

ADI_PQLIB_PCT_TYPE convert_to_pct_type ( float  val)

Converts val to percentage.

Parameters
[in]val- Value for conversion
Returns
threshold percentage
Here is the caller graph for this function:

◆ convert_to_time_ms()

uint32_t convert_to_time_ms ( float  timesec)

Converts time in sec to time in ms.

Parameters
[in]timesec- Value for conversion.
Returns
time in millisec
Here is the caller graph for this function:

◆ prepara_string()

int prepara_string ( EVENT_TYPE  event_type,
int  event_value,
char *  buf 
)

Prepare string output for specific event attribute types.

Parameters
event_typeType of the event needed for output.
event_valueType of the event property, depends on the event.
bufIIO-buffer used for output preparation.
Returns
int Length of the prepared string
Here is the caller graph for this function: