vkweigher.FuseBreak_req.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. #pragma once
  2. #include <stdbool.h>
  3. #include <stdint.h>
  4. #include <canard.h>
  5. #define VKWEIGHER_FUSEBREAK_REQUEST_MAX_SIZE 1
  6. #define VKWEIGHER_FUSEBREAK_REQUEST_SIGNATURE (0xAB0D626FEAA1A2E0ULL)
  7. #define VKWEIGHER_FUSEBREAK_REQUEST_ID 235
  8. #if defined(__cplusplus) && defined(DRONECAN_CXX_WRAPPERS)
  9. class vkweigher_FuseBreak_cxx_iface;
  10. #endif
  11. struct vkweigher_FuseBreakRequest {
  12. #if defined(__cplusplus) && defined(DRONECAN_CXX_WRAPPERS)
  13. using cxx_iface = vkweigher_FuseBreak_cxx_iface;
  14. #endif
  15. uint8_t break_cmd;
  16. };
  17. #ifdef __cplusplus
  18. extern "C"
  19. {
  20. #endif
  21. uint32_t vkweigher_FuseBreakRequest_encode(struct vkweigher_FuseBreakRequest* msg, uint8_t* buffer
  22. #if CANARD_ENABLE_TAO_OPTION
  23. , bool tao
  24. #endif
  25. );
  26. bool vkweigher_FuseBreakRequest_decode(const CanardRxTransfer* transfer, struct vkweigher_FuseBreakRequest* msg);
  27. #if defined(CANARD_DSDLC_INTERNAL)
  28. static inline void _vkweigher_FuseBreakRequest_encode(uint8_t* buffer, uint32_t* bit_ofs, struct vkweigher_FuseBreakRequest* msg, bool tao);
  29. static inline bool _vkweigher_FuseBreakRequest_decode(const CanardRxTransfer* transfer, uint32_t* bit_ofs, struct vkweigher_FuseBreakRequest* msg, bool tao);
  30. void _vkweigher_FuseBreakRequest_encode(uint8_t* buffer, uint32_t* bit_ofs, struct vkweigher_FuseBreakRequest* msg, bool tao) {
  31. (void)buffer;
  32. (void)bit_ofs;
  33. (void)msg;
  34. (void)tao;
  35. canardEncodeScalar(buffer, *bit_ofs, 8, &msg->break_cmd);
  36. *bit_ofs += 8;
  37. }
  38. /*
  39. decode vkweigher_FuseBreakRequest, return true on failure, false on success
  40. */
  41. bool _vkweigher_FuseBreakRequest_decode(const CanardRxTransfer* transfer, uint32_t* bit_ofs, struct vkweigher_FuseBreakRequest* msg, bool tao) {
  42. (void)transfer;
  43. (void)bit_ofs;
  44. (void)msg;
  45. (void)tao;
  46. canardDecodeScalar(transfer, *bit_ofs, 8, false, &msg->break_cmd);
  47. *bit_ofs += 8;
  48. return false; /* success */
  49. }
  50. #endif
  51. #ifdef CANARD_DSDLC_TEST_BUILD
  52. struct vkweigher_FuseBreakRequest sample_vkweigher_FuseBreakRequest_msg(void);
  53. #endif
  54. #ifdef __cplusplus
  55. } // extern "C"
  56. #ifdef DRONECAN_CXX_WRAPPERS
  57. #include <canard/cxx_wrappers.h>
  58. #endif
  59. #endif