#ifndef _UPPER_COMPUTER_READ_LOG_TEMP_H_
|
#define _UPPER_COMPUTER_READ_LOG_TEMP_H_
|
|
#include "define_all.h"
|
#include "administrator.h"
|
|
#define UC_AMEND_LOG_PACK_HEAD_LEN (sizeof(UC_AMEND_LOG_T) - sizeof(UC_AMEND_LOG_UNION_T))
|
|
#define UC_AMEND_LOG_PULSE_PARA_PACK_LEN (sizeof(struct pulse_para) + UC_AMEND_LOG_PACK_HEAD_LEN)
|
#define UC_AMEND_LOG_FLOW_PARA_PACK_LEN (sizeof(struct flow_para) + UC_AMEND_LOG_PACK_HEAD_LEN)
|
#define UC_AMEND_LOG_PRESS_PARA_PACK_LEN (sizeof(struct press_para) + UC_AMEND_LOG_PACK_HEAD_LEN)
|
#define UC_AMEND_LOG_TEMP_PARA_PACK_LEN (sizeof(struct temp_para) + UC_AMEND_LOG_PACK_HEAD_LEN)
|
|
|
#pragma pack(1)
|
|
typedef struct{
|
uint32_t cal_pulse_fator;
|
uint16_t cal_pulse_width;
|
uint8_t flow_type;
|
}PULSE_PARA_T;
|
|
typedef struct{
|
float flow_up;
|
float flow_up_up;
|
float flow_down;
|
float flow_up_up_replace_value;
|
float small_flow_excision_value;
|
}FLOW_PARA_T;
|
|
typedef struct{
|
float press_correction_factor; // 修正系数 也叫斜率
|
float press_intercept; // 修正截距
|
float press_up_valve;
|
float press_up_up_valve;
|
float press_down_valve;
|
float press_down_down_valve;
|
float press_up_scope;
|
float press_down_scope;
|
float press_down_down_replace;
|
}PRESS_PARA_T;
|
|
typedef struct{
|
float temp_correction_factor;
|
float temp_intercept;
|
int16_t temp_up_valve;
|
int16_t temp_up_up_valve;
|
int16_t temp_down_valve;
|
int16_t temp_down_down_valve;
|
int16_t temp_up_scope;
|
int16_t temp_down_scope;
|
int16_t reserve_16;
|
float reserve_f;
|
int16_t cpu_temp_up_scope;
|
int16_t cpu_temp_down_scope;
|
}TEMP_PARA_T;
|
|
typedef union{
|
struct pulse_para{
|
PULSE_PARA_T before;
|
PULSE_PARA_T now;
|
}pulse_para_s;
|
struct flow_para{
|
FLOW_PARA_T before;
|
FLOW_PARA_T now;
|
}flow_para_s;
|
struct press_para{
|
PRESS_PARA_T before;
|
PRESS_PARA_T now;
|
}press_para_s;
|
struct temp_para{
|
TEMP_PARA_T before;
|
TEMP_PARA_T now;
|
}temp_para_s;
|
|
}UC_AMEND_LOG_UNION_T;
|
|
typedef struct{
|
uint8_t record_num;
|
uint8_t mender;
|
uint8_t record_time[6];
|
uint8_t amend_id;
|
UC_AMEND_LOG_UNION_T uc_amend_data;
|
}UC_AMEND_LOG_T;
|
|
#define UC_ALARM_DATA_LOG_PACK_LEN sizeof(UC_ALARM_DATA_LOG_T)
|
typedef struct{
|
uint16_t record_num;
|
uint8_t record_time[6];
|
uint16_t alarm_id;
|
double forward_cumulate_sc; // 正向标况累积量
|
double forward_cumulate_wc;
|
double reverse_cumulate_sc; // 反向标况累积量
|
double reverse_cumulate_wc;
|
float instant_sc;
|
float instant_wc;
|
float temperature;
|
float pressure;
|
float cpu_temperature; // 环境温度
|
uint8_t lith_vcc;
|
uint8_t alka_vcc;
|
uint16_t status_bytes[SYS_STATUS_BYTES_TYPE_LENGTH >> 1];
|
}UC_ALARM_DATA_LOG_T;
|
|
typedef struct
|
{
|
uint8_t record_time[6];
|
double forward_cumulate_sc;
|
double forward_cumulate_wc;
|
double reverse_cumulate_sc;
|
double reverse_cumulate_wc;
|
float instant_sc;
|
float temperature;
|
float pressure;
|
} SYS_UPCOMPUTER_SYSLOG_FORMAT_T; //50bytes
|
|
|
|
|
|
#pragma pack()
|
|
|
#endif
|