uavcan.protocol.file.GetInfo_req.h 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. #pragma once
  2. #include <stdbool.h>
  3. #include <stdint.h>
  4. #include <canard.h>
  5. #include <uavcan.protocol.file.Path.h>
  6. #define UAVCAN_PROTOCOL_FILE_GETINFO_REQUEST_MAX_SIZE 201
  7. #define UAVCAN_PROTOCOL_FILE_GETINFO_REQUEST_SIGNATURE (0x5004891EE8A27531ULL)
  8. #define UAVCAN_PROTOCOL_FILE_GETINFO_REQUEST_ID 45
  9. #if defined(__cplusplus) && defined(DRONECAN_CXX_WRAPPERS)
  10. class uavcan_protocol_file_GetInfo_cxx_iface;
  11. #endif
  12. struct uavcan_protocol_file_GetInfoRequest {
  13. #if defined(__cplusplus) && defined(DRONECAN_CXX_WRAPPERS)
  14. using cxx_iface = uavcan_protocol_file_GetInfo_cxx_iface;
  15. #endif
  16. struct uavcan_protocol_file_Path path;
  17. };
  18. #ifdef __cplusplus
  19. extern "C"
  20. {
  21. #endif
  22. uint32_t _uavcan_protocol_file_GetInfoRequest_encode(struct uavcan_protocol_file_GetInfoRequest* msg, uint8_t* buffer
  23. #if CANARD_ENABLE_TAO_OPTION
  24. , bool tao
  25. #endif
  26. );
  27. bool _uavcan_protocol_file_GetInfoRequest_decode(const CanardRxTransfer* transfer, struct uavcan_protocol_file_GetInfoRequest* msg);
  28. static inline uint32_t uavcan_protocol_file_GetInfoRequest_encode(struct uavcan_protocol_file_GetInfoRequest* msg, uint8_t* buffer
  29. #if CANARD_ENABLE_TAO_OPTION
  30. , bool tao
  31. #endif
  32. ) {
  33. return _uavcan_protocol_file_GetInfoRequest_encode(msg, buffer
  34. #if CANARD_ENABLE_TAO_OPTION
  35. , tao
  36. #endif
  37. );
  38. }
  39. static inline bool uavcan_protocol_file_GetInfoRequest_decode(const CanardRxTransfer* transfer, struct uavcan_protocol_file_GetInfoRequest* msg) {
  40. return _uavcan_protocol_file_GetInfoRequest_decode(transfer, msg);
  41. }
  42. #if defined(CANARD_DSDLC_INTERNAL)
  43. static inline void __uavcan_protocol_file_GetInfoRequest_encode(uint8_t* buffer, uint32_t* bit_ofs, struct uavcan_protocol_file_GetInfoRequest* msg, bool tao);
  44. static inline bool __uavcan_protocol_file_GetInfoRequest_decode(const CanardRxTransfer* transfer, uint32_t* bit_ofs, struct uavcan_protocol_file_GetInfoRequest* msg, bool tao);
  45. void __uavcan_protocol_file_GetInfoRequest_encode(uint8_t* buffer, uint32_t* bit_ofs, struct uavcan_protocol_file_GetInfoRequest* msg, bool tao) {
  46. (void)buffer;
  47. (void)bit_ofs;
  48. (void)msg;
  49. (void)tao;
  50. __uavcan_protocol_file_Path_encode(buffer, bit_ofs, &msg->path, tao);
  51. }
  52. /*
  53. decode uavcan_protocol_file_GetInfoRequest, return true on failure, false on success
  54. */
  55. bool __uavcan_protocol_file_GetInfoRequest_decode(const CanardRxTransfer* transfer, uint32_t* bit_ofs, struct uavcan_protocol_file_GetInfoRequest* msg, bool tao) {
  56. (void)transfer;
  57. (void)bit_ofs;
  58. (void)msg;
  59. (void)tao;
  60. if (__uavcan_protocol_file_Path_decode(transfer, bit_ofs, &msg->path, tao)) {return true;}
  61. return false; /* success */
  62. }
  63. #endif
  64. #ifdef CANARD_DSDLC_TEST_BUILD
  65. struct uavcan_protocol_file_GetInfoRequest sample_uavcan_protocol_file_GetInfoRequest_msg(void);
  66. #endif
  67. #ifdef __cplusplus
  68. } // extern "C"
  69. #ifdef DRONECAN_CXX_WRAPPERS
  70. #include <canard/cxx_wrappers.h>
  71. #endif
  72. #endif