uavcan.protocol.GetNodeInfo_req.h 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. #pragma once
  2. #include <stdbool.h>
  3. #include <stdint.h>
  4. #include <canard.h>
  5. #define UAVCAN_PROTOCOL_GETNODEINFO_REQUEST_MAX_SIZE 0
  6. #define UAVCAN_PROTOCOL_GETNODEINFO_REQUEST_SIGNATURE (0xEE468A8121C46A9EULL)
  7. #define UAVCAN_PROTOCOL_GETNODEINFO_REQUEST_ID 1
  8. #if defined(__cplusplus) && defined(DRONECAN_CXX_WRAPPERS)
  9. class uavcan_protocol_GetNodeInfo_cxx_iface;
  10. #endif
  11. struct uavcan_protocol_GetNodeInfoRequest {
  12. #if defined(__cplusplus) && defined(DRONECAN_CXX_WRAPPERS)
  13. using cxx_iface = uavcan_protocol_GetNodeInfo_cxx_iface;
  14. #endif
  15. };
  16. #ifdef __cplusplus
  17. extern "C"
  18. {
  19. #endif
  20. uint32_t _uavcan_protocol_GetNodeInfoRequest_encode(struct uavcan_protocol_GetNodeInfoRequest* msg, uint8_t* buffer
  21. #if CANARD_ENABLE_TAO_OPTION
  22. , bool tao
  23. #endif
  24. );
  25. bool _uavcan_protocol_GetNodeInfoRequest_decode(const CanardRxTransfer* transfer, struct uavcan_protocol_GetNodeInfoRequest* msg);
  26. static inline uint32_t uavcan_protocol_GetNodeInfoRequest_encode(struct uavcan_protocol_GetNodeInfoRequest* msg, uint8_t* buffer
  27. #if CANARD_ENABLE_TAO_OPTION
  28. , bool tao
  29. #endif
  30. ) {
  31. (void)msg;
  32. (void)buffer;
  33. #if CANARD_ENABLE_TAO_OPTION
  34. (void)tao;
  35. #endif
  36. return 0; // 0-length message encodes to 0 bytes
  37. }
  38. static inline bool uavcan_protocol_GetNodeInfoRequest_decode(const CanardRxTransfer* transfer, struct uavcan_protocol_GetNodeInfoRequest* msg) {
  39. (void)msg;
  40. // all transports accurately convey a payload length of 0 bytes so any payload is an error
  41. return transfer->payload_len != 0;
  42. }
  43. #if defined(CANARD_DSDLC_INTERNAL)
  44. static inline void __uavcan_protocol_GetNodeInfoRequest_encode(uint8_t* buffer, uint32_t* bit_ofs, struct uavcan_protocol_GetNodeInfoRequest* msg, bool tao);
  45. static inline bool __uavcan_protocol_GetNodeInfoRequest_decode(const CanardRxTransfer* transfer, uint32_t* bit_ofs, struct uavcan_protocol_GetNodeInfoRequest* msg, bool tao);
  46. void __uavcan_protocol_GetNodeInfoRequest_encode(uint8_t* buffer, uint32_t* bit_ofs, struct uavcan_protocol_GetNodeInfoRequest* msg, bool tao) {
  47. (void)buffer;
  48. (void)bit_ofs;
  49. (void)msg;
  50. (void)tao;
  51. }
  52. /*
  53. decode uavcan_protocol_GetNodeInfoRequest, return true on failure, false on success
  54. */
  55. bool __uavcan_protocol_GetNodeInfoRequest_decode(const CanardRxTransfer* transfer, uint32_t* bit_ofs, struct uavcan_protocol_GetNodeInfoRequest* msg, bool tao) {
  56. (void)transfer;
  57. (void)bit_ofs;
  58. (void)msg;
  59. (void)tao;
  60. return false; /* success */
  61. }
  62. #endif
  63. #ifdef CANARD_DSDLC_TEST_BUILD
  64. struct uavcan_protocol_GetNodeInfoRequest sample_uavcan_protocol_GetNodeInfoRequest_msg(void);
  65. #endif
  66. #ifdef __cplusplus
  67. } // extern "C"
  68. #ifdef DRONECAN_CXX_WRAPPERS
  69. #include <canard/cxx_wrappers.h>
  70. #endif
  71. #endif