tx01_data_frame.hpp 539 B

123456789101112131415161718192021222324252627
  1. #ifndef _DATA_FRAME_HPP_
  2. #define _DATA_FRAME_HPP_
  3. #include <boost/endian/arithmetic.hpp>
  4. #if __cplusplus < 201103L
  5. #include <boost/static_assert.hpp>
  6. #define static_assert BOOST_STATIC_ASSERT
  7. #endif
  8. typedef boost::endian::big_uint16_t tx01_data_frame_magic_t;
  9. const size_t size_data_frame_content = 125;
  10. struct tx01_data_frame
  11. {
  12. tx01_data_frame_magic_t magic;
  13. uint8_t channel_id;
  14. char data[size_data_frame_content];
  15. };
  16. static_assert(sizeof(struct tx01_data_frame) == 128);
  17. #ifdef static_assert
  18. #undef static_assert
  19. #endif
  20. #endif