decode_result.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. // // ******************************************************************
  2. // // /\ /| @File decode_result.h
  3. // // \ V/ @Brief
  4. // // | "") @Author lijinwen, ghz005@uni-trend.com.cn
  5. // // / | @Creation 2024-05-16
  6. // // / \\ @Modified 2024-06-24
  7. // // *(__\_\
  8. // // ******************************************************************
  9. #pragma once
  10. #include <cstdint>
  11. #include <vector>
  12. //#include "Channels.h"
  13. #include "BaseEnums/protocol_enums.h"
  14. namespace Protocol
  15. {
  16. struct DecodeResultCell
  17. {
  18. int64_t start_index = -1; //结果时域起始帧
  19. int64_t length = -1; //结果时域帧长度
  20. uint8_t* data = {}; //结果数据数组
  21. int64_t data_count; //数据数组长度
  22. bool is_event_info = false; //是否是事件帧
  23. };
  24. struct DecodeResult
  25. {
  26. //协议类型
  27. //virtual SerialProtocolType GetProtocolType();
  28. SerialProtocolType protocol_type;
  29. //结果有效
  30. bool result_valid = false;
  31. //结果数据 子协议实现扩展
  32. void* result_data_ptr;
  33. };
  34. }