#ifndef NX_ITERATOR_H #define NX_ITERATOR_H #include "base/Iterator.h" #include #include "base/TimeStamp.h" #include "nx/Message.h" namespace nx { class Iterator : public base::Iterator { protected: uint32_t fEpoch; /// fLastNxHit; ///= fBufferLen)) return false; if (fMsg.assign((uint8_t*) fBuffer + fBufferPos, fFormat)) { fBufferPos += fMsgSize; if (fMsg.getMessageType() == base::MSG_EPOCH) { fEpoch = fMsg.getEpochNumber(); // set new point for the time reference fConv.MoveRef(((uint64_t) fEpoch) << 14); } if (fCorrecion && fMsg.isHitMsg()) VerifyMessage(); return true; } fBufferPos = fBufferLen; return false; } int GetVerifyResult() const { return fVerifyRes; } // can be used only inside buffer, not with board source inline bool last() { if (!fBuffer || (fBufferLen < fMsgSize)) return false; fBufferPos = (fBufferLen - fMsgSize) / fMsgSize * fMsgSize; return next(); } // can be used only inside buffer, not with board source inline bool prev() { if (!fBuffer || (fBufferPos