|
@ -3,8 +3,11 @@ |
|
|
#include <string>
|
|
|
#include <string>
|
|
|
|
|
|
|
|
|
#include "sdk/os/zos.hpp"
|
|
|
#include "sdk/os/zos.hpp"
|
|
|
|
|
|
#include "sdk\components\hardware\uart\zuart_dma_receiver.hpp"
|
|
|
#include "sdk\components\zprotocols\errorcode\errorcode.hpp"
|
|
|
#include "sdk\components\zprotocols\errorcode\errorcode.hpp"
|
|
|
#include "sdk\components\zprotocols\zcancmder_v2\api\api.hpp"
|
|
|
#include "sdk\components\zprotocols\zcancmder_v2\api\api.hpp"
|
|
|
|
|
|
//
|
|
|
|
|
|
#include "sdk\components\api\zi_uart_receiver.hpp"
|
|
|
|
|
|
|
|
|
namespace iflytop { |
|
|
namespace iflytop { |
|
|
using namespace std; |
|
|
using namespace std; |
|
@ -21,9 +24,9 @@ class CmdSchedulerV2 : public ICmdParser { |
|
|
private: |
|
|
private: |
|
|
map<string, CMD> m_cmdMap; |
|
|
map<string, CMD> m_cmdMap; |
|
|
|
|
|
|
|
|
ZUART* m_uart; |
|
|
|
|
|
char* rxbuf; |
|
|
|
|
|
int32_t m_rxsize = 0; |
|
|
|
|
|
|
|
|
ZIUartReceiver* m_uart; |
|
|
|
|
|
char* rxbuf; |
|
|
|
|
|
int32_t m_rxsize = 0; |
|
|
|
|
|
|
|
|
uint32_t m_rxbufsize; |
|
|
uint32_t m_rxbufsize; |
|
|
|
|
|
|
|
@ -32,7 +35,8 @@ class CmdSchedulerV2 : public ICmdParser { |
|
|
char cmdcache[1024] = {0}; |
|
|
char cmdcache[1024] = {0}; |
|
|
|
|
|
|
|
|
public: |
|
|
public: |
|
|
void initialize(UART_HandleTypeDef* huart, uint32_t rxbufsize); |
|
|
|
|
|
|
|
|
void initialize(ZIUartReceiver* receiver); |
|
|
|
|
|
|
|
|
virtual void regCMD(const char* cmdname, const char* helpinfo, int paraNum, ICmdFunction_t cmdimpl) override { registerCmd(cmdname, helpinfo, paraNum, cmdimpl); } |
|
|
virtual void regCMD(const char* cmdname, const char* helpinfo, int paraNum, ICmdFunction_t cmdimpl) override { registerCmd(cmdname, helpinfo, paraNum, cmdimpl); } |
|
|
void registerCmd(const char* cmdname, const char* helpinfo, int paraNum, ICmdFunction_t cmdimpl); |
|
|
void registerCmd(const char* cmdname, const char* helpinfo, int paraNum, ICmdFunction_t cmdimpl); |
|
|
// void tx(const char* data, int len);
|
|
|
// void tx(const char* data, int len);
|
|
|