2
0

MercuryResponse.h 590 B

123456789101112131415161718192021222324252627282930
  1. #ifndef MERCURYRESPONSE_H
  2. #define MERCURYRESPONSE_H
  3. #include <map>
  4. #include <string>
  5. #include <functional>
  6. #include <vector>
  7. #include <NanoPBHelper.h>
  8. #include "protobuf/mercury.pb.h"
  9. #include "Utils.h"
  10. typedef std::vector<std::vector<uint8_t>> mercuryParts;
  11. class MercuryResponse
  12. {
  13. private:
  14. void parseResponse(std::vector<uint8_t> &data);
  15. std::vector<uint8_t> data;
  16. public:
  17. MercuryResponse(std::vector<uint8_t> &data);
  18. ~MercuryResponse();
  19. void decodeHeader();
  20. Header mercuryHeader;
  21. uint8_t flags;
  22. mercuryParts parts;
  23. uint64_t sequenceId;
  24. };
  25. #endif