uavcan.protocol.RestartNode_res.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. #pragma once
  2. #include <stdbool.h>
  3. #include <stdint.h>
  4. #include <canard.h>
  5. #define UAVCAN_PROTOCOL_RESTARTNODE_RESPONSE_MAX_SIZE 1
  6. #define UAVCAN_PROTOCOL_RESTARTNODE_RESPONSE_SIGNATURE (0x569E05394A3017F0ULL)
  7. #define UAVCAN_PROTOCOL_RESTARTNODE_RESPONSE_ID 5
  8. #if defined(__cplusplus) && defined(DRONECAN_CXX_WRAPPERS)
  9. class uavcan_protocol_RestartNode_cxx_iface;
  10. #endif
  11. struct uavcan_protocol_RestartNodeResponse {
  12. #if defined(__cplusplus) && defined(DRONECAN_CXX_WRAPPERS)
  13. using cxx_iface = uavcan_protocol_RestartNode_cxx_iface;
  14. #endif
  15. bool ok;
  16. };
  17. #ifdef __cplusplus
  18. extern "C"
  19. {
  20. #endif
  21. uint32_t _uavcan_protocol_RestartNodeResponse_encode(struct uavcan_protocol_RestartNodeResponse* msg, uint8_t* buffer
  22. #if CANARD_ENABLE_TAO_OPTION
  23. , bool tao
  24. #endif
  25. );
  26. bool _uavcan_protocol_RestartNodeResponse_decode(const CanardRxTransfer* transfer, struct uavcan_protocol_RestartNodeResponse* msg);
  27. static inline uint32_t uavcan_protocol_RestartNodeResponse_encode(struct uavcan_protocol_RestartNodeResponse* msg, uint8_t* buffer
  28. #if CANARD_ENABLE_TAO_OPTION
  29. , bool tao
  30. #endif
  31. ) {
  32. return _uavcan_protocol_RestartNodeResponse_encode(msg, buffer
  33. #if CANARD_ENABLE_TAO_OPTION
  34. , tao
  35. #endif
  36. );
  37. }
  38. static inline bool uavcan_protocol_RestartNodeResponse_decode(const CanardRxTransfer* transfer, struct uavcan_protocol_RestartNodeResponse* msg) {
  39. return _uavcan_protocol_RestartNodeResponse_decode(transfer, msg);
  40. }
  41. #if defined(CANARD_DSDLC_INTERNAL)
  42. static inline void __uavcan_protocol_RestartNodeResponse_encode(uint8_t* buffer, uint32_t* bit_ofs, struct uavcan_protocol_RestartNodeResponse* msg, bool tao);
  43. static inline bool __uavcan_protocol_RestartNodeResponse_decode(const CanardRxTransfer* transfer, uint32_t* bit_ofs, struct uavcan_protocol_RestartNodeResponse* msg, bool tao);
  44. void __uavcan_protocol_RestartNodeResponse_encode(uint8_t* buffer, uint32_t* bit_ofs, struct uavcan_protocol_RestartNodeResponse* msg, bool tao) {
  45. (void)buffer;
  46. (void)bit_ofs;
  47. (void)msg;
  48. (void)tao;
  49. canardEncodeScalar(buffer, *bit_ofs, 1, &msg->ok);
  50. *bit_ofs += 1;
  51. }
  52. /*
  53. decode uavcan_protocol_RestartNodeResponse, return true on failure, false on success
  54. */
  55. bool __uavcan_protocol_RestartNodeResponse_decode(const CanardRxTransfer* transfer, uint32_t* bit_ofs, struct uavcan_protocol_RestartNodeResponse* msg, bool tao) {
  56. (void)transfer;
  57. (void)bit_ofs;
  58. (void)msg;
  59. (void)tao;
  60. canardDecodeScalar(transfer, *bit_ofs, 1, false, &msg->ok);
  61. *bit_ofs += 1;
  62. return false; /* success */
  63. }
  64. #endif
  65. #ifdef CANARD_DSDLC_TEST_BUILD
  66. struct uavcan_protocol_RestartNodeResponse sample_uavcan_protocol_RestartNodeResponse_msg(void);
  67. #endif
  68. #ifdef __cplusplus
  69. } // extern "C"
  70. #ifdef DRONECAN_CXX_WRAPPERS
  71. #include <canard/cxx_wrappers.h>
  72. #endif
  73. #endif