dev(UML-1462): Передача в обход eth_stack через tx_flow
This commit is contained in:
parent
892b8dfe12
commit
f6ba839cfd
@ -97,7 +97,8 @@ uint8_t* EcatTelegram::unpack(uint8_t *raw) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void EcatTelegram::transfer() {
|
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) {
|
if(stat == false) {
|
||||||
DebugP_log((char*)"telegram transfer error !\r\n");
|
DebugP_log((char*)"telegram transfer error !\r\n");
|
||||||
|
|||||||
@ -20,6 +20,7 @@ class EcatTelegram : public Handler {
|
|||||||
public:
|
public:
|
||||||
EcatTelegram(Eth& eth)
|
EcatTelegram(Eth& eth)
|
||||||
: eth_{eth}
|
: eth_{eth}
|
||||||
|
, tx_flow_{*eth.getTxFlowPtr()}
|
||||||
, eth_stack_{*eth.getEthStackPtr()} { }
|
, eth_stack_{*eth.getEthStackPtr()} { }
|
||||||
|
|
||||||
virtual int32_t Process(uint8_t *p_data, uint32_t len) override;
|
virtual int32_t Process(uint8_t *p_data, uint32_t len) override;
|
||||||
@ -35,6 +36,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
Eth& eth_;
|
Eth& eth_;
|
||||||
|
EthTxFlowIface& tx_flow_;
|
||||||
EthStackIface& eth_stack_;
|
EthStackIface& eth_stack_;
|
||||||
TEthMacPorts port_id_;
|
TEthMacPorts port_id_;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user