12345678910111213141516171819202122232425262728293031323334 |
- // // ******************************************************************
- // // /\ /| @File RS232Packet.h
- // // \ V/ @Brief
- // // | "") @Author lijinwen, ghz005@uni-trend.com.cn
- // // / | @Creation 2024-05-16
- // // / \\ @Modified 2024-05-16
- // // *(__\_\
- // // ******************************************************************
- #pragma once
- #include <cstdint>
- #include "ProtocolRS232Enums.h"
- namespace Protocol
- {
- //内部使用数据结构 数据帧
- struct RS232Packet
- {
- bool StartBit; //起始位
- bool ParityBit; //校验位数据 High or Low
- bool ParityFind; //是否存在校验位
- bool ParityResult; //校验结果 有效 or 无效
- uint8_t Data; //解码数据
- int32_t DataIndex; //数据开始帧序号
- int32_t ParityIndex; //校准开始帧序号
- int32_t StartIndex; //数据开始序号
- double PerBitLenght; //单字节数据时域占比长度
- //virtual Enums::RS232DecodePacketType GetPacketType();
- //virtual ~RS232Packet() = default;
- };
- }
|