bool isPositionCountedUp(uint8_t command)
Whether every slave counts command's position up as the frame passes.
Definition ethercat_frame.cc:26
bool isLogicalCommand(uint8_t command)
Whether command addresses the process image: LRD, LWR or LRW.
Definition ethercat_frame.cc:21
constexpr uint16_t kEtherCatEtherType
The Ethernet type of an EtherCAT frame.
Definition ethercat_frame.h:14
std::optional< EtherCatFrame > parseEtherCatFrame(std::span< const uint8_t > bytes)
Reads one Ethernet frame that carries EtherCAT datagrams.
Definition ethercat_frame.cc:43
std::size_t bytes
Definition spoe_connection.cc:24
The header of one datagram in a frame, without its data.
Definition ethercat_frame.h:17
uint8_t command
ETG.1000.4 command: 1 APRD, 4 FPRD, 10 LRD, 12 LRW, and so on.
Definition ethercat_frame.h:18
uint16_t ado
Address offset, or the low half of a logical address.
Definition ethercat_frame.h:21
uint16_t length
Bytes of data in the datagram.
Definition ethercat_frame.h:22
bool more
Another datagram follows in the same frame.
Definition ethercat_frame.h:23
uint16_t adp
Address position, or the high half of a logical address.
Definition ethercat_frame.h:20
uint8_t index
The master's index, which is how it pairs a return with a send.
Definition ethercat_frame.h:19
uint16_t wkc
The working counter after the data.
Definition ethercat_frame.h:24
One EtherCAT frame.
Definition ethercat_frame.h:28
std::vector< Datagram > datagrams
In wire order. Never empty.
Definition ethercat_frame.h:34
bool fromMaster
Definition ethercat_frame.h:33