uavcan.protocol.file.GetDirectoryEntryInfo_res.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. #pragma once
  2. #include <stdbool.h>
  3. #include <stdint.h>
  4. #include <canard.h>
  5. #include <uavcan.protocol.file.EntryType.h>
  6. #include <uavcan.protocol.file.Error.h>
  7. #include <uavcan.protocol.file.Path.h>
  8. #define UAVCAN_PROTOCOL_FILE_GETDIRECTORYENTRYINFO_RESPONSE_MAX_SIZE 204
  9. #define UAVCAN_PROTOCOL_FILE_GETDIRECTORYENTRYINFO_RESPONSE_SIGNATURE (0x8C46E8AB568BDA79ULL)
  10. #define UAVCAN_PROTOCOL_FILE_GETDIRECTORYENTRYINFO_RESPONSE_ID 46
  11. #if defined(__cplusplus) && defined(DRONECAN_CXX_WRAPPERS)
  12. class uavcan_protocol_file_GetDirectoryEntryInfo_cxx_iface;
  13. #endif
  14. struct uavcan_protocol_file_GetDirectoryEntryInfoResponse {
  15. #if defined(__cplusplus) && defined(DRONECAN_CXX_WRAPPERS)
  16. using cxx_iface = uavcan_protocol_file_GetDirectoryEntryInfo_cxx_iface;
  17. #endif
  18. struct uavcan_protocol_file_Error error;
  19. struct uavcan_protocol_file_EntryType entry_type;
  20. struct uavcan_protocol_file_Path entry_full_path;
  21. };
  22. #ifdef __cplusplus
  23. extern "C"
  24. {
  25. #endif
  26. uint32_t _uavcan_protocol_file_GetDirectoryEntryInfoResponse_encode(struct uavcan_protocol_file_GetDirectoryEntryInfoResponse* msg, uint8_t* buffer
  27. #if CANARD_ENABLE_TAO_OPTION
  28. , bool tao
  29. #endif
  30. );
  31. bool _uavcan_protocol_file_GetDirectoryEntryInfoResponse_decode(const CanardRxTransfer* transfer, struct uavcan_protocol_file_GetDirectoryEntryInfoResponse* msg);
  32. static inline uint32_t uavcan_protocol_file_GetDirectoryEntryInfoResponse_encode(struct uavcan_protocol_file_GetDirectoryEntryInfoResponse* msg, uint8_t* buffer
  33. #if CANARD_ENABLE_TAO_OPTION
  34. , bool tao
  35. #endif
  36. ) {
  37. return _uavcan_protocol_file_GetDirectoryEntryInfoResponse_encode(msg, buffer
  38. #if CANARD_ENABLE_TAO_OPTION
  39. , tao
  40. #endif
  41. );
  42. }
  43. static inline bool uavcan_protocol_file_GetDirectoryEntryInfoResponse_decode(const CanardRxTransfer* transfer, struct uavcan_protocol_file_GetDirectoryEntryInfoResponse* msg) {
  44. return _uavcan_protocol_file_GetDirectoryEntryInfoResponse_decode(transfer, msg);
  45. }
  46. #if defined(CANARD_DSDLC_INTERNAL)
  47. static inline void __uavcan_protocol_file_GetDirectoryEntryInfoResponse_encode(uint8_t* buffer, uint32_t* bit_ofs, struct uavcan_protocol_file_GetDirectoryEntryInfoResponse* msg, bool tao);
  48. static inline bool __uavcan_protocol_file_GetDirectoryEntryInfoResponse_decode(const CanardRxTransfer* transfer, uint32_t* bit_ofs, struct uavcan_protocol_file_GetDirectoryEntryInfoResponse* msg, bool tao);
  49. void __uavcan_protocol_file_GetDirectoryEntryInfoResponse_encode(uint8_t* buffer, uint32_t* bit_ofs, struct uavcan_protocol_file_GetDirectoryEntryInfoResponse* msg, bool tao) {
  50. (void)buffer;
  51. (void)bit_ofs;
  52. (void)msg;
  53. (void)tao;
  54. __uavcan_protocol_file_Error_encode(buffer, bit_ofs, &msg->error, false);
  55. __uavcan_protocol_file_EntryType_encode(buffer, bit_ofs, &msg->entry_type, false);
  56. __uavcan_protocol_file_Path_encode(buffer, bit_ofs, &msg->entry_full_path, tao);
  57. }
  58. /*
  59. decode uavcan_protocol_file_GetDirectoryEntryInfoResponse, return true on failure, false on success
  60. */
  61. bool __uavcan_protocol_file_GetDirectoryEntryInfoResponse_decode(const CanardRxTransfer* transfer, uint32_t* bit_ofs, struct uavcan_protocol_file_GetDirectoryEntryInfoResponse* msg, bool tao) {
  62. (void)transfer;
  63. (void)bit_ofs;
  64. (void)msg;
  65. (void)tao;
  66. if (__uavcan_protocol_file_Error_decode(transfer, bit_ofs, &msg->error, false)) {return true;}
  67. if (__uavcan_protocol_file_EntryType_decode(transfer, bit_ofs, &msg->entry_type, false)) {return true;}
  68. if (__uavcan_protocol_file_Path_decode(transfer, bit_ofs, &msg->entry_full_path, tao)) {return true;}
  69. return false; /* success */
  70. }
  71. #endif
  72. #ifdef CANARD_DSDLC_TEST_BUILD
  73. struct uavcan_protocol_file_GetDirectoryEntryInfoResponse sample_uavcan_protocol_file_GetDirectoryEntryInfoResponse_msg(void);
  74. #endif
  75. #ifdef __cplusplus
  76. } // extern "C"
  77. #ifdef DRONECAN_CXX_WRAPPERS
  78. #include <canard/cxx_wrappers.h>
  79. #endif
  80. #endif