OpenBIC
OpenSource Bridge-IC
plat_log.c File Reference
#include <kernel.h>
#include <stdlib.h>
#include "plat_log.h"
#include "modbus_server.h"
#include <logging/log.h>
#include <libutil.h>
#include "plat_modbus.h"
#include "plat_util.h"
#include "plat_pwm.h"
#include "plat_sensor_table.h"
#include "fru.h"
#include "plat_fru.h"
Include dependency graph for plat_log.c:

Macros

#define LOG_MAX_INDEX   0x0FFF
 
#define LOG_MAX_NUM   30
 
#define AALC_FRU_LOG_START   0x4000
 
#define AALC_FRU_LOG_SIZE    (LOG_MAX_NUM * sizeof(modbus_err_log_mapping))
 

Functions

 LOG_MODULE_REGISTER (plat_log)
 
uint16_t error_log_count (void)
 
void log_transfer_to_modbus_data (uint16_t *modbus_data, uint8_t cmd_size, uint16_t order)
 
void modbus_clear_log ()
 
uint32_t get_uptime_secs (void)
 
void error_log_event (uint8_t sensor_num, bool val_normal)
 
void init_load_eeprom_log (void)
 

Variables

const err_sensor_mapping sensor_err_codes []
 
const err_sensor_mapping sensor_normal_codes []
 

Macro Definition Documentation

◆ AALC_FRU_LOG_SIZE

#define AALC_FRU_LOG_SIZE    (LOG_MAX_NUM * sizeof(modbus_err_log_mapping))

◆ AALC_FRU_LOG_START

#define AALC_FRU_LOG_START   0x4000

◆ LOG_MAX_INDEX

#define LOG_MAX_INDEX   0x0FFF

◆ LOG_MAX_NUM

#define LOG_MAX_NUM   30

Function Documentation

◆ error_log_count()

uint16_t error_log_count ( void  )

◆ error_log_event()

void error_log_event ( uint8_t  sensor_num,
bool  val_normal 
)

◆ get_uptime_secs()

uint32_t get_uptime_secs ( void  )

◆ init_load_eeprom_log()

void init_load_eeprom_log ( void  )

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( plat_log  )

◆ log_transfer_to_modbus_data()

void log_transfer_to_modbus_data ( uint16_t *  modbus_data,
uint8_t  cmd_size,
uint16_t  order 
)

◆ modbus_clear_log()

void modbus_clear_log ( )

Variable Documentation

◆ sensor_err_codes

const err_sensor_mapping sensor_err_codes[]

◆ sensor_normal_codes

const err_sensor_mapping sensor_normal_codes[]
Initial value:
= {
}
@ PUMP_2_SPEED_RECOVER
Definition: plat_log.h:58
@ PUMP_1_SPEED_RECOVER
Definition: plat_log.h:57
@ PUMP_3_SPEED_RECOVER
Definition: plat_log.h:59
#define SENSOR_NUM_PB_1_PUMP_TACH_RPM
Definition: plat_sensor_table.h:162
#define SENSOR_NUM_PB_3_PUMP_TACH_RPM
Definition: plat_sensor_table.h:168
#define SENSOR_NUM_PB_2_PUMP_TACH_RPM
Definition: plat_sensor_table.h:165