| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138 |
- #pragma once
- #include <stdbool.h>
- #include <stdint.h>
- #include <canard.h>
- #define VKWEIGHER_VERSION_REQUEST_MAX_SIZE 5
- #define VKWEIGHER_VERSION_REQUEST_SIGNATURE (0xE51B5A9BD0C35CCCULL)
- #define VKWEIGHER_VERSION_REQUEST_ID 233
- #if defined(__cplusplus) && defined(DRONECAN_CXX_WRAPPERS)
- class vkweigher_Version_cxx_iface;
- #endif
- struct vkweigher_VersionRequest {
- #if defined(__cplusplus) && defined(DRONECAN_CXX_WRAPPERS)
- using cxx_iface = vkweigher_Version_cxx_iface;
- #endif
- uint8_t cmd;
- uint32_t SN_num;
- };
- #ifdef __cplusplus
- extern "C"
- {
- #endif
- uint32_t vkweigher_VersionRequest_encode(struct vkweigher_VersionRequest* msg, uint8_t* buffer
- #if CANARD_ENABLE_TAO_OPTION
- , bool tao
- #endif
- );
- bool vkweigher_VersionRequest_decode(const CanardRxTransfer* transfer, struct vkweigher_VersionRequest* msg);
- #if defined(CANARD_DSDLC_INTERNAL)
- static inline void _vkweigher_VersionRequest_encode(uint8_t* buffer, uint32_t* bit_ofs, struct vkweigher_VersionRequest* msg, bool tao);
- static inline bool _vkweigher_VersionRequest_decode(const CanardRxTransfer* transfer, uint32_t* bit_ofs, struct vkweigher_VersionRequest* msg, bool tao);
- void _vkweigher_VersionRequest_encode(uint8_t* buffer, uint32_t* bit_ofs, struct vkweigher_VersionRequest* msg, bool tao) {
- (void)buffer;
- (void)bit_ofs;
- (void)msg;
- (void)tao;
- canardEncodeScalar(buffer, *bit_ofs, 8, &msg->cmd);
- *bit_ofs += 8;
- canardEncodeScalar(buffer, *bit_ofs, 32, &msg->SN_num);
- *bit_ofs += 32;
- }
- /*
- decode vkweigher_VersionRequest, return true on failure, false on success
- */
- bool _vkweigher_VersionRequest_decode(const CanardRxTransfer* transfer, uint32_t* bit_ofs, struct vkweigher_VersionRequest* msg, bool tao) {
- (void)transfer;
- (void)bit_ofs;
- (void)msg;
- (void)tao;
- canardDecodeScalar(transfer, *bit_ofs, 8, false, &msg->cmd);
- *bit_ofs += 8;
- canardDecodeScalar(transfer, *bit_ofs, 32, false, &msg->SN_num);
- *bit_ofs += 32;
- return false; /* success */
- }
- #endif
- #ifdef CANARD_DSDLC_TEST_BUILD
- struct vkweigher_VersionRequest sample_vkweigher_VersionRequest_msg(void);
- #endif
- #ifdef __cplusplus
- } // extern "C"
- #ifdef DRONECAN_CXX_WRAPPERS
- #include <canard/cxx_wrappers.h>
- #endif
- #endif
|