OpenBIC
OpenSource Bridge-IC
pdr.h File Reference
#include <stdbool.h>
#include <stdint.h>
#include <sys/byteorder.h>
Include dependency graph for pdr.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define TIMESTAMP104_SIZE   13
 
#define NUMERIC_PDR_SIZE   108
 
#define MAX_LANGUAGE_TAG_LEN   3
 
#define MAX_AUX_SENSOR_NAME_LEN   40
 

Typedefs

typedef float real32_t
 
typedef uint_least16_t char16_t
 

Enumerations

enum  pdr_repository_state { PDR_STATE_AVAILABLE = 0x00 , PDR_STATE_UPDATE_IN_PROGRESS = 0x01 , PDR_STATE_FAILED = 0x02 }
 
enum  PDR_SENSOR_INIT_STATE { PDR_SENSOR_NO_INIT = 0 , PDR_SENSOR_USEINIT_PDR , PDR_SENSOR_ENABLE , PDR_SENSOR_DISABLE }
 
enum  pldm_pdr_types {
  PLDM_TERMINUS_LOCATOR_PDR = 1 , PLDM_NUMERIC_SENSOR_PDR = 2 , PLDM_NUMERIC_SENSOR_INITIALIZATION_PDR = 3 , PLDM_STATE_SENSOR_PDR = 4 ,
  PLDM_STATE_SENSOR_INITIALIZATION_PDR = 5 , PLDM_SENSOR_AUXILIARY_NAMES_PDR = 6 , PLDM_OEM_UNIT_PDR = 7 , PLDM_OEM_STATE_SET_PDR = 8 ,
  PLDM_NUMERIC_EFFECTER_PDR = 9 , PLDM_NUMERIC_EFFECTER_INITIALIZATION_PDR = 10 , PLDM_STATE_EFFECTER_PDR = 11 , PLDM_STATE_EFFECTER_INITIALIZATION_PDR = 12 ,
  PLDM_EFFECTER_AUXILIARY_NAMES_PDR = 13 , PLDM_EFFECTER_OEM_SEMANTIC_PDR = 14 , PLDM_PDR_ENTITY_ASSOCIATION = 15 , PLDM_ENTITY_AUXILIARY_NAMES_PDR = 16 ,
  PLDM_OEM_ENTITY_ID_PDR = 17 , PLDM_INTERRUPT_ASSOCIATION_PDR = 18 , PLDM_EVENT_LOG_PDR = 19 , PLDM_PDR_FRU_RECORD_SET = 20 ,
  PLDM_COMPACT_NUMERIC_SENSOR_PDR = 21 , PLDM_OEM_DEVICE_PDR = 126 , PLDM_OEM_PDR = 127
}
 

Functions

int pdr_init (void)
 
struct __attribute__ ((packed))
 
PDR_INFOget_pdr_info ()
 
uint32_t get_record_count ()
 
uint32_t plat_get_pdr_size (uint8_t pdr_type)
 
void plat_load_numeric_sensor_pdr_table (PDR_numeric_sensor *numeric_sensor_table)
 
void plat_load_aux_sensor_names_pdr_table (PDR_sensor_auxiliary_names *aux_sensor_name_table)
 
void plat_load_entity_aux_names_pdr_table (PDR_entity_auxiliary_names *entity_aux_name_table)
 
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)
 
void plat_init_entity_aux_names_pdr_table ()
 
uint16_t plat_get_pdr_entity_aux_names_size ()
 
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

 PDR_common_header
 
 PDR_numeric_sensor
 
 PDR_sensor_auxiliary_names
 
 PDR_entity_auxiliary_names
 
 PDR_INFO
 

Macro Definition Documentation

◆ MAX_AUX_SENSOR_NAME_LEN

#define MAX_AUX_SENSOR_NAME_LEN   40

◆ MAX_LANGUAGE_TAG_LEN

#define MAX_LANGUAGE_TAG_LEN   3

◆ NUMERIC_PDR_SIZE

#define NUMERIC_PDR_SIZE   108

◆ TIMESTAMP104_SIZE

#define TIMESTAMP104_SIZE   13

Typedef Documentation

◆ char16_t

typedef uint_least16_t char16_t

◆ real32_t

typedef float real32_t

Enumeration Type Documentation

◆ pdr_repository_state

Enumerator
PDR_STATE_AVAILABLE 
PDR_STATE_UPDATE_IN_PROGRESS 
PDR_STATE_FAILED 

◆ PDR_SENSOR_INIT_STATE

Enumerator
PDR_SENSOR_NO_INIT 
PDR_SENSOR_USEINIT_PDR 
PDR_SENSOR_ENABLE 
PDR_SENSOR_DISABLE 

◆ pldm_pdr_types

Enumerator
PLDM_TERMINUS_LOCATOR_PDR 
PLDM_NUMERIC_SENSOR_PDR 
PLDM_NUMERIC_SENSOR_INITIALIZATION_PDR 
PLDM_STATE_SENSOR_PDR 
PLDM_STATE_SENSOR_INITIALIZATION_PDR 
PLDM_SENSOR_AUXILIARY_NAMES_PDR 
PLDM_OEM_UNIT_PDR 
PLDM_OEM_STATE_SET_PDR 
PLDM_NUMERIC_EFFECTER_PDR 
PLDM_NUMERIC_EFFECTER_INITIALIZATION_PDR 
PLDM_STATE_EFFECTER_PDR 
PLDM_STATE_EFFECTER_INITIALIZATION_PDR 
PLDM_EFFECTER_AUXILIARY_NAMES_PDR 
PLDM_EFFECTER_OEM_SEMANTIC_PDR 
PLDM_PDR_ENTITY_ASSOCIATION 
PLDM_ENTITY_AUXILIARY_NAMES_PDR 
PLDM_OEM_ENTITY_ID_PDR 
PLDM_INTERRUPT_ASSOCIATION_PDR 
PLDM_EVENT_LOG_PDR 
PLDM_PDR_FRU_RECORD_SET 
PLDM_COMPACT_NUMERIC_SENSOR_PDR 
PLDM_OEM_DEVICE_PDR 
PLDM_OEM_PDR 

Function Documentation

◆ __attribute__()

struct __attribute__ ( (packed)  )

◆ 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:

◆ 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 ( )

◆ pdr_init()

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

◆ plat_get_disabled_sensor_count()

uint16_t plat_get_disabled_sensor_count ( )

◆ plat_get_pdr_entity_aux_names_size()

uint16_t plat_get_pdr_entity_aux_names_size ( )

◆ plat_get_pdr_size()

uint32_t plat_get_pdr_size ( uint8_t  pdr_type)
Here is the call graph for this function:

◆ plat_init_entity_aux_names_pdr_table()

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

◆ plat_load_aux_sensor_names_pdr_table()

void plat_load_aux_sensor_names_pdr_table ( PDR_sensor_auxiliary_names aux_sensor_name_table)
Here is the call graph for this function:

◆ plat_load_entity_aux_names_pdr_table()

void plat_load_entity_aux_names_pdr_table ( PDR_entity_auxiliary_names entity_aux_name_table)

◆ plat_load_numeric_sensor_pdr_table()

void plat_load_numeric_sensor_pdr_table ( PDR_numeric_sensor numeric_sensor_table)
Here is the call graph for this function:

◆ 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

◆ PDR_common_header

PDR_common_header

◆ PDR_entity_auxiliary_names

PDR_entity_auxiliary_names

◆ PDR_INFO

PDR_INFO

◆ PDR_numeric_sensor

PDR_numeric_sensor

◆ PDR_sensor_auxiliary_names

PDR_sensor_auxiliary_names