UsbDecodeResult.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // // ******************************************************************
  2. // // /\ /| @File UsbDecodeResult.h
  3. // // \ V/ @Brief
  4. // // | "") @Author lijinwen, ghz005@uni-trend.com.cn
  5. // // / | @Creation 2024-1-4
  6. // // / \\ @Modified 2024-1-15
  7. // // *(__\_\
  8. // // ******************************************************************
  9. #pragma once
  10. #include <utility>
  11. #include "ProtocolUSBEnums.h"
  12. #include "../DecodeResult.h"
  13. #include "USBPacket.h"
  14. #include "../DecodeEvent.h"
  15. namespace Protocol
  16. {
  17. class UsbDecodeResultCell : Protocol::DecodeResultCell
  18. {
  19. public:
  20. USBPacket GetUsbPacket() { return usbPacket; }
  21. UsbDecodeResultCell(USBPacket packet)
  22. {
  23. usbPacket = std::move(packet);
  24. }
  25. private:
  26. USBPacket usbPacket;
  27. };
  28. struct UsbDecodeResult : Protocol::DecodeResult
  29. {
  30. void Add(const UsbDecodeResultCell* cell);
  31. std::vector<UsbDecodeResultCell> DecodeResultCells;
  32. //std::vector<UsbDecodeEvent> DecodeEventCells; //TODO
  33. };
  34. }