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
738 B

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