|
The EtherCATFrameIterator class iterates over a set range of EtherCAT frames once. More...
#include <armarx/control/ethercat/bus_io/EtherCATFrame.h>
Public Member Functions | |
bool | atEnd () const |
Check if this iterator has stepped over its range. More... | |
EtherCATFrameIterator (EtherCATFrameList *list, size_t startIndex, size_t count) | |
Construct a new EtherCATFrameIterator that iterates over the given range of EtherCAT frames. More... | |
size_t | getCurrentIndex () const |
bool | hasCompletedLoop () const |
Check if this iterator points to the first available register frame. More... | |
std::pair< EtherCATFrame *, EtherCATFrameMetaData * > | operator* () const |
Get the EtherCAT frame this iterator is on with metadata. More... | |
EtherCATFrameIterator & | operator++ () |
Move this iterator to the next EtherCAT frame. More... | |
The EtherCATFrameIterator class iterates over a set range of EtherCAT frames once.
Definition at line 134 of file EtherCATFrame.h.
EtherCATFrameIterator | ( | EtherCATFrameList * | list, |
size_t | startIndex, | ||
size_t | count | ||
) |
Construct a new EtherCATFrameIterator that iterates over the given range of EtherCAT frames.
If startIndex + count > list->list.size()
, the iterator will wrap around to the start fo the list.
list | the list to iterate over |
startIndex | the index to start iterating on |
count | the number of frames to iterate over (including the first) |
Definition at line 5 of file EtherCATFrame.cpp.
bool atEnd | ( | ) | const |
Check if this iterator has stepped over its range.
true | iff this iterator can no longer be dereferenced or advanced |
false | iff this iterator can still be dereferenced and advanced |
Definition at line 36 of file EtherCATFrame.cpp.
size_t getCurrentIndex | ( | ) | const |
bool hasCompletedLoop | ( | ) | const |
Check if this iterator points to the first available register frame.
This indicates that all registers have been read by sequential iterators.
true | iff this iterator points to the first register frame |
false | iff this iterator does not point to the first register frame |
Definition at line 19 of file EtherCATFrame.cpp.
std::pair< EtherCATFrame *, EtherCATFrameMetaData * > operator* | ( | ) | const |
Get the EtherCAT frame this iterator is on with metadata.
Definition at line 13 of file EtherCATFrame.cpp.
EtherCATFrameIterator & operator++ | ( | ) |
Move this iterator to the next EtherCAT frame.
Does nothing if this iterator is at the end of its range.
Definition at line 25 of file EtherCATFrame.cpp.