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.

25 lines
821 B

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 "errorcode.hpp"
  6. #include "packet_interface.hpp"
  7. namespace iflytop {
  8. using namespace zcr;
  9. class IZCanReceiverListener {
  10. public:
  11. virtual void onRceivePacket(zcr_cmd_header_t *rxcmd, uint8_t *data, int32_t len) = 0;
  12. };
  13. class IZCanReceiver {
  14. public:
  15. public:
  16. virtual void registerListener(IZCanReceiverListener *listener) = 0;
  17. virtual int32_t sendBufAck(zcr_cmd_header_t *rx_cmd_header, uint8_t *data, int32_t len) = 0;
  18. virtual int32_t sendAck(zcr_cmd_header_t *rx_cmd_header, int32_t *ackvar, int32_t nack) = 0;
  19. virtual int32_t sendErrorAck(zcr_cmd_header_t *rx_cmd_header, int32_t errorcode) = 0;
  20. virtual int32_t triggerEvent(zcr_cmd_header_t *rx_cmd_header, uint8_t *data, int32_t len) = 0;
  21. };
  22. } // namespace iflytop