// // ****************************************************************** // // /\ /| @File rs232_packet.h // // \ V/ @Brief // // | "") @Author lijinwen, ghz005@uni-trend.com.cn // // / | @Creation 2024-06-26 // // / \\ @Modified 2024-07-16 // // *(__\_\ // // ****************************************************************** #pragma once #include #include "protocol_rs232_enums.h" namespace Protocol { //内部使用数据结构 数据帧 struct Rs232Packet { bool start_bit; //起始位 bool parity_bit; //校验位数据 High or Low bool parity_find; //是否存在校验位 bool parity_result; //校验结果 有效 or 无效 uint8_t data; //解码数据 int32_t data_index; //数据开始帧序号 int32_t parity_index; //校准开始帧序号 int32_t start_index; //数据开始序号 double per_bit_length; //单字节数据时域占比长度 }; }