Closed jamwaffles closed 2 months ago
Also fixes a subtle bug when freeing up frames for reuse. I believe this bug is only caused when a multi-PDU frame is sent with n PDUs where n is a multiple of the PDU storage size.
Tested on my local test bench with 16 devices. Also tested by another user on a much larger network which also works fine with this change.
This makes the state check 16x more efficient by sending a single EtherCAT frame with state requests for (up to) 16 SubDevices in the group.
It would be great if the chunk size could be computed based on the PDU size specified by the user, but Rust isn't there yet. A chunk size of 16 was chosen quite arbitrarily as a balance between allowing small PDU sizes but more efficient state checks.