You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
787 B

2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
  1. //
  2. // Created by zwsd
  3. //
  4. #pragma once
  5. #include "api/api.hpp"
  6. namespace iflytop {
  7. using namespace zcr;
  8. class IZCanReceiverListener {
  9. public:
  10. virtual void onRceivePacket(zcr_cmd_header_t *rxcmd, uint8_t *data, int32_t len) = 0;
  11. };
  12. class IZCanReceiver {
  13. public:
  14. public:
  15. virtual void registerListener(IZCanReceiverListener *listener) = 0;
  16. virtual int32_t sendBufAck(zcr_cmd_header_t *rx_cmd_header, uint8_t *data, int32_t len) = 0;
  17. virtual int32_t sendAck(zcr_cmd_header_t *rx_cmd_header, int32_t *ackvar, int32_t nack) = 0;
  18. virtual int32_t sendErrorAck(zcr_cmd_header_t *rx_cmd_header, int32_t errorcode) = 0;
  19. virtual int32_t triggerEvent(zcr_cmd_header_t *rx_cmd_header, uint8_t *data, int32_t len) = 0;
  20. };
  21. } // namespace iflytop