#ifndef _SIZHU_EVENT_RECORD_H #define _SIZHU_EVENT_RECORD_H #include "system_general_para.h" /************************´æ´¢¿Õ¼ä¹æ»®**************************/ /************************´æ´¢¿Õ¼ä¹æ»®**************************/ #pragma pack(1) //·§ÃŲÙ×÷¼Ç¼ typedef struct { u16 serial_number; sClockBCD record_time_BCD; uint8_t valve_action_source; uint8_t valve_action_type; u16 valve_action_id; u16 open_valve_times; u16 close_valve_times; }LOG_SIZHU_VALVE_ACTION_RECORD_SAVE_T; //»Ö¸´³ö³§ÉèÖüǼ typedef struct { u16 serial_number; sClockBCD record_time_BCD; uint8_t modify_source; u16 factory_id; }LOG_SIZHU_FACTORY_RESET_RECORD_SAVE_T; //Уʱ¼Ç¼ //»Ö¸´³ö³§ÉèÖüǼ typedef struct { u16 serial_number; sClockBCD record_time_BCD; //¼Ç¼ʱ¼ä£¬¿ÉÒÔµ±×öУ׼ǰʱ¼ä uint8_t modify_source; u16 factory_id; sClockBCD set_time_BCD; //ÉèÖõÄʱ¼ä£¬Ò²¾ÍÊÇУ׼ºóµÄʱ¼ä }LOG_SIZHU_CALIBRATION_TIME_RECORD_SAVE_T; typedef struct log_event_para_t { LOG_SIZHU_RUN_T valve_action_log; LOG_SIZHU_RUN_T factory_reset_log; LOG_SIZHU_RUN_T calibration_time_log; }LOG_EVENT_PARA_T; #pragma pack() extern LOG_EVENT_PARA_T log_event_para_g; void sizhu_event_log_eeprom_default_init(void); uint8_t sizhu_valve_action_log_eeprom_default_init(void); uint8_t sizhu_factory_reset_log_eeprom_default_init(void); uint8_t sizhu_calibration_time_log_eeprom_default_init(void); void sizhu_event_log_eeprom_only_read_init(void); uint8_t sizhu_valve_action_log_only_read_init(void); uint8_t sizhu_factory_reset_log_only_read_init(void); uint8_t sizhu_calibration_time_log_only_read_init(void); uint8_t sizhu_valve_action_log_save(uint8_t valve_action_source, uint16_t valve_action_type,uint16_t valve_action_ID,uint8_t * para_alarm_ptr); uint8_t sizhu_factory_reset_log_save(uint8_t reset_source, uint16_t factory_id,uint8_t * para_alarm_ptr); uint8_t sizhu_calibration_time_log_save(uint8_t calibration_source,uint16_t factory_id, uint8_t * para_alarm_ptr); void sizhu_valve_action_log_data_handle(uint8_t valve_action_source, uint16_t valve_action_type,uint16_t valve_action_ID); void sizhu_factory_reset_log_data_handle(uint8_t reset_source, uint16_t factory_id); void sizhu_calibration_time_log_data_handle(uint8_t calibration_source,uint16_t factory_id); #endif