OpenBIC
OpenSource Bridge-IC
pldm_sensor.h File Reference
#include <stdlib.h>
#include "sensor.h"
#include "pdr.h"
Include dependency graph for pldm_sensor.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  pldm_sensor_info
 
struct  pldm_sensor_thread
 

Macros

#define PLDM_SENSOR_POLL_STACK_SIZE   3056
 
#define PLDM_SENSOR_POLL_TIME_DEFAULT_MS   1000
 

Typedefs

typedef struct pldm_sensor_info pldm_sensor_info
 
typedef struct pldm_sensor_thread pldm_sensor_thread
 

Enumerations

enum  {
  UP_THRESHOLD_WARN = 0x01 , UP_THRESHOLD_CRIT = 0x02 , UP_THRESHOLD_FATAL = 0x04 , LOW_THRESHOLD_WARN = 0x08 ,
  LOW_THRESHOLD_CRIT = 0x10 , LOW_THRESHOLD_FATAL = 0x20
}
 

Functions

void pldm_sensor_monitor_init ()
 
void pldm_sensor_poll_thread_init ()
 
void pldm_sensor_polling_handler (void *arug0, void *arug1, void *arug2)
 
void pldm_sensor_get_reading (sensor_cfg *pldm_sensor_cfg, uint32_t *update_time, int pldm_sensor_count, int thread_id, int sensor_num)
 
uint8_t pldm_sensor_get_reading_from_cache (uint16_t sensor_id, int *reading, uint8_t *sensor_operational_state)
 
bool pldm_sensor_is_interval_ready (pldm_sensor_info *pldm_sensor_list)
 
int pldm_sensor_get_info_via_sensor_thread_and_sensor_pdr_index (int thread_id, int sensor_pdr_index, uint16_t *sensor_id, real32_t *resolution, real32_t *offset, int8_t *unit_modifier, real32_t *poll_time, uint32_t *update_time, uint8_t *type, int *cache, uint8_t *cache_status, char *check_access)
 
pldm_sensor_threadplat_pldm_sensor_load_thread ()
 
pldm_sensor_infoplat_pldm_sensor_load (int thread_id)
 
int plat_pldm_sensor_get_sensor_count (int thread_id)
 
int pldm_sensor_polling_pre_check (pldm_sensor_info *pldm_snr_list, int sensor_num)
 
int pldm_polling_sensor_reading (pldm_sensor_info *pldm_snr_list, int pldm_sensor_count, int thread_id, int sensor_num)
 

Macro Definition Documentation

◆ PLDM_SENSOR_POLL_STACK_SIZE

#define PLDM_SENSOR_POLL_STACK_SIZE   3056

◆ PLDM_SENSOR_POLL_TIME_DEFAULT_MS

#define PLDM_SENSOR_POLL_TIME_DEFAULT_MS   1000

Typedef Documentation

◆ pldm_sensor_info

◆ pldm_sensor_thread

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
UP_THRESHOLD_WARN 
UP_THRESHOLD_CRIT 
UP_THRESHOLD_FATAL 
LOW_THRESHOLD_WARN 
LOW_THRESHOLD_CRIT 
LOW_THRESHOLD_FATAL 

Function Documentation

◆ plat_pldm_sensor_get_sensor_count()

int plat_pldm_sensor_get_sensor_count ( int  thread_id)

◆ plat_pldm_sensor_load()

pldm_sensor_info * plat_pldm_sensor_load ( int  thread_id)
Here is the call graph for this function:

◆ plat_pldm_sensor_load_thread()

pldm_sensor_thread * plat_pldm_sensor_load_thread ( )

◆ pldm_polling_sensor_reading()

int pldm_polling_sensor_reading ( pldm_sensor_info pldm_snr_list,
int  pldm_sensor_count,
int  thread_id,
int  sensor_num 
)

◆ pldm_sensor_get_info_via_sensor_thread_and_sensor_pdr_index()

int pldm_sensor_get_info_via_sensor_thread_and_sensor_pdr_index ( int  thread_id,
int  sensor_pdr_index,
uint16_t *  sensor_id,
real32_t resolution,
real32_t offset,
int8_t *  unit_modifier,
real32_t poll_time,
uint32_t *  update_time,
uint8_t *  type,
int *  cache,
uint8_t *  cache_status,
char *  check_access 
)

◆ pldm_sensor_get_reading()

void pldm_sensor_get_reading ( sensor_cfg pldm_sensor_cfg,
uint32_t *  update_time,
int  pldm_sensor_count,
int  thread_id,
int  sensor_num 
)

◆ pldm_sensor_get_reading_from_cache()

uint8_t pldm_sensor_get_reading_from_cache ( uint16_t  sensor_id,
int *  reading,
uint8_t *  sensor_operational_state 
)

◆ pldm_sensor_is_interval_ready()

bool pldm_sensor_is_interval_ready ( pldm_sensor_info pldm_sensor_list)

◆ pldm_sensor_monitor_init()

void pldm_sensor_monitor_init ( )

◆ pldm_sensor_poll_thread_init()

void pldm_sensor_poll_thread_init ( )

◆ pldm_sensor_polling_handler()

void pldm_sensor_polling_handler ( void *  arug0,
void *  arug1,
void *  arug2 
)

◆ pldm_sensor_polling_pre_check()

int pldm_sensor_polling_pre_check ( pldm_sensor_info pldm_snr_list,
int  sensor_num 
)