From f6ba839cfd583a2ceb49003bcbe8fee05a83959f Mon Sep 17 00:00:00 2001 From: algin Date: Thu, 29 Jun 2023 13:06:59 +0300 Subject: [PATCH] =?UTF-8?q?dev(UML-1462):=20=D0=9F=D0=B5=D1=80=D0=B5=D0=B4?= =?UTF-8?q?=D0=B0=D1=87=D0=B0=20=D0=B2=20=D0=BE=D0=B1=D1=85=D0=BE=D0=B4=20?= =?UTF-8?q?eth=5Fstack=20=D1=87=D0=B5=D1=80=D0=B5=D0=B7=20tx=5Fflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/free_rtos/ethernet_industry/eth_ecat_telegram.cpp | 3 ++- components/free_rtos/ethernet_industry/eth_ecat_telegram.hpp | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/components/free_rtos/ethernet_industry/eth_ecat_telegram.cpp b/components/free_rtos/ethernet_industry/eth_ecat_telegram.cpp index 48fd35b..843891e 100644 --- a/components/free_rtos/ethernet_industry/eth_ecat_telegram.cpp +++ b/components/free_rtos/ethernet_industry/eth_ecat_telegram.cpp @@ -97,7 +97,8 @@ uint8_t* EcatTelegram::unpack(uint8_t *raw) { } void EcatTelegram::transfer() { - bool stat = eth_stack_.send_pkt(port_id_, ETH_PROT_ECAT_LE, 1); + //bool stat = eth_stack_.send_pkt(port_id_, ETH_PROT_ECAT_LE, 1); + bool stat = tx_flow_.send(port_id_, this, 1); if(stat == false) { DebugP_log((char*)"telegram transfer error !\r\n"); diff --git a/components/free_rtos/ethernet_industry/eth_ecat_telegram.hpp b/components/free_rtos/ethernet_industry/eth_ecat_telegram.hpp index 1ecf80f..319591c 100644 --- a/components/free_rtos/ethernet_industry/eth_ecat_telegram.hpp +++ b/components/free_rtos/ethernet_industry/eth_ecat_telegram.hpp @@ -20,6 +20,7 @@ class EcatTelegram : public Handler { public: EcatTelegram(Eth& eth) : eth_{eth} + , tx_flow_{*eth.getTxFlowPtr()} , eth_stack_{*eth.getEthStackPtr()} { } virtual int32_t Process(uint8_t *p_data, uint32_t len) override; @@ -35,6 +36,7 @@ public: private: Eth& eth_; + EthTxFlowIface& tx_flow_; EthStackIface& eth_stack_; TEthMacPorts port_id_;