13#include <unordered_map>
24 static constexpr size_t ethernetFrameMaxLength = 1518;
29 static constexpr size_t ethernetHeaderSize = 14;
36 static constexpr size_t maxTotalPDULength =
37 ethernetFrameMaxLength - ethernetHeaderSize -
sizeof(uint16_t) -
sizeof(uint32_t);
50 static constexpr uint8_t fprdCommandType = 0x04;
57 static constexpr uint8_t invalidIndex = 0xff;
86 static constexpr int pduOverhead =
sizeof(EtherCATPDU) -
sizeof(uint8_t) +
sizeof(uint16_t);
127 std::vector<std::pair<EtherCATFrame, EtherCATFrameMetaData>>
list;
153 std::pair<EtherCATFrame*, EtherCATFrameMetaData*>
operator*()
const;
EtherCATFrameIterator & operator++()
Move this iterator to the next EtherCAT frame.
bool atEnd() const
Check if this iterator has stepped over its range.
size_t getCurrentIndex() const
bool hasCompletedLoop() const
Check if this iterator points to the first available register frame.
EtherCATFrameIterator(EtherCATFrameList *list, size_t startIndex, size_t count)
Construct a new EtherCATFrameIterator that iterates over the given range of EtherCAT frames.
std::pair< EtherCATFrame *, EtherCATFrameMetaData * > operator*() const
Get the EtherCAT frame this iterator is on with metadata.
struct armarx::control::ethercat::PDUMetaData __attribute__
The EtherCATFrameList struct holds a list of EtherCAT frames that can be scheduled in round-robin-sty...
std::vector< std::pair< EtherCATFrame, EtherCATFrameMetaData > > list
The EtherCATFrame struct represents an EtherCAT frame according to the EtherCAT spec.
uint8_t pduArea[maxTotalPDULength]
The EtherCATPDU struct represents an EtherCAT PDU according to the EtherCAT spec.
uint16_t dataLengthAndNext
uint16_t slaveConfiguredAddress