dev(UML-1462): Передача в обход eth_stack через tx_flow

This commit is contained in:
algin 2023-06-29 13:06:59 +03:00
parent 892b8dfe12
commit f6ba839cfd
2 changed files with 4 additions and 1 deletions

View File

@ -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");

View File

@ -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_;