#ifndef __APP_HART_H__ #define __APP_HART_H__ #include "lib.h" // 这里的结构体不能使用1字节对齐,让其自动对齐 typedef struct { float32 input_current; // 输入电流 uint16_t valve_feedback; // 阀位反馈 uint16_t atmospheric_pressure_source; // 气压源压力 uint16_t pressure_at_port_a; // A口压力 uint16_t pressure_at_port_b; // B口压力 uint16_t amplifier_circuit; // 放大器回路 float32 built_in_temperature; // 内置温度 uint16_t ip_output_detection; // IP输出检测 float32 valve_percentage; // 阀位百分比 } app_analog_quantity_t; // 模拟量 typedef struct { float32 input_current; // 输入电流 uint16_t valve_feedback; // 阀位反馈 uint16_t atmospheric_pressure_source; // 气压源压力 uint16_t pressure_at_port_a; // A口压力 uint16_t pressure_at_port_b; // B口压力 uint16_t amplifier_circuit; // 放大器回路 float32 built_in_temperature; // 内置温度 uint16_t ip_output_detection; // IP输出检测 float32 target_row; // 目标行程 float32 current_row; // 当前行程 float32 friction; // 摩擦力 float32 spring_force; // 弹簧力 } app_digital_quantity_t; // 数字量 typedef struct { app_analog_quantity_t analog_quantity; app_digital_quantity_t digital_quantity; } app_dynamics_t; // 动态量 #endif // __APP_HART_H__