OpenBIC
OpenSource Bridge-IC
pdr.c File Reference
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "pdr.h"
#include "sensor.h"
#include "libutil.h"
#include "plat_sensor_table.h"
#include "plat_ipmb.h"
#include <logging/log.h>
Include dependency graph for pdr.c:

Functions

 LOG_MODULE_REGISTER (pdr)
 
int pdr_init (void)
 
PDR_INFOget_pdr_info ()
 
void char16_to_char (const char16_t *src, char *dest, size_t max_length)
 
int pldm_get_sensor_name_via_sensor_id (uint16_t sensor_id, char *sensor_name, size_t max_length)
 
int get_pdr_table_via_record_handle (uint8_t *record_data, uint32_t record_handle)
 
uint32_t get_record_count ()
 
__weak uint32_t plat_get_pdr_size (uint8_t pdr_type)
 
__weak void plat_load_numeric_sensor_pdr_table (PDR_numeric_sensor *numeric_sensor_table)
 
__weak void plat_load_aux_sensor_names_pdr_table (PDR_sensor_auxiliary_names *aux_sensor_name_table)
 
__weak void plat_init_entity_aux_names_pdr_table ()
 
__weak void plat_load_entity_aux_names_pdr_table (PDR_entity_auxiliary_names *entity_aux_name_table)
 
__weak uint16_t plat_get_pdr_entity_aux_names_size ()
 
__weak uint16_t plat_get_disabled_sensor_count ()
 
PDR_entity_auxiliary_namesget_entity_auxiliary_names_table ()
 
int change_pdr_table_critical_high_with_sensor_id (uint32_t sensorID, float critical_high)
 
int change_pdr_table_critical_low_with_sensor_id (uint32_t sensorID, float critical_low)
 
int get_pdr_table_critical_high_and_low_with_sensor_id (uint32_t sensorID, float *critical_high, float *critical_low)
 
int check_supported_threshold_with_sensor_id (uint32_t sensorID)
 

Variables

uint32_t total_record_count = 0
 
PDR_INFOpdr_info = NULL
 
PDR_numeric_sensornumeric_sensor_table = NULL
 
PDR_sensor_auxiliary_namessensor_auxiliary_names_table = NULL
 
PDR_entity_auxiliary_namesentity_auxiliary_names_table = NULL
 

Function Documentation

◆ change_pdr_table_critical_high_with_sensor_id()

int change_pdr_table_critical_high_with_sensor_id ( uint32_t  sensorID,
float  critical_high 
)
Here is the call graph for this function:

◆ change_pdr_table_critical_low_with_sensor_id()

int change_pdr_table_critical_low_with_sensor_id ( uint32_t  sensorID,
float  critical_low 
)
Here is the call graph for this function:

◆ char16_to_char()

void char16_to_char ( const char16_t src,
char *  dest,
size_t  max_length 
)

◆ check_supported_threshold_with_sensor_id()

int check_supported_threshold_with_sensor_id ( uint32_t  sensorID)
Here is the call graph for this function:

◆ get_entity_auxiliary_names_table()

PDR_entity_auxiliary_names * get_entity_auxiliary_names_table ( )

◆ get_pdr_info()

PDR_INFO * get_pdr_info ( )

◆ get_pdr_table_critical_high_and_low_with_sensor_id()

int get_pdr_table_critical_high_and_low_with_sensor_id ( uint32_t  sensorID,
float *  critical_high,
float *  critical_low 
)
Here is the call graph for this function:

◆ get_pdr_table_via_record_handle()

int get_pdr_table_via_record_handle ( uint8_t *  record_data,
uint32_t  record_handle 
)
Here is the call graph for this function:

◆ get_record_count()

uint32_t get_record_count ( )

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( pdr  )

◆ pdr_init()

int pdr_init ( void  )
Here is the call graph for this function:

◆ plat_get_disabled_sensor_count()

__weak uint16_t plat_get_disabled_sensor_count ( )

◆ plat_get_pdr_entity_aux_names_size()

__weak uint16_t plat_get_pdr_entity_aux_names_size ( )

◆ plat_get_pdr_size()

__weak uint32_t plat_get_pdr_size ( uint8_t  pdr_type)

◆ plat_init_entity_aux_names_pdr_table()

__weak void plat_init_entity_aux_names_pdr_table ( )

◆ plat_load_aux_sensor_names_pdr_table()

__weak void plat_load_aux_sensor_names_pdr_table ( PDR_sensor_auxiliary_names aux_sensor_name_table)

◆ plat_load_entity_aux_names_pdr_table()

__weak void plat_load_entity_aux_names_pdr_table ( PDR_entity_auxiliary_names entity_aux_name_table)

◆ plat_load_numeric_sensor_pdr_table()

__weak void plat_load_numeric_sensor_pdr_table ( PDR_numeric_sensor numeric_sensor_table)

◆ pldm_get_sensor_name_via_sensor_id()

int pldm_get_sensor_name_via_sensor_id ( uint16_t  sensor_id,
char *  sensor_name,
size_t  max_length 
)
Here is the call graph for this function:

Variable Documentation

◆ entity_auxiliary_names_table

PDR_entity_auxiliary_names* entity_auxiliary_names_table = NULL

◆ numeric_sensor_table

PDR_numeric_sensor* numeric_sensor_table = NULL

◆ pdr_info

PDR_INFO* pdr_info = NULL

◆ sensor_auxiliary_names_table

PDR_sensor_auxiliary_names* sensor_auxiliary_names_table = NULL

◆ total_record_count

uint32_t total_record_count = 0